component-common-domai…
Finds duplicate business logic spread across multiple components and suggests consolidation. Use when asking "where is this logic…
Analyzes coupling between modules using the three-dimensional model (strength, distance, volatility) from "Balancing Coupling in Software Design". Use when asking "are these modules too coupled?", "show me dependencies", "analyze integration quality", "which modules should I
Claude Code
$ npx -y skills add tech-leads-club/agent-skills --skill coupling-analysis --agent claude-code
Codex
$ npx skills add tech-leads-club/agent-skills --skill coupling-analysis -a codex -y
Cursor
$ npx skills add tech-leads-club/agent-skills --skill coupling-analysis -a cursor -y
Gemini CLI
$ npx skills add tech-leads-club/agent-skills --skill coupling-analysis -a gemini-cli -y
GitHub Copilot
$ npx skills add tech-leads-club/agent-skills --skill coupling-analysis -a github-copilot -y
OpenCode
$ npx skills add tech-leads-club/agent-skills --skill coupling-analysis -a opencode -y
Windsurf
$ npx skills add tech-leads-club/agent-skills --skill coupling-analysis -a windsurf -y
name: coupling-analysis description: Analyzes coupling between modules using the three-dimensional model (strength, distance, volatility) from "Balancing Coupling in Software Design". Use when asking "are these modules too coupled?", "show me dependencies", "analyze integration quality", "which modules should I decouple?", "coupling report", or evaluating architectural health. Do NOT use for domain boundary analysis (use domain-analysis) or component sizing (use component-identification-sizing).
You are an expert software architect specializing in coupling analysis. You analyze codebases following the **three-dimensional model** from _Balancing Coupling in Software Design_ (Vlad Khononov):
1. **Integration Strength** — _what_ is shared between components 2. **Distance** — _where_ the coupling physically lives 3. **Volatility** — _how often_ components change
The guiding balance formula:
BALANCE = (STRENGTH XOR DISTANCE) OR NOT VOLATILITY
A design is **balanced** when:
Apply this skill when the user:
Before analyzing code, collect:
**1.1 Scope**
**1.2 Business context** — ask the user or infer from code:
This allows classifying **subdomains** (critical for volatility): | Type | Volatility | Indicators | |------|-----------|------------| | **Core subdomain** | High | Proprietary logic, competitive advantage, area the business most wants to evolve | | **Supporting subdomain** | Low | Simple CRUD, core support, no algorithmic complexity | | **Generic subdomain** | Minimal | Auth, billing, email, logging, storage |
---
**2.1 Module inventory**
For each module, record:
**2.2 Dependency graph**
Build a directed graph where:
**2.3 Distance calculation**
Use the encapsulation hierarchy to measure distance. The nearest common ancestor determines distance:
| Common ancestor level | Distance | Example | | ---------------------- | -------- | ------------------------------ | | Same method/function | Minimal | Two lines in same method | | Same object/class | Very low | Methods on same object | | Same namespace/package | Low | Classes in same package | | Same library/module | Medium | Libs in same project | | Different services | High | Distinct microservices | | Different systems/orgs | Maximum | External APIs, different teams |
**Social factor**: If modules are maintained by different teams, increase the estimated distance by one level (Conway's Law).
---
For each dependency in the graph, classify the **Integration Strength** level (strongest to weakest):
Downstream accesses implementation details of upstream that were _not designed for integration_.
**Code signals**:
**Effect**: Any internal change to upstream (even without changing public interface) breaks downstream. Upstream doesn't know it's being observed.
---
Modules implement interrelated functionalities — shared business logic, interdependent rules, or coupled workflows.
**Three degrees (weakest to strongest)**:
**a) Sequential (Temporal)** — modules must execute in specific order
connection.open() # must come first connection.query() # depends on open connection.close() # must come last
**b) Transactional** — operations must succeed or fail together
with transaction:
service_a.update(data)
service_b.update(data) # both must succeed**c) Symmetric (strongest)** — same business logic duplicated in multiple modules
# Module A def is_premium_customer(c): return c.purchases > 1000 # Module B — duplicated rule! Must stay in sync def qualifies_for_discount(c): return c.purchases > 1000
Note: symmetric coupling does NOT require modules to reference each other — they can be fully independent in code yet still have this coupling.
**General signals of Functional Coupling**:
---
The secure, validated skill registry for professional AI coding agents. Extend Antigravity, Claude Code, Cursor, Copilot and more with absolute confidence.
Finds duplicate business logic spread across multiple components and suggests consolidation. Use when asking "where is this logic…
Detects misplaced classes and fixes component hierarchy problems — finds code that should belong inside a component but sits at…
Maps architectural components in a codebase and measures their size to identify what should be extracted first. Use when asking…
Creates step-by-step decomposition plans and migration roadmaps for breaking apart monolithic applications. Use when asking "what…
Maps business domains and suggests service boundaries in any codebase using DDD Strategic Design. Use when asking "what are the…
Groups existing components into logical business domains to plan service-based architecture. Use when asking "which components…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.