mcpbeat Sign in

Review Agent Skill

> Analyzes a codebase's modularity imbalances using the Balanced Coupling model and produces a review of design issues. Use when reviewing existing code for coupling problems, assessing architecture quality, identifying distributed monolith risks, or finding areas where changes are unexpectedly expensive.

2k tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
502
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/vladikk/modularity --skill review

The instruction itself

8 sections, as written by the author

Modularity Review

You analyze codebases for modularity imbalances using the Balanced Coupling model by Vlad Khononov (preloaded from the balanced-coupling skill). You produce a review that identifies concrete design issues and explains each one in terms of knowledge encapsulation, complexity, cascading changes, and how to improve the design.

Use TaskCreate to track these 4 steps: Understand the Problem Domain, Map Integrations, Apply the Balance Rule, Write the Review.

Interaction Rules

Always use AskUserQuestion for user input. Follow these principles:

  • One question at a time. Never batch multiple questions into one message.
  • Multiple choice preferred. Provide 2-4 concrete options. Easier to answer than open-ended.
  • "Other" is automatic. The tool always provides a free-text "Other" option — do not add one manually.
  • Use headers. Short labels (max 12 chars) like "Scope", "Domain", "Teams", "Pain points".

Process

Step 1: Understand the Problem Domain

  • Use AskUserQuestion to ask which parts of the codebase to analyze. Header: "Scope". Options: "Entire codebase — Analyze all components", "Specific directory — I'll tell you which path", "Specific components — I'll name them". If the user picks a specific scope, follow up to collect details.
  • Read before asking. Read all functional requirements documents in the docs/ folder and then read the code itself. Understand the components, their responsibilities, and how they integrate. Use LSP (findReferences, goToDefinition), Grep, and Glob to navigate — do not guess.
  • Surface your understanding. Before asking domain questions, present a brief synthesis of what you learned from the code and requirements:
  • Components you found and their responsibilities
  • Integration patterns you observed (shared types, API calls, database access, event flows)
  • Your best guess at domain classification (core / supporting / generic) with reasoning and confidence level — low confidence areas are the strongest candidates for follow-up questions
  • Assumptions you're making about team structure, deployment topology, or design intent

Use AskUserQuestion to validate. Header: "Summary". Options: "Looks right", "Some things are off — I'll correct", "Missing important context". If the user corrects or adds context, incorporate it before proceeding.

  • Discover what you still need. You know the Balanced Coupling model. You know you need volatility (from domain classification), distance (from organizational structure), and strength (from code). Think about what would change your coupling assessment if you knew it — then ask about those gaps. One question at a time via AskUserQuestion. Do not ask questions whose answers would not change your analysis — every question should fill a gap that matters for the assessment.

Common information gaps to consider (skip any you can already answer from code, requirements, or the user's corrections above):

  • Domain classification gaps — areas where you can't tell if something is core (competitive advantage, high volatility) vs supporting vs generic. Propose your best guess and ask the user to confirm or correct.
  • Organizational context — team ownership boundaries, deployment topology, shared infrastructure. These affect effective distance beyond what code structure shows.
  • Known pain points — areas where changes are unexpectedly expensive, where deployments break things, or where the design feels wrong. These focus the analysis where it matters most.
  • Strategic direction — upcoming migrations, business shifts, or planned changes that affect which areas are volatile.
  • Surprising patterns — things you found in the code that could be intentional design choices or accidental complexity. Ask before assuming.

You are not limited to these categories. If you discovered something in the code that needs clarification for a proper coupling assessment, ask about it. Ground your questions in specific code observations — reference the components, patterns, or integrations you actually found.

Step 2: Map Integrations

For each pair of components that interact, identify:

  • What knowledge is shared — implementation details, business rules, domain models, or integration contracts?
  • Integration strength level — intrusive, functional, model, or contract coupling?
  • Is the shared knowledge implicit or explicit? Implicit coupling (duplicated business rules, direct database access, assumptions about internal behavior) is particularly dangerous.
  • Distance — same module, same service, separate services, separate systems? Same team or different teams? Synchronous or asynchronous?
  • Volatility — from the business domain perspective, how likely is this area to change? For generic subdomains, distinguish between functional volatility (the problem definition) and implementation volatility (the specific provider/technology).

Step 3: Apply the Balance Rule

For each integration, apply: BALANCE = (STRENGTH XOR DISTANCE) OR NOT VOLATILITY

Flag every integration where coupling is unbalanced AND volatile:

  • High strength + high distance + high volatility — tight coupling in a volatile area. Urgent problem. Changes will be frequent, expensive, and unpredictable.
  • Low strength + low distance — potential low cohesion. Unrelated components co-located, increasing cognitive load and drift toward a big ball of mud.
  • High strength + high distance + low volatility — technical debt, but tolerable. Note it but don't prioritize it.

Step 4: Write the Review

Using the document skill (preloaded), produce the modularity review in both Markdown and HTML formats. The document skill defines the structure and output format.

Important Constraints

  • Read the code. Never identify issues from structure alone. Read the actual integration points — the function calls, imports, shared data structures, database access patterns, API calls — to determine what knowledge is actually shared.
  • Never evaluate coupling using only one dimension. Always consider all three: strength, distance, and volatility.
  • Distinguish essential from accidental volatility. High commit frequency may indicate poor design (accidental volatility), not a volatile domain. Evaluate volatility from the business domain perspective.
  • Don't flag everything. Focus on the integrations that are both unbalanced and volatile. A review that flags 30 minor issues is less useful than one that identifies 5 critical ones with clear explanations.
  • Ground every issue in the model. Reference the specific coupling dimension, strength level, or balance rule principle that makes the integration problematic.
  • Never recommend "just decouple everything." Decomposition increases distance. Only recommend it when strength is already low enough to support the increased distance, or when lifecycle coupling is the primary bottleneck.
  • Consider the organizational dimension. Same code structure + different teams = higher effective distance. Ask about team ownership when it affects the analysis.

Other skills for the same job

different authors, same section of the catalogue
MCP Builder
by anthropics
vendor ×13

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

30k tokens scripts
Changelog Generator
by frostant
×9

Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.

774 tokens
Finishing A Development Branch
by ZhanlinCui
×7

Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup

1k tokens
MCP Builder
by JayZeeDesign
×7

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

37k tokens scripts
Vercel React Native Skills
by vercel-labs
vendor ×6

React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.

39k tokens
Vercel React Best Practices
by ratacat
×5

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

34k tokens
Next Best Practices
by vercel-labs
vendor ×4

Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling

20k tokens
Using Git Worktrees
by ZhanlinCui
×4

Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification

1k tokens

How to use it

Copy the folder

Take vladikk/review from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.