com um clique
improve-codebase-architecture
// Find architecture improvements: consolidate modules, improve testability and AI navigation. Trigger: improve architecture, refactor.
// Find architecture improvements: consolidate modules, improve testability and AI navigation. Trigger: improve architecture, refactor.
Read and post to Twitter/X via the `bird` CLI — tweets, threads, search, timelines, bookmarks, follows, lists, media.
Ultra-compressed communication mode. Cuts tokens ~75%. Levels: lite, full, ultra, wenyan-lite/full/ultra. Trigger: /caveman, "be brief".
Write codebase docs: README, architecture, API, comments. Project structure and getting-started focus.
Compress memory files (CLAUDE.md, todos) to caveman format. Backup saved as FILE.original.md. Trigger: /caveman:compress <filepath>.
React/Preact frontend conventions: TanStack Query for server state, 8-section components, no TypeScript, no barrel files.
Manage Hetzner Cloud infrastructure via the hcloud CLI. Trigger: "hcloud", "hetzner", any Hetzner task.
| name | improve-codebase-architecture |
| description | Find architecture improvements: consolidate modules, improve testability and AI navigation. Trigger: improve architecture, refactor. |
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.