improve-codebase-architecture
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
Skill by solution8-com
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/solution8-com-improve-codebase-architecture
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: documents, frontend
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/improve-codebase-architecture
What's inside
- Skill name
improve-codebase-architecture- Description
- Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
- License
- MIT
- Instructions
- 67 lines in SKILL.md · view on GitHub
Files (2)
- HTML-REPORT.md
- SKILL.md
SKILL.md (first lines)
# Improve Codebase Architecture 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: - Use 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 — don't drift into "component," "service," "API," or "boundary." - The domain language in `GLOSSARY.md` gives names to good seams; ADRs in `docs/adr/` record decisions this command should not re-litigate. ## Process ### 1. Explore **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: - If the user named a direction — a module, a subsystem, a pain point — take it, and skip the inference below. - Otherwise, walk back a good stretch of the commit history (`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 project's domain glossary (`GLOSSARY.md`, or `CONTEXT.md` in an older repo) and any ADRs in the area you're touching first. Then spawn a sub-agent to walk the codebase. Don't follow rigid heuristics — explore organically and note where you experience friction: - Where does understanding one concept require bouncing between many small modules? - Where are modules **shallow** — interface nearly as complex as the implementation? - Where have pure functions been extracted just for testability, but the real bugs hide in how they're called (no **locality**)? - Where do tightly-coupled modules leak across their seams? - Which parts of the codebase are untested, or hard to test through their current interface? 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. ### 2. Present candidates as an HTML report Write a self-contained HTML file to `.claude/reports/<YYYY-MM-DD>-architecture-<slug>.html` - the report family's home, which `setup-repo` already gitignores. Open it for the user — `xdg-open <path>` on Linux, `open <path>` on macOS, `start <path>` on Windows — and tell them the absolute path. The report is a single self-contained HTML file: no CDNs, no external fonts, no network. Diagrams are hand-built - inline SVG when relationships are graph-shaped (call graphs, dependencies, sequences), positioned divs and 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: - **Files** — which files/modules are involved - **Problem** — why the current architecture is causing friction - **Solution** — plain English description of what would change - **Benefits** — explained in terms of locality and leverage, and how tests would improve - **Before / After diagram** — side-by-side, custom-drawn, illustrating the shallowness and the deepening - **Recommendation strength** — one of `Strong`, `Worth exploring`, `Speculative`, rendered as a badge End the report with a **Top recommendation** section: which candidate you'd tackle first and why. **Use GLOSSARY.md vocabulary for the domain, and the architecture vocabulary above for the architecture.** If `GLOSSARY.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 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](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?" ### 3. Grilling loop Once the user picks a candidate, run the `/grill-me` 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 — keep the domain model current as you go: - **Naming a deepened module after a concept not in the glossary?** Add the term to `GLOSSARY.md`, or to the older `CONTEXT.md` where the repo has one. Create `GLOSSARY.md` lazily if neither exists. - **Sharpening a fuzzy term during the conversation?** Update the glossary right there. - **User rejects the candidate with a load-bearing reason?** Note it in the report so the next architecture pass does not re-suggest the same thing. Do not write it anywhere durable - recording decisions is not this playbook's job. - **Want to explore alternative interfaces for the deepened module?** Design it twice: dispatch parallel sub-agents to draft competing interfaces, then compare.
From solution8-com/s8-agentic-playbook, MIT.
More from solution8-com/s8-agentic-playbook
- 0.565score
setup-repo
solution8-com
Set up a project repo - create it or adopt an existing one, then wire what the project actually needs.
SkillAFreshness: AClaude Code +9 - 0.565score
suggest
solution8-com
Point someone at the skill that fits what they are doing.
SkillAFreshness: AClaude Code +9 - 0.565score
start
solution8-com
Pick up an existing project cold by reading its state docs before doing anything else.
SkillAFreshness: AClaude Code +9 - 0.565score
review-suite
solution8-com
Run selected review passes — over-engineering, dead-code, duplication, security, authz-coverage, docs-drift, error-handling, standards — as parallel subagents…
SkillAFreshness: AClaude Code +9 - 0.561score
onboarding
solution8-com
Set the playbook up alongside a person's existing Claude setup, then show them where to start.
SkillAFreshness: AClaude Code +9 - 0.560score
orchestrate
solution8-com
Build a whole spec, or a set of issues, with parallel builder agents on one integration branch, then verify, review and hand over one pull request.
SkillAFreshness: AClaude Code +9 - 0.544score
diagnosing-bugs
solution8-com
Diagnosis loop for hard bugs and performance regressions.
SkillAFreshness: AClaude Code +9 - 0.544score
implement
solution8-com
Implement a piece of work based on a spec or set of tickets.
SkillAFreshness: AClaude Code +9 - 0.539score
tdd
solution8-com
Test-driven development.
SkillAFreshness: AClaude Code +9 - 0.536score
to-spec
solution8-com
Turn the current conversation into a spec and publish it to the project issue tracker — no interview, just synthesis of what you've already discussed.
SkillAFreshness: AClaude Code +9 - 0.532score
pr
solution8-com
Use when writing a PR body.
SkillAFreshness: AClaude Code +9 - 0.530score
retro
solution8-com
Conduct a retrospective on a coding session.
SkillAFreshness: AClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 1
- Last commit (this folder)
- Oct 6, 2026 (23 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from solution8-com
- 0.565score
setup-repo
solution8-com
Set up a project repo - create it or adopt an existing one, then wire what the project actually needs.
SkillAFreshness: AClaude Code +9 - 0.565score
start
solution8-com
Pick up an existing project cold by reading its state docs before doing anything else.
SkillAFreshness: AClaude Code +9 - 0.565score
suggest
solution8-com
Point someone at the skill that fits what they are doing.
SkillAFreshness: AClaude Code +9 - 0.565score
review-suite
solution8-com
Run selected review passes — over-engineering, dead-code, duplication, security, authz-coverage, docs-drift, error-handling, standards — as parallel subagents…
SkillAFreshness: AClaude Code +9 - 0.561score
onboarding
solution8-com
Set the playbook up alongside a person's existing Claude setup, then show them where to start.
SkillAFreshness: AClaude Code +9 - 0.560score
orchestrate
solution8-com
Build a whole spec, or a set of issues, with parallel builder agents on one integration branch, then verify, review and hand over one pull request.
SkillAFreshness: AClaude Code +9
Cite this page
improve-codebase-architecture skill. Agent Mart. https://agentmart.dev/skills/solution8-com-improve-codebase-architecture (last updated 2026-10-24)