skills/improve-codebase-architecture/SKILL.md
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.
npx skillsauth add raphi011/skills improve-codebase-architectureInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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 references/LANGUAGE.md.
Key principles (see references/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 references/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. Create the file lazily if it doesn't exist.CONTEXT.md right there.development
Create polished, professional reveal.js presentations. Use when the user asks to create slides, a presentation, a deck, or a slideshow. Supports themes, multi-column layouts, code highlighting, animations, speaker notes, and custom styling. Generates HTML + CSS with no build step required.
tools
Use when writing Tailwind CSS v4 code, configuring Tailwind v4 with @theme or @variant directives, migrating from Tailwind v3 to v4, setting up CSS-native config (no tailwind.config.js), defining semantic color tokens, implementing dark mode with class-based @variant, creating design system tokens, or styling components with utility classes. Covers @import "tailwindcss", @theme blocks, @variant, @layer, CSS custom properties for colors, and common layout/component patterns.
development
Use whenever working with SurrealDB — writing queries, defining schemas, configuring indexes, debugging errors, handling record IDs, using the Go SDK, or discussing SurrealDB architecture. Activate on any mention of SurrealDB, SurrealQL, HNSW indexes, or surreal-related Go SDK code.
development
Use when visually verifying terminal UI rendering, testing TUI interactions, debugging Bubbletea display issues, or when asked to "test the TUI", "screenshot the terminal", "check what the TUI looks like", or "visually verify". Requires Kitty terminal with allow_remote_control and macOS for screencapture.