From workflow-toolkit
This skill should be used when the user asks to "improve the architecture", "find refactoring opportunities", "deepen modules", "make the codebase more testable", "consolidate tightly-coupled modules", "review codebase architecture", or wants to surface architectural friction and propose module-deepening refactors.
How this skill is triggered — by the user, by Claude, or both
Slash command
/workflow-toolkit:improve-codebase-architecture*.ts*.tsx*.js*.jsxThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Explore a codebase organically, surface architectural friction, discover opportunities for improving testability, and propose module-deepening refactors as GitHub issue RFCs.
Explore a codebase organically, surface architectural friction, discover opportunities for improving testability, and propose module-deepening refactors as GitHub issue RFCs.
A deep module (John Ousterhout, "A Philosophy of Software Design") has a small interface hiding a large implementation. Deep modules are more testable, more navigable, and enable testing at the boundary instead of inside.
Use the Agent tool with subagent_type=Explore to navigate the codebase naturally. Do not follow rigid heuristics — explore organically and note where friction occurs:
The friction encountered IS the signal.
Present a numbered list of deepening opportunities. For each candidate, show:
references/dependency-categories.md for the four categoriesDo not propose interfaces yet. Ask: "Which of these would you like to explore?"
Wait for the user to select one.
Before spawning sub-agents, write a user-facing explanation of the problem space:
Present this to the user, then immediately proceed to Step 5. The user reads while the sub-agents work in parallel.
Spawn 3+ sub-agents in parallel using the Agent tool. Each must produce a radically different interface for the deepened module.
Prompt each sub-agent with a separate technical brief (file paths, coupling details, dependency category, what is being hidden). Give each agent a different design constraint:
Each sub-agent outputs:
references/dependency-categories.md)Present designs sequentially, then compare them in prose. Give a clear recommendation: which design is strongest and why. If elements from different designs combine well, propose a hybrid. Be opinionated — the user wants a strong read, not just a menu.
Wait for selection or accept the recommendation.
Create a refactor RFC as a GitHub issue using gh issue create with the template in references/issue-template.md. Do not ask the user to review before creating — create it and share the URL.
references/dependency-categories.md — Four dependency categories (in-process, local-substitutable, ports & adapters, mock) and testing strategiesreferences/issue-template.md — GitHub issue template for refactor RFCsnpx claudepluginhub pau-vega/ai-devkitGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.