modularity
vladikk · vladikk/modularity
Giúp Claude Code thiết kế các hệ thống mô-đun từ các yêu cầu và xem xét mã nguồn hiện có để tìm các vấn đề về tính mô-đun, cung cấp các khuyến nghị cải thiện có thể thực hiện được.
Claude Code plugin for designing modular systems from functional requirements and reviewing existing codebases for modularity problems with actionable improvement recommendations. Based on the Balanced Coupling model.
Xem trước
Bạn có thể làm gì với nó
- Nhận các khuyến nghị thiết kế cho một mô-đun mới dựa trên các yêu cầu chức năng, tập trung vào việc ghép nối cân bằng.
- Phân tích một mã nguồn lớn hiện có để xác định các khu vực có độ ghép nối cao và nhận các gợi ý tái cấu trúc có thể thực hiện được.
- Đảm bảo các tính năng mới được tích hợp theo mô-đun bằng cách tạo hợp đồng tích hợp và đặc tả kiểm thử trong giai đoạn thiết kế.
Kiểm tra an toàn
Dùng được, nhưng nên đọc ghi chú trước.
- ●Không có giấy phép rõ ràng: hỏi tác giả trước khi dùng cho sản phẩm thương mại.
Quét tự động các file trong repo. Luôn xem lại code trước khi chạy.
Trích từ README
Modularity Skills
TL;DR: A Claude Code plugin for designing and analyzing modular software systems using the Balanced Coupling model.
There's no shortage of AI tools that provide code-level feedback: best practices, edge cases, potential bugs. That's useful, but it's not where the costly mistakes hide. In the AI era, code is generated faster than ever, and so technical debt accumulates faster too. Any architectural inefficiency, any misdrawn boundary, any unmanaged coupling will grow into a big ball of mud at a pace that wasn't possible before.
This plugin operates at the architectural level. It includes two skills:
/modularity:reviewanalyzes an existing codebase for coupling imbalances: what knowledge is properly encapsulated, what's leaking across component boundaries, and where cascading changes are waiting to happen. It produces actionable recommendations for improving modularity./modularity:designgoes the other direction, designing modular architectures from functional requirements and producing module design docs with integration contracts, test specifications, and a full coupling assessment.
Both skills are grounded in the Balanced Coupling model, so every recommendation traces back to a concrete dimension (integration strength, distance, volatility), not gut feel.
"One of the most useful Claude Code skills for your vibe-coded projects so far!" — Alexei Ledenev (pumba, k8s-mcp-server, ccgram)
Installation
Requires Claude Code v1.0.33 or later.
Add the marketplace and install the plugin:
/plugin marketplace add vladikk/modularity
/plugin install modularity@vladikk-modularity
Alternatively, clone the repo and load it directly:
git clone https://github.com/vladikk/modularity.git
claude --plugin-dir ./modularity
Skills
/modularity:review — Modularity Review
Analyzes an existing codebase for coupling imbalances. Use when:
- Reviewing code for coupling problems
- Assessing architecture quality
- Identifying distributed monolith risks
- Investigating why changes in one area break things elsewhere
How it works:
- Reads your code and functional requirements
- Asks you about domain classification (core/supporting/generic), team structure, and known pain points
- Maps integrations between components across three dimensions: integration strength, distance, and volatility
- Applies the balance rule to flag imbalances
- Produces a review document (Markdown + HTML) with a coupling overview table, issue descriptions, and concrete improvement recommendations
Usage:
/modularity:review
The review output includes hyperlinks to coupling.dev for each coupling concept referenced.
/modularity:design — Modular Design
Designs modular architectures from functional requirements. Use when:
- Designing a new system from scratch
- Creating architecture documentation for an existing system
- Producing module-level design specs with integration contracts and test specifications
How it works:
- Reads your functional requirements and asks clarifying questions
- Classifies domain areas by volatility (core/supporting/generic subdomains)
- Designs the modular architecture, assessing coupling across all three dimensions
- Produces design documents for each module (responsibilities, encapsulated knowledge, integration contracts, change vectors)
- Produces test specifications for each module
- Produces an architecture overview document
- Self-reviews the design for modularity imbalances and iterates until clean
Each step requires your approval before proceeding.
Usage:
/modularity:design
The Balanced Coupling Model
Both skills are grounded in the Balanced Coupling model, which evaluates coupling across three dimensions:
- Integration Strength — how much knowledge is shared between components (intrusive > functional > model > contract)
- Distance — the socio-technical cost of co-evolving components (code structure, team boundaries, runtime dependencies)
- Volatility — the probability of a component needing to change, evaluated from the business domain perspective
The balance rule: BALANCE = (STRENGTH XOR DISTANCE) OR NOT VOLATILITY
Coupling is balanced when strength and distance counterbalance each other, or when volatility is low enough to neutralize the imbalance.
Learn more at coupling.dev.
Recommended Models
Claude Opus 4.5 or later. The skills rely on nuanced architectural reasoning that benefits from the most capable models.
License
This work is licensed under CC BY-NC-SA 4.0. For commercial use, contact skill at coupling dot dev.
AI Training Restriction
This repository and its contents may not be used for training, fine-tuning, or any other form of machine learning model development without explicit written permission from the author.