codebase-architect
Skill1 starsChanged 3 months agoMITView on GitHub
Analyze a repository's architecture and produce an evidence-based architecture report: module map, dependency graph, coupling metrics, circular dependencies, and hotspot identification, with Mermaid diagrams generated from real import relationships. Use when onboarding to a new codebase, planning major changes, or documenting system structure.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- paramcodes/skillstheir own version, first seen Nov 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- paramcodes/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository9 other files it gives its agents.
- deep-debuggerSkill
- dependency-doctorSkill
- documentation-engineerSkill
- performance-engineerSkill
- refactor-engineerSkill
- release-engineerSkill
- repo-resurrectionSkill
- security-auditorSkill
- test-engineerSkill
The file
Files
Codebase Architect
Phân tích kiến trúc repo bằng dữ liệu THẬT từ import/dependency relationships, không bằng cảm nhận. Đầu ra: báo cáo kiến trúc + diagram Mermaid tự sinh.
Quy trình (5 bước)
- Map modules: liệt kê packages/modules, kích thước (dòng code), trách nhiệm suy ra từ tên + docstring.
- Build dependency graph: chạy
scripts/graph_deps.py <repo>phân tích import statements → adjacency list thật. - Tính metrics:
- Coupling: số dependency in/out mỗi module (Ca/Ce).
- Circular dependencies: DFS tìm cycle trong import graph.
- Hotspots: module có fan-in cao (nhiều nơi phụ thuộc) + thay đổi gần đây (git log).
- Vẽ diagram: sinh Mermaid flowchart từ graph thật; KHÔNG vẽ tay diagram không khớp code.
- Báo cáo: module map + metrics table + cycle list + hotspot ranking + khuyến nghị tách module nếu coupling quá cao.
Nguyên tắc
- Mọi con số từ script; diagram phải khớp graph thật (test: parse lại diagram phải bằng graph).
- Không phán kiến trúc "tốt/xấu" chung chung — chỉ ra metric cụ thể và ngưỡng.
- Report ngắn gọn: table + diagram + 5 khuyến nghị tối đa.
Scripts
scripts/graph_deps.py <repo> [--language python|js|ts] [--output graph.json]scripts/metrics.py graph.json— tính Ca/Ce, cycles, hotspots → JSON.
References
- METRICS-DEFINITIONS.md
- DIAGRAM-RULES.md
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

