/dev-workflow:improve-codebase-architecturefrom dev-workflow
Finds deepening opportunities in a codebase by analyzing domain language in CONTEXT.md and decisions in docs/adr/. Helps refactor tightly-coupled modules for testability and AI-navigability.
Ships in dev-workflow. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
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.
Use these terms exactly in every suggestion. Consistent language is the point — don't drift into "component," "service," "API," or "boundary." Full definitions in LANGUAGE.md.
Key principles (see LANGUAGE.md for the full list):
This skill is informed by the project's domain model when one is available. The domain language gives names to good seams; ADRs record decisions the skill should not re-litigate.
Domain glossary check. Before exploring code:
CONTEXT.md / domain glossary, read it. If docs/adr/ exists, read ADRs in the area you're touching.CONTEXT.md does NOT exist, surface this to the user — say something like: "This project has no CONTEXT.md. I'll proceed using LANGUAGE.md architectural vocabulary, but my candidate names will be generic. Want me to seed a CONTEXT.md once we identify the first deepening candidate's domain, or proceed without?" Don't block on the answer — proceed if AFK.docs/adr/ does NOT exist, mention it once at the moment a candidate would warrant an ADR (Step 3) — not up front.Then use the Agent tool with subagent_type=Explore 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.
Present a numbered list of deepening opportunities. For each candidate:
Use CONTEXT.md vocabulary for the domain, and LANGUAGE.md vocabulary for the architecture. If CONTEXT.md defines "Order," talk about "the Order intake module" — not "the FooBarHandler," and not "the Order service." If no CONTEXT.md exists yet, name candidates with the most domain-precise term you can extract from the code, and flag the term as a candidate to seed CONTEXT.md with.
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 (e.g. "contradicts ADR-0007 — but worth reopening because…"). Don't list every theoretical refactor an ADR forbids.
Do NOT propose interfaces yet. Ask the user: "Which of these would you like to explore?"
Once the user picks a candidate, drop into a grilling conversation. Walk the design 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:
CONTEXT.md? Add the term to CONTEXT.md — same discipline as /grill-with-docs (see CONTEXT-FORMAT.md). Create the file lazily if it doesn't exist.CONTEXT.md right there.grill-with-docs — peer producer of CONTEXT.md. Use when the conversation is about a plan (not yet code); use this skill when the conversation is about existing code shape. They share CONTEXT-FORMAT.md and ADR-FORMAT.md discipline.diagnose — after a diagnose session ends with "no correct seam exists for the regression test," that's the trigger for this skill. The bug is telling you the architecture needs deepening.deep-plan — once you've picked a candidate and grilled it, use deep-plan to turn the chosen deepening into a phased, worktree-isolated implementation plan.Adapted from mattpocock/skills — engineering/improve-codebase-architecture. License: MIT.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
architecture, refactoring, codebase-analysis, deepening, testability
npx claudepluginhub davie521/claude-skills --plugin dev-workflow10 skills in this plugin
/cavemanUltra-compressed communication mode. Substantially cuts token usage by dropping filler, articles, and pleasantries while keeping full technical accuracy. Designed for English output; limited effect on Chinese conversations. TRIGGER only on explicit invocation: user says "caveman mode", "talk like caveman", "use caveman", or invokes /caveman. DO NOT TRIGGER when user merely asks for a short or concise answer — that is a one-off style request, not a switch into this persistent mode.
/cleanupEnd-of-session cleanup: shut down every process the session started, find code-vs-doc mismatches and update the DOCS to match the code (code is the source of truth; never rewrite code just to match a doc), drive leftover tasks to zero (finish or explicitly report), and persist lessons learned to memory. Each phase must end with an explicit done / not-needed verdict — no silent skipping. Use when the user says 'cleanup', '收尾', '清理现场', '打扫', wants to wrap up a work session, or before handing off / ending a long task./cprAutomated Git PR workflow: detect status → commit → create PR → run CI and a Codex review in parallel → fix CI failures and the review findings that need it → re-review until the review of the current HEAD passes (no CRITICAL/HIGH introduced or enlarged by the PR) → auto-merge. Stops only when a user decision is needed. Use when user says 'cpr' or 'cl', or wants to push code through the full PR pipeline.Other plugins' skills for the same job