architecture-audit
БесплатноБез исполняемых скриптовНе проверенSurface architectural friction across a codebase and propose deep-module refactors as RFCs.
от helderberto★ 21 звезда на GitHubОб этом скилле
Architecture Audit
Audit a codebase for architectural friction and propose refactors toward deep modules (simple interface, large implementation). Deep modules are more testable, more AI-navigable, and let you test at the seam instead of inside.
Uses the deep-module vocabulary and principles — call the Skill tool with codebase-design for the canonical glossary (module, interface, depth, seam, adapter, leverage, locality) and core principles (deletion test, interface-as-test-surface, one-adapter-is-hypothetical). Use those terms exactly in every suggestion. For audit-specific examples and anti-patterns (pass-through, temporal decomposition, classitis, signs a module is too shallow), see references/deep-modules.md.
Workflow
1. Explore
Scope first (YAGNI). Deepening pays off where code keeps changing. A direction in $ARGUMENTS (module, subsystem, pain point) → take it. Otherwise read a good stretch of git log --oneline for hot spots, the files and areas that keep coming up, and start there; no clear hot spot → widen the net. Read the ADRs in the area: a candidate an ADR already rejected comes back only when the friction is worth reopening it.
Use a read-only explore subagent, with a fresh context window, to navigate the codebase organically. Note where you experience friction:
- Understanding one concept requires bouncing between many small modules
- A module's interface is nearly as complex as its implementation (shallow module)
- Pure functions extracted just for testability, but real bugs hide in how they're called
- Tightly-coupled modules create integration risk at the seams between them
- A module fails the deletion test — deleting it makes complexity vanish (pass-through), or its complexity is duplicated across N callers (earning its keep but in the wrong place)
- Areas that are untested or hard to test
The friction you encounter IS the signal.
2. Present candidates
Show a numbered list. For each candidate:
- Cluster: which modules/concepts are involved
- Why they're coupled: shared types, call patterns, co-ownership of a concept
- Dependency category: from the DEEPENING reference in
codebase-design - Test impact: what existing tests would be replaced by tests at the new seam
- Strength:
Strong,Worth exploring, orSpeculative
--html → also render the candidates as a report with before/after diagrams, per references/html-report.md.
Do NOT propose interfaces yet. Ask which candidate to explore. The user rejects one for a load-bearing reason → offer to record it (call the Skill tool with to-adr) so later audits don't re-suggest it. Skip ephemeral reasons ("not now").
3. Design the interface
For the chosen candidate, run the Design-It-Twice procedure from the DESIGN-IT-TWICE reference in codebase-design: frame the problem space, spawn 3+ sub-agents with radically different constraints, compare, recommend. Then ask which design to use — your recommendation first, marked (Recommended).
4. Write improvement PRD
Save a markdown file named architecture-<cluster-name>.md using the template in references/improvement-template.md. Save it in .specs/specs/, creating the directory if missing.
Fill with concrete details: file paths, function names, migration steps. Share the file path with the user when done.
Rules
- Old unit tests on shallow modules are waste once seam tests exist — note them for deletion
- Don't introduce a new seam unless something actually varies across it (one adapter = hypothetical, two = real)
- Candidate scope turns out much larger than expected → surface it and re-scope before designing
Next: /hb:to-tickets architecture-<cluster-name> to slice the improvement PRD.
Установить architecture-audit в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл architecture-audit?
Surface architectural friction across a codebase and propose deep-module refactors as RFCs.
Как установить скилл architecture-audit?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл architecture-audit запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic