code-modularization-evaluator — Claude Code skill: score your coupling
Grades how modules are wired together using the Balanced Coupling Model and points at what to refactor. Useful during architecture reviews.
npx skills add dotneet/claude-code-marketplace --skill code-modularization-evaluator -a claude-codeWhat code-modularization-evaluator does
The skill reads your code along three axes: integration strength (what components actually know about each other), distance (how far that knowledge travels) and volatility (how often the area changes). Strength runs from intrusive down to contract, distance from methods in one class up to services owned by different teams. The rule it applies: strong coupling belongs close together, weak coupling can sit far apart, and low-volatility code tolerates a mismatch.
A checklist flags the worst cases first — direct database access into another service, reflection on private fields, business logic copied across services, microservices that need synchronized deploys, CBO above 14, circular dependencies. Then comes connascence, static and dynamic, with a fix per type: magic values become named constants, positional parameters become a parameter object, a shared algorithm moves to one place and gets referenced by name.
The model comes from Vlad Khononov's writing on balancing coupling in software design, and the skill points to references/connascence-types.md for worked examples. It installs into Claude, Codex, Cursor, GitHub Copilot, Gemini CLI and OpenCode, each with its own command. On a small codebase with a couple of modules the dependency graph comes back nearly empty, so the analysis has little to chew on.
What it helps with
- spot a distributed monolith hiding behind microservices
- explain why two services can't ship independently
- turn magic numbers into named constants
- break a circular dependency between modules
- decide where a new service boundary should go
Example prompts for the agent
- evaluate the modularity of the
orderspackage with the Balanced Coupling Model - check the coupling between services and list the red flags
- analyze connascence in the
billingmodule and tell me what to weaken
How to install code-modularization-evaluator
1Skills CLI (Vercel)
npx skills add dotneet/claude-code-marketplace --skill code-modularization-evaluator -a claude-code2Manually: put the files in place
~/.claude/skills/code-modularization-evaluator/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/code-modularization-evaluator/
1Skills CLI (Vercel)
npx skills add dotneet/claude-code-marketplace --skill code-modularization-evaluator -a codex2Manually: put the files in place
.agents/skills/code-modularization-evaluator/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add dotneet/claude-code-marketplace --skill code-modularization-evaluator -a cursor2Manually: put the files in place
.cursor/skills/code-modularization-evaluator/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install dotneet/claude-code-marketplace code-modularization-evaluator2Manually: put the files in place
.github/skills/code-modularization-evaluator/SKILL.md1Skills CLI (Vercel)
npx skills add dotneet/claude-code-marketplace --skill code-modularization-evaluator -a gemini-cli2Platform CLI
gemini skills install https://github.com/dotneet/claude-code-marketplace --path review-tool/skills/code-modularization-evaluatorManually: put the files in place
.devin/skills/code-modularization-evaluator/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add dotneet/claude-code-marketplace --skill code-modularization-evaluator -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about code-modularization-evaluator
How do I install code-modularization-evaluator in Claude?
Run npx skills add dotneet/claude-code-marketplace --skill code-modularization-evaluator -a claude-code. The skill then lives at ~/.claude/skills/code-modularization-evaluator/SKILL.md.
What does code-modularization-evaluator do?
It inspects dependencies between modules and classes, classifies coupling strength and distance, and looks for problematic connascence types. You get a list of refactoring targets with the technique for each.
Which platforms does it support?
Claude, Codex, Cursor, GitHub Copilot, Gemini CLI and OpenCode. Each platform has its own install command and skill file path in the repository.