/coding-engineer-skills:improve-codebase-architecturefrom coding-engineer-skills
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
Ships in coding-engineer-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Surface architectural friction and propose deepening opportunities: refactors that turn shallow modules into deep ones. The aim is testability and AI-navigability.
This command is informed by the project's domain model and built on a shared design vocabulary:
coding-engineer-skills:codebase-design skill for the architecture vocabulary (module, interface, depth, seam, adapter, leverage, locality) and its principles (the deletion test, "the interface is the test surface", "one adapter = hypothetical seam, two = real"). Use these terms exactly in every suggestion, and don't drift into "component," "service," "API," or "boundary."AGENTS.md, CLAUDE.md, or docs/agents/domain.md) before filename defaults. Read the selected context from the configured map, otherwise GLOSSARY-MAP.md or an active legacy CONTEXT-MAP.md; use its glossary and context ADRs plus system-wide ADRs. The glossary gives names to good seams; the ADRs record decisions this command should not re-litigate. GLOSSARY.md is the new default; an existing CONTEXT.md remains active when no replacement is configured. Preserve the configured layout and all terms. If a conflict remains, ask only when it would affect the next term or ADR write, while continuing independent exploration.Scope before you scan: YAGNI. Deepening a module pays off by making future changes to it easier, so put extra weight on the parts of the codebase that have recently changed. Decide where to look before you look:
git log --oneline) to find the codebase's hot spots, the files and areas that keep coming up, and let those paths pull your attention first. If the changes are scattered with no clear hot spot, widen the net.Read the resolved active domain glossary and relevant ADRs first; explicit domain policy takes precedence over which default-named file happens to exist.
Then spawn a sub-agent with a fresh context window to walk the codebase. Don't follow rigid heuristics; explore organically and note where you experience friction:
Apply the deletion test to anything you suspect is shallow: would deleting it concentrate complexity, or just move it? A "yes, concentrates" is the signal you want.
Write a single HTML file to the OS temp directory so nothing lands in the repo.
Create it with the OS's secure unique temporary-file primitive (mktemp on
POSIX or an exclusive create in %TEMP% on Windows); do not construct a
timestamp-only path. Capture the returned absolute path, quote it when passing
it to xdg-open on Linux or open on macOS; on Windows use
start "" "<path>" so the quoted path is not treated as a window title. Report
that same path to the user.
The report uses Tailwind via CDN for layout and styling, and Mermaid via CDN for diagrams where a graph/flow/sequence reliably communicates the structure, so state that opening it requires network access. Follow HTML-REPORT.md when escaping repository-derived content and configuring Mermaid. Mix Mermaid with hand-crafted CSS/SVG visuals: use Mermaid when relationships are graph-shaped (call graphs, dependencies, sequences), and hand-built divs/SVG when you want something more editorial (mass diagrams, cross-sections, collapse animations). Each candidate gets a before/after visualisation. Be visual.
For each candidate, render a card with:
Strong, Worth exploring, Speculative, rendered as a badgeEnd the report with a Top recommendation section: which candidate you'd tackle first and why.
Use the resolved active glossary's vocabulary for the domain, and the coding-engineer-skills:codebase-design vocabulary for the architecture. If that glossary defines "Order," talk about "the Order intake module," not "the FooBarHandler," and not "the Order service."
ADR conflicts: if a candidate contradicts an existing ADR, only surface it when the friction is real enough to warrant revisiting the ADR. Mark it clearly in the card (e.g. a warning callout: "contradicts ADR-0007, but worth reopening because…"). Don't list every theoretical refactor an ADR forbids.
See HTML-REPORT.md for the full HTML scaffold, diagram patterns, and styling guidance.
Do NOT propose interfaces yet. After the file is written, ask the user: "Which of these would you like to explore?"
Once the user picks a candidate, use the coding-engineer-skills:grilling skill to walk the decision tree with them: constraints, dependencies, the shape of the deepened module, what sits behind the seam, what tests survive.
Side effects happen inline as decisions crystallize; use the coding-engineer-skills:domain-modeling skill to keep the domain model current as you go:
GLOSSARY.md by default, or its active legacy path). Create a file lazily only when none exists at the resolved location; preserve unrelated terms and definitions.CONTEXT.md; do not create a competing glossary.coding-engineer-skills:codebase-design skill and its design-it-twice parallel sub-agent pattern.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
36 skills in this plugin
/ai-app-security-auditAudit AI and LLM apps for concrete security, tool, prompt, key, cost, and supply-chain risks./babysit-prFollow a GitHub PR through CI and review to a requested outcome, including as part of takeover./backlog-ready-specTurn ambiguous product or bug requests into de-duplicated, implementation-ready specs with acceptance criteria and validation.npx claudepluginhub cogine-ai/marketplace --plugin coding-engineer-skills