# code-modularization-evaluator

Grades how modules are wired together using the Balanced Coupling Model and points at what to refactor. Useful during architecture reviews.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 460 installs · ★ 3
- Author: dotneet
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/dotneet/claude-code-marketplace/tree/HEAD/review-tool/skills/code-modularization-evaluator/SKILL.md
- Updated: 2026-01-23
- HTML: https://affpapa.org/en/nevibecode/skills/code-modularization-evaluator

## What it 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.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add dotneet/claude-code-marketplace --skill code-modularization-evaluator -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/code-modularization-evaluator/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/code-modularization-evaluator/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add dotneet/claude-code-marketplace --skill code-modularization-evaluator -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/code-modularization-evaluator/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add dotneet/claude-code-marketplace --skill code-modularization-evaluator -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/code-modularization-evaluator/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install dotneet/claude-code-marketplace code-modularization-evaluator
```

2. **Manually: put the files in place**
- File: `.github/skills/code-modularization-evaluator/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add dotneet/claude-code-marketplace --skill code-modularization-evaluator -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/dotneet/claude-code-marketplace --path review-tool/skills/code-modularization-evaluator
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/code-modularization-evaluator/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add dotneet/claude-code-marketplace --skill code-modularization-evaluator -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/dotneet/claude-code-marketplace/tree/HEAD/review-tool/skills/code-modularization-evaluator/SKILL.md

## When to use it
- 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
- evaluate the modularity of the `orders` package with the Balanced Coupling Model
- check the coupling between services and list the red flags
- analyze connascence in the `billing` module and tell me what to weaken

## Similar
- [vanity-engineering-review](https://affpapa.org/en/nevibecode/skills/vanity-engineering-review.md) — skill · 3200 installs
- [architecture-compass](https://affpapa.org/en/nevibecode/skills/architecture-compass.md) — skill · 2700 installs
- [clean-architecture](https://affpapa.org/en/nevibecode/skills/pproenca-clean-architecture.md) — skill · 2000 installs
- [smell](https://affpapa.org/en/nevibecode/skills/smell.md) — skill · 768 installs
- [architecture-review](https://affpapa.org/en/nevibecode/commands/architecture-review.md) — command · 3419 installs
- [guarding-architecture](https://affpapa.org/en/nevibecode/skills/guarding-architecture.md) — skill · 18000 installs

From the same set: [dotneet/claude-code-marketplace](https://affpapa.org/en/nevibecode/by/dotneet/claude-code-marketplace.md) — 3 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
