codebase-design
Skill4 starsChanged 10 days agoMITView on GitHub
Design deep modules with small interfaces. Use when choosing seams, reducing file-hop friction, deepening modules, testing APIs, or applying shared design vocabulary.
194 other projects use a version of this.
Adopted by
Most recently taken up by
- chrysogonus/power-agentstheir own version, first seen Nov 8, 2026
- wowyuarm/dsh-agent-teamtheir own version, first seen Nov 8, 2026
- Contexera/dsh-agent-teamtheir own version, first seen Nov 8, 2026
- sgaabdu4/appwrite-backendtheir own version, first seen Nov 8, 2026
- The-Vibe-Company/quivrtheir own version, first seen Nov 8, 2026
- dhruvsaxena1998/skillstheir own version, first seen Nov 8, 2026
Used with
Projects with it also use setup-ts-deep-modules, decision-mapping and 3 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.
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
RoentekSkillloop-me
Grill me about specs for the workflows I want to build, within this workspace.
Also in 55 projects that use this
ryotaroh180105Skillclaude-handoff
Hand the current conversation off to a fresh background agent that picks up the work immediately.
Also in 41 projects that use this
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 56 projects that use this
Other versions194 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 194
- 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
- MODSetter/SurfSense★ 17ksame name
- GreyDGL/PentestGPT★ 16ksame name
- formbricks/formbricks★ 13ksame name
- humanlayer/humanlayer★ 13ksame name
184 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
- 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
- improve-codebase-architectureSkill
- 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
5 rules. 0 are common, 3 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 181 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 9
Use GLOSSARY.md terms, via GLOSSARY-MAP.md when present.
- Distinctive: line 35
Ask whether methods/parameters can shrink and more complexity can hide.
- Distinctive: line 40
Deletion test: if removal makes complexity vanish, the module was pass-through.
- Distinctive: line 57
When two designs survive deletion, Call the Skill tool with "plan-arbiter": depth, locality, test surface, rollback.
- Very specific: line 61
Read DEEPENING.md for cleanup/dependencies/tests.
“Common” is measured: kept by at least 6 in 10 of the 181 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
On interface/type/shared-state changes, read Poteto.
Design deep modules: substantial behavior behind a small, independently testable interface. Apply verifiability: caller leverage and locality, not implementation size.
Use GLOSSARY.md terms, via GLOSSARY-MAP.md when present; respect ADRs.
Reduce caller knowledge/coordination; preserve required behavior.
Imports: checks.
Glossary
Use exactly:
Module -- interface plus implementation: function, class, package, slice.
Interface -- everything callers know: types, invariants, ordering, errors, config, performance; broader than signature.
Implementation -- module internals.
Depth -- interface leverage. Deep means small interface/large behavior; shallow means similar interface and implementation complexity.
Seam -- where behavior can vary without editing the caller; its interface lives here. Avoid: boundary, except DDD bounded context.
Adapter -- concrete implementation at a seam, named by role.
Leverage -- capability per interface learned.
Locality -- change, bugs, knowledge, verification concentrate together.
Ask whether methods/parameters can shrink and more complexity can hide.
Principles
- Depth is an interface property, not line ratio; private seams need not leak.
- Deletion test: if removal makes complexity vanish, the module was pass-through; if complexity spreads into callers/tests, it earned its keep.
- The interface is the test surface: callers and tests cross the same seam. Testing past it signals a weak shape.
- One adapter is a hypothetical seam; Two adapters means a real one.
- Direct local code beats an abstraction that only moves code.
Caller-first sketch
For new/changed interfaces, sketch caller success and failure before types. Name state owner, invariant and failure result. Derive signatures; apply probe.
Testability
- Exercise the public interface with a focused command and repeatable fixture.
- Control dependencies at existing seams; return observable results and isolate state.
- Expose invariants and failure diagnostics; prove wrong behavior fails through the public interface.
When two designs survive deletion, Call the Skill tool with "plan-arbiter": depth, locality, test surface, rollback. Other hosts: dependency loading.
Reject depth-by-line-count, interface-as-TypeScript-keyword, and vague boundary wording.
Read DEEPENING.md for cleanup/dependencies/tests; DESIGN-IT-TWICE.md for alternatives.
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.

