code-restructuring

Analyze Go monorepo cohesion gaps and generate an executable restructuring plan.

23|2|Updated Jun 9, 2025
One-click install
npx skills add https://github.com/kaptinlin/gozod --skill code-restructuring
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-restructuring
Source: https://github.com/kaptinlin/gozod/tree/main/.agents/skills/code-restructuring
Command: npx skills add https://github.com/kaptinlin/gozod --skill code-restructuring

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Full-repository architecture review and package reorganization to improve global cohesion, identify cohesion gaps, eliminate structural redundancy, restore cross-package cohesion, and generate an executable restructuring plan with import-cycle risk analysis.

Core Features & Use Cases

  • Global audit of all Go packages for cohesion and boundary clarity
  • Import-cycle risk analysis with batchable restructuring plans
  • Planned migrations that preserve behavior and allow rollback
  • Domain-driven reorganization guidance (group by concern rather than artifact type)
  • Evidence-based recommendations with batch execution and validation

Quick Start

Initiate the global-repository cohesion audit to generate an executable restructuring plan.

Frequently Asked Questions about code-restructuring

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I plan a large-scale Go monorepo refactoring without breaking existing behavior?

Large-scale Go monorepo refactoring requires a full-repository architecture review to identify cohesion gaps and generate an executable restructuring plan. This approach ensures planned migrations preserve behavior and provide rollback guidance through phased package reorganization.

What is the best way to resolve import cycles when reorganizing Go packages across multiple modules?

Resolving import cycles during Go package reorganization requires an import-cycle risk analysis to detect structural dependencies. This generates a batchable restructuring plan that reorganizes packages by domain concern while eliminating circular references across multiple modules.

How do I audit Go packages globally for architecture cohesion and boundary clarity?

A global audit of Go packages for architecture cohesion evaluates all repository packages to identify boundary clarity issues and structural redundancy. It produces evidence-based recommendations for domain-driven reorganization to restore cross-package cohesion.

Can I batch-execute repository restructuring plans with rollback guidance for Go monorepos?

Yes, you can batch-execute repository restructuring plans for Go monorepos using a phased package reorganization strategy. This includes rollback guidance, risk analysis, and validation steps to ensure behavior preservation throughout the migration.

When should I use a global repo restructuring plan instead of incremental refactoring?

Global repo restructuring is necessary when a full-repository architecture review reveals widespread cohesion gaps and structural redundancy across multiple modules. Incremental refactoring cannot address cross-package import-cycle risks or provide batchable domain-driven reorganization at scale.

Does this restructuring approach group Go packages by domain concern or artifact type?

This restructuring approach provides domain-driven reorganization guidance, grouping Go packages by domain concern rather than artifact type. This method improves global cohesion and boundary clarity across the entire repository architecture.