coupling-analysis
Fungsinya
Skill ini membuat AI menilai seberapa kuat modul-modul saling terkait, seberapa jauh jaraknya, dan seberapa sering mereka berubah. Skill ini ditujukan untuk arsitek dan pengembang yang ingin tahu apakah sistem mereka sulit diubah.
Kapan dipakai
- โSaat Anda bertanya apakah dua modul terlalu erat terhubung.
- โKetika perubahan di satu bagian aplikasi terus merusak bagian lain.
- โKetika Anda ingin laporan tentang koneksi mana yang sebaiknya dilonggarkan lebih dulu.
Link skill
https://github.com/tech-leads-club/agent-skills/blob/main/packages/skills-catalog/skills/(architecture)/coupling-analysis/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
โApakah modul penagihan dan pesanan terlalu erat terhubung, dan mana yang sebaiknya saya pisahkan lebih dulu?โ
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
AI mengumpulkan konteks, lalu menilai setiap koneksi berdasarkan seberapa banyak bagian itu berbagi, seberapa jauh jaraknya, dan seberapa sering berubah, lalu mengusulkan perubahan.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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
Pertanyaan umum
Apakah skill ini perlu membaca seluruh basis kode?
Bisa mencakup seluruh basis kode atau satu area tertentu, tergantung apa yang Anda tanyakan.
Apakah ini sama dengan analisis domain?
Tidak. Analisis batas domain adalah skill tersendiri.
Model apa yang dipakai?
Skill ini mengikuti model tiga bagian tentang kekuatan, jarak, dan volatilitas dari buku Balancing Coupling in Software Design.
Detail
Deskripsi asli dari pembuat
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).
Popularitas
- Bintang GitHub
- 7.1k
- Peringkat
- #13502
- Lisensi
- โ
- Diperbarui
- 2/11/2026
Komentar
- โฆ
Skill lain dari repositori ini
component-common-domain-detection
7.1kMembantu agent Anda menemukan logika bisnis yang berulang di beberapa bagian basis kode dan menyarankan cara menggabungkannya.
component-flattening-analysis
7.1kMembantu agent Anda menemukan kode yang salah tempat dan meratakan struktur folder komponen yang berantakan, agar setiap bagian berada di tempat yang seharusnya.
component-identification-sizing
7.1kMembantu agent Anda memetakan bagian-bagian basis kode dan mengukur ukurannya, untuk menemukan modul mana yang sebaiknya dipecah lebih dulu.
decomposition-planning-roadmap
7.1kMembantu agent Anda merencanakan urutan langkah untuk memecah aplikasi besar menjadi layanan terpisah, lengkap dengan prioritas dan fase.
Skill serupa
diffs
394kMemungkinkan agent Anda menghasilkan diff perubahan yang nyata dan dapat dibagikan sebagai tautan viewer atau file gambar, bukan ringkasan yang ditulis manual.
coding-agent
394kMembantu agent Anda menyerahkan pekerjaan pemrograman besar ke Codex, Claude Code, atau OpenCode di latar belakang, lalu memeriksa kemajuannya.
gh-issues
394kMembantu agent Anda menemukan issue GitHub, memilih yang dikerjakan, dan membuka pull request perbaikan, termasuk tindak lanjut komentar tinjauan.