coupling-analysis
하는 일
이 스킬은 AI가 모듈들이 얼마나 강하게 결합되어 있고, 얼마나 멀리 떨어져 있으며, 얼마나 자주 바뀌는지 판단하게 합니다. 시스템이 바꾸기 어려운지 알고 싶은 아키텍트와 개발자를 위한 것입니다.
사용하는 경우
- ✓두 모듈이 지나치게 단단히 연결되어 있는지 물을 때.
- ✓앱의 한 부분을 바꿀 때마다 다른 부분이 계속 깨질 때.
- ✓어떤 연결을 먼저 느슨하게 할지 알려 주는 보고서가 필요할 때.
스킬 링크
https://github.com/tech-leads-club/agent-skills/blob/main/packages/skills-catalog/skills/(architecture)/coupling-analysis/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“청구 모듈과 주문 모듈이 너무 단단히 결합되어 있나요? 어느 쪽을 먼저 분리해야 할까요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
AI는 맥락을 모으고, 각 연결을 부품들이 공유하는 정도, 떨어진 정도, 변경 빈도로 평가한 뒤 바꿀 방법을 제안합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Coupling Analysis Skill
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):
- Integration Strength — what is shared between components
- Distance — where the coupling physically lives
- Volatility — how often components change
The guiding balance formula:
BALANCE = (STRENGTH XOR DISTANCE) OR NOT VOLATILITY
A design is balanced when:
- Tightly coupled components are close together (high strength + low distance = cohesion)
- Distant components are loosely coupled (low strength + high distance = loose coupling)
- Stable components (low volatility) can tolerate stronger coupling
When to Use
Apply this skill when the user:
- Asks to "analyze coupling", "evaluate architecture", or "check dependencies"
- Wants to understand integration strength between modules or services
- Needs to identify problematic coupling or architectural smell
- Wants to know if a module should be extracted or merged
- References concepts like connascence, cohesion, or coupling from Khononov's book
- Asks why changes in one module cascade to others unexpectedly
Process
PHASE 1 — Context Gathering
Before analyzing code, collect:
1.1 Scope
- Full codebase or a specific area?
- Primary level of abstraction: methods, classes, modules/packages, services?
- Is git history available? (useful to estimate volatility)
1.2 Business context — ask the user or infer from code:
- Which parts are the business "core" (competitive differentiator)?
- Which are infrastructure/generic support (auth, billing, logging)?
- What changes most frequently according to the team?
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 |
PHASE 2 — Structural Mapping
2.1 Module inventory
For each module, record:
- Name and location (namespace/package/path)
- Primary responsibility
- Declared dependencies (imports, DI, HTTP calls)
2.2 Dependency graph
Build a directed graph where:
- Nodes = modules
- Edges = dependencies (A → B means "A depends on B")
- Note: the flow of knowledge is OPPOSITE to the dependency arrow
- If A → B, then B is upstream and exposes knowledge to A (downstream)
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).
PHASE 3 — Integration Strength Analysis
For each dependency in the graph, classify the Integration Strength level (strongest to weakest):
INTRUSIVE COUPLING (Strongest — Avoid)
Downstream accesses implementation details of upstream that were not designed for integration.
Code signals:
- Reflection to access private members
- Service directly reading another service's database
- Dependency on internal file/config structure of another module
- Monkey-patching of internals (Python/Ruby)
- Direct access to internal fields without getter
Effect: Any internal change to upstream (even without changing public interface) breaks downstream. Upstream doesn't know it's being observed.
FUNCTIONAL COUPLING (Second strongest)
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
co
자주 묻는 질문
전체 코드베이스를 읽어야 하나요?
요청에 따라 전체 코드베이스 또는 특정 영역 중 범위를 정할 수 있습니다.
도메인 분석과 같은 건가요?
아니요. 도메인 경계 분석은 별도의 스킬입니다.
어떤 모델을 쓰나요?
「Balancing Coupling in Software Design」 책의 강도, 거리, 변동성이라는 세 가지 모델을 따릅니다.
상세 정보
작성자의 원본 설명
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).
인기도
- GitHub 스타
- 7.1k
- 순위
- #13502
- 라이선스
- —
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
component-common-domain-detection
7.1k에이전트가 코드베이스의 여러 부분에 반복되는 비즈니스 로직을 찾아, 그것을 어떻게 합칠지 제안하도록 돕습니다.
component-flattening-analysis
7.1k에이전트가 잘못 놓인 코드를 찾고, 복잡한 컴포넌트 폴더 구조를 평평하게 정리해 각 조각이 제자리에 있도록 돕습니다.
component-identification-sizing
7.1k에이전트가 코드베이스의 부품을 파악하고 크기를 재어, 먼저 나눠야 할 모듈을 찾도록 돕습니다.
decomposition-planning-roadmap
7.1k에이전트가 큰 앱을 별도 서비스로 나누는 단계별 순서를 우선순위와 단계와 함께 계획하도록 돕습니다.