review-module-structure

Review module structure by grading coupling strength, distance, and volatility across components.

5|Updated Sep 9, 2017
One-click install
npx skills add https://github.com/hpcsc/dotfiles --skill review-module-structure-hpcsc
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: review-module-structure
Source: https://github.com/hpcsc/dotfiles/tree/main/link/common/claude/.claude/skills/review-module-structure
Command: npx skills add https://github.com/hpcsc/dotfiles --skill review-module-structure-hpcsc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It answers whether a module is cohesive or secretly two modules, by grading every internal and boundary integration on strength, distance, and volatility instead of relying on gut-feel architecture opinions. ## Core Features & Use Cases - Component and dependency mapping: Inventories components, extracts the public surface, builds the internal dependency graph, and collects co-change evidence from git history. - Balanced Coupling grading: Grades each edge with the Balanced Coupling model (strength, distance, volatility) and flags tight coupling, low cohesion, cycles, hubs, and pass-through layers. - Restructuring proposals: Produces evidence-backed findings with file:line citations, a mermaid component diagram, and a move map with migration order when restructuring is warranted. - Use Case: Ask it to review a Go package that has grown unwieldy; it maps the components, finds an intrusive coupling to a shared store, and proposes a step-by-step split with a blast-radius estimate. ## Quick Start Ask the assistant to review the structure of the module at a given path, for example by saying: review the module structure of ./internal/billing.

Frequently Asked Questions about review-module-structure

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

FAQPage Schema
How do I review a module's structure for cohesion and coupling?▼

Point the review at the module's directory path. It inventories components, builds the internal dependency graph, grades each integration on strength, distance, and volatility, and reports evidence-backed findings with a component diagram.

What is the Balanced Coupling model for code review?▼

Balanced Coupling grades each integration on three dimensions: strength (knowledge shared), distance (coordination cost), and volatility (likelihood of change). Strength and distance must balance; both high means tight coupling, both low means low cohesion.

Which languages does module structure review support?▼

It supports Go packages, JS/TS directories with index barrels, Elixir contexts, and Python packages. It uses language tooling like go list, ast-grep, and ripgrep to extract imports, exports, and call sites.

When should I not split a module?▼

Avoid splitting small modules under roughly 300 lines with a single clear purpose, low-volatility areas where unbalanced coupling costs nothing, and cases where migration cost exceeds the friction the current structure causes.

Does the review flag bugs or security issues in the module?▼

No. The review covers structural shape only: cohesion, coupling, cycles, and boundary hygiene. Bugs, races, security, performance, and test quality belong to other reviews and are explicitly excluded.