improve-codebase-architecture
Skill4 starsChanged 10 days agoMITView on GitHub
Redesign module boundaries, ownership, and state to make recurring error classes impossible.
195 other projects use a version of this.
Adopted by
Most recently taken up by
- chrysogonus/power-agentstheir own version, first seen Nov 8, 2026
- caidanw/skillstheir own version, first seen Nov 8, 2026
- domengabrovsek/agent-configtheir own version, first seen Nov 8, 2026
- domengabrovsek/claudetheir own version, first seen Nov 8, 2026
- The-Vibe-Company/quivrtheir own version, first seen Nov 8, 2026
- miklschmidt/archboardtheir own version, first seen Nov 8, 2026
Used with
Projects with it also use migrate-to-shoehorn, request-refactor-plan and 7 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
simo97Skillmigrate-to-shoehorn
Migrate test files from `as` type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace `as` in tests, or needs partial test data.
Also in 73 projects that use this
simo97Skillrequest-refactor-plan
Use this skill when user wants to create a refactor plan.
Also in 43 projects that use this
liufeng1976Skillsetup-ts-deep-modules
Wire dependency-cruiser into a TypeScript repo so each package is a deep module — implementation hidden in subfolders, reachable only through its entry-point files. User-invoked.
Also in 43 projects that use this
FabienDehopreSkilldecision-mapping
Turn a loose idea into a sequenced map of investigation tickets, then drive them to resolution one at a time.
Also in 8 projects that use this
AnasX7Skillscaffold-exercises
Create exercise directory structures with sections, problems, solutions, and explainers that pass linting. Use when user wants to scaffold exercises, create exercise stubs, or set up a new course section.
Also in 69 projects that use this
AnasX7Skillsetup-pre-commit
Set up Husky pre-commit hooks with lint-staged (Prettier), type checking, and tests in the current repo. Use when user wants to add pre-commit hooks, set up Husky, configure lint-staged, or add commit-time formatting/typechecking/testing.
Also in 96 projects that use this
- +2 more from simo97
Other versions195 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 195
- mattpocock/skills★ 309ksame name
- danny-avila/LibreChat★ 47ksame name
- LibreChat-AI/LibreChat★ 47ksame name
- QuivrHQ/quivr★ 40ksame name
- The-Vibe-Company/quivr★ 40ksame name
- windmill-labs/windmill★ 18ksame name
- GreyDGL/PentestGPT★ 16ksame name
- humanlayer/humanlayer★ 13ksame name
- sanity-io/sanity★ 6.4ksame name
- ArcReel/ArcReel★ 6.3ksame name
185 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository117 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- accessibilitySkill
- agent-watchdogSkill
- aipSkill
- animateSkill
- animation-performanceSkill
- animation-vocabularySkill
- ask-benSkill
- ask-sonnerSkill
- bazelSkill
- bend-lawsSkill
- blast-radiusSkill
- brain-dumpSkill
- break-uiSkill
- ci-fixesSkill
- codebase-designSkill
- codex-compatSkill
- codexSkill
- commit-push-prSkill
- connect-querySkill
- create-verification-skillSkill
- demoSkill
- development-lifecycleSkill
- diagnosing-bugsSkill
- docsSkill
- dogfoodSkill
- domain-modelingSkill
- e2e-testingSkill
- effect-tsSkill
- effect-v3-to-v4Skill
- efficient-frontierSkill
- eli5Skill
- excalidraw-diagramSkill
- extend-harnessSkill
- frontend-invariantsSkill
- frontend-starter-kitSkill
- full-sendSkill
- gesturesSkill
- golang-reviewSkill
- golangSkill
- goSkill
- grillingSkill
- handoffSkill
- hook-auditSkill
- implement-specSkill
- improve-animationsSkill
- improveSkill
- launchdarklySkill
- lie-detectorSkill
- maintain-verification-skillSkill
- make-pr-easy-to-reviewSkill
- mobile-nativeSkill
- plan-arbiterSkill
- plow-aheadSkill
- postgresqlSkill
- primeSkill
- productSkill
- protobufSkill
- prototypeSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 4 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 184 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 11
Read-only invariant redesign.
- Distinctive: line 15
Call the Skill tool with "codebase-design" for vocabulary.
- Distinctive: line 18
Interface is the test surface: use its stable interface.
- Very specific: line 23
Read GLOSSARY.md and ADRs for settled names/decisions.
- Very specific: line 27
Scope before scanning -- YAGNI: Use the named module/error/pain point.
- Distinctive: line 33
Read REFERENCE.md. Prefer one source of truth over parallel bookkeeping, validated construction over repeated checks, explicit states over …
- Very specific: line 39
Write/open an HTML report at $TMPDIR/architecture-review-<timestamp>.html (fallback /tmp or %TEMP%).
- Distinctive: line 47
Call the Skill tool with "grilling": ownership, invariant, module shape, seam/adapters, dependencies, states, migration, rollback, …
“Common” is measured: kept by at least 6 in 10 of the 184 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Read-only invariant redesign. Generic audit: /improve; implementation: /development-lifecycle.
Vocabulary
Call the Skill tool with "codebase-design" for vocabulary. Other hosts: dependency loading.
- Deletion test: removing a deep module spreads hidden complexity into callers.
- Interface is the test surface: use its stable interface.
- Two adapters justify a seam: one adapter is hypothetical.
- Single source of truth: one owned representation, not parallel lists, flags, registries, validators or lifecycles.
- Structural invariant: construction/transitions make invalid states impossible or unrepresentable.
Read GLOSSARY.md and ADRs for settled names/decisions.
1. Frame
Scope before scanning -- YAGNI. Use the named module/error/pain point; otherwise git log --name-only --format= for hot spots. Widen only when history is scattered.
Explore inline; delegation needs explicit consent and fresh contexts. Prefer graph tools. Map interfaces, dependencies/calls, data ownership/writers, transitions, failures and public tests.
2. Find opportunities
Read REFERENCE.md. Prefer one source of truth over parallel bookkeeping, validated construction over repeated checks, explicit states over illegal flag combinations, and one deep interface over caller choreography.
For each error class: permissive representation, invariant, why callers cannot recreate it. Regression tests verify design, not architecture.
3. Present
Write/open an HTML report at $TMPDIR/architecture-review-<timestamp>.html (fallback /tmp or %TEMP%); return its path. Follow HTML-REPORT.md. Call the Skill tool with "excalidraw-diagram" only for useful editable before/after evidence.
Candidates: files/evidence, error class, current/proposed invariant, owner/module/interface/seam before/after, locality/leverage/testing gain, migration, rollback, compatibility risk, Strong|Worth exploring|Speculative confidence.
End with Top recommendation; do not finalize interfaces. Ask which candidate to explore.
4. Grill
Call the Skill tool with "grilling": ownership, invariant, module shape, seam/adapters, dependencies, states, migration, rollback, observable tests.
- New term -> Call the Skill tool with "domain-modeling" for a glossary proposal; durable rejection -> offer ADR. Write only with edit authority.
- Competing interfaces -> design twice with the loaded codebase-design guidance.
- Visual proposal/competing proposals -> Call the Skill tool separately with "visual-plan"/"plan-arbiter".
- Implementation -> reversible sequence for
/development-lifecycle.
Done: evidenced error class -> proposed owner/invariant -> reversible migration -> public-contract verification; clear next choice. Design claims to verify at implementation, not changes or passing tests from this read-only review.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

