/dominiks-skills:improve-codebase-architecturefrom dominiks-skills
Find deepening opportunities in a codebase, informed by the domain language in CONTEXT.md and the decisions in docs/adr/. Use when the user wants to improve architecture, find refactoring opportunities, consolidate tightly-coupled modules, or make a codebase more testable and AI-navigable.
Ships in dominiks-skills. 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. The domain language gives names to good seams; ADRs record decisions the skill should not re-litigate.
Read the project's domain glossary and any ADRs in the area you're touching first.
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."
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.ghWhen a deepening opportunity is approved for execution, file it as a parent epic + sub-issues following the conventions (see top-level README): gh CLI only, parent body lists - [ ] #N checkboxes, each sub has Parent: #N, every sub ships a Test Strategy with a tracer-bullet test. Implementation must follow Pocock-style TDD (tdd skill) — vertical slices, one test → minimal impl.
PARENT=$(gh issue create \
--title "Deepen: <module name>" \
--label "enhancement,refactor,epic,needs-triage" \
--body "$(cat <<'EOF'
## Deepening Opportunity
<problem from candidate list — friction the current shallow shape causes>
## Proposed Module
<name + interface sketch (signature, invariants, error modes, ordering, config) — using CONTEXT.md vocabulary>
## Sub-issues
- [ ] #TBD — <slice 1>
- [ ] #TBD — <slice 2>
## Acceptance Criteria (overall)
- [ ] Old shallow modules deleted (or marked deprecated)
- [ ] All call sites migrated to the new seam
- [ ] Tests now go through the new interface, not internals
- [ ] No regressions
## Test Strategy (overall)
| Category | Scenario | Outcome |
|---|---|---|
| Tracer bullet | One test through the new interface that proves the deepened behavior | Observable |
| Regression | Existing functionality continues to pass | All green |
EOF
)" --json number --jq .number)
Hand off to /to-issues to decompose into sub-slices, or file each sub manually with Parent: #${PARENT} and a Test Strategy table.
If a candidate is rejected with a load-bearing reason, offer to write an ADR (per the rule above) instead of filing an issue.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
Generated from the plugin's indexed repository (dominikdorfstetter/skills) — no native marketplace selected
npx claudepluginhub p/dominikdorfstetter-dominiks-skills25 skills in this plugin
/add-backend-endpointAdd a new backend HTTP endpoint following the project's existing conventions — language and framework agnostic. Walks the layers (schema → repo → handler → routing → spec → client wiring), TDD-first. Use when adding a new API route to a backend codebase./add-list-pageScaffold a new CRUD list page in any frontend codebase — language and framework agnostic. Walks the layers (data fetch, mutations, RBAC, loading/empty/error, i18n, accessibility, UX polish), TDD-first. Use when adding a list/management page to a UI codebase./architect-reviewArchitectural evaluation of a codebase. Finds tech debt, missing patterns, coverage gaps, design inconsistencies; files parent + sub-issues via `gh`. Use when user asks for an architecture review, codebase evaluation, or wants to know what to fix structurally.