codebase-design
Skill2 starsChanged 2 months agoMITView on GitHub
Designs deep modules with a fixed vocabulary (module, interface, depth, seam, adapter, leverage, locality), either shaping one module's interface or surveying a codebase for deepening opportunities and ranking them in a report. Use when the user runs /codebase-design, asks to "design this module's interface", "where should the seam go", "improve the codebase architecture" or "find refactoring opportunities"; not for implementing a chosen refactor (use /deliver) or reviewing a diff (use two-axis-review).
193 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- quarkiverse/quarkus-reactive-messaging-nats-jetstreamtheir own version, first seen Nov 30, 2026
- Rain-kl/OpenFlaretheir own version, first seen Nov 30, 2026
- Forget-C/Jellyfishtheir own version, first seen Nov 29, 2026
- ctaxnagomi/agent-kd-skilltheir own version, first seen Nov 29, 2026
- karanmrn/karanagentskillstheir own version, first seen Nov 29, 2026
- christopherkarani/rvtheir own version, first seen Nov 29, 2026
Used with
Projects with it also use decision-mapping, setup-ts-deep-modules and 9 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.
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
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 53 projects that use this
RoentekSkillloop-me
Grill me about specs for the workflows I want to build, within this workspace.
Also in 66 projects that use this
LesaniSkillwriting-beats
Shape an article as a journey of beats, choose-your-own-adventure style. The user picks a starting beat from the raw material, you write only that beat, then offer options for where to pivot next, beat by beat, until the article reaches a natural end. Use when the user has raw material and wants to assemble it as a narrative rather than an argument.
Also in 71 projects that use this
LesaniSkillwriting-shape
Take a markdown file of raw material and shape it into an article through a conversational session — drafting candidate openings, growing the piece paragraph by paragraph, arguing about format (lists, tables, callouts, quotes) at each step. Use when the user has a pile of notes, fragments, or a rough draft and wants help turning it into something publishable.
Also in 72 projects that use this
AWSSkillto-questionnaire
Turn a decision you can't fully answer into a questionnaire for someone else to fill in.
Also in 109 projects that use this
- +1 more from Lesani
Other versions193 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- eralmansouri/skills★ 915% same
Wrote their own version · 192
- mattpocock/skills★ 335ksame name
- danny-avila/LibreChat★ 48ksame name
- LibreChat-AI/LibreChat★ 48ksame name
- QuivrHQ/quivr★ 40ksame name
- The-Vibe-Company/quivr★ 40ksame name
- windmill-labs/windmill★ 19ksame name
- MODSetter/SurfSense★ 17ksame name
- GreyDGL/PentestGPT★ 16ksame name
- formbricks/formbricks★ 13ksame name
- humanlayer/humanlayer★ 13ksame name
182 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 repository83 other files it gives its agents.
- AGENTS.mdAGENTS.md
- author-skillSkill
- skill-doctorSkill
- agent-codebase-analyzerSkill
- agent-codebase-locatorSkill
- agent-codebase-pattern-finderSkill
- agent-implementation-reviewerSkill
- agent-implementerSkill
- agent-outline-implementerSkill
- agent-slack-control-planeSkill
- agent-web-search-researcherSkill
- babysitSkill
- ci-commitSkill
- configure-model-routingSkill
- create-design-discussionSkill
- create-epic-planSkill
- create-planSkill
- create-prdSkill
- create-research-questionsSkill
- create-researchSkill
- create-structure-outlineSkill
- create-tddSkill
- deliverSkill
- describe-prSkill
- extract-figma-visualsSkill
- feature-conformanceSkill
- fix-bugSkill
- fix-code-reviewSkill
- gather-sourcesSkill
- group-reviewSkill
- herd-nextSkill
- implement-outlineSkill
- implement-planSkill
- iterate-design-discussionSkill
- iterate-evidenceSkill
- iterate-implementationSkill
- iterate-planSkill
- iterate-prdSkill
- iterate-research-questionsSkill
- iterate-researchSkill
- iterate-structure-outlineSkill
- iterate-tddSkill
- jev-uiSkill
- land-pr-stackSkill
- record-evidenceSkill
- reproduce-bugSkill
- resolve-pr-reviewsSkill
- review-artifact-commentsSkill
- review-codeSkill
- route-modelSkill
- safety-danceSkill
- security-checkSkill
- start-epic-deliverySkill
- static-implementation-auditSkill
- test-appSkill
- typed-judgmentSkill
- verify-implementationSkill
- video-iterative-developmentSkill
- video-iterative-orchestrationSkill
- diagnosing-bugsSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 5 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 183 edited versions we read keep these.
5
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
- Distinctive: line 6
Read the writing guide and the collection conventions before drafting, revising, or replying.
- Distinctive: line 17
Use these terms exactly in every reply and report.
- Distinctive: line 37
One adapter is a hypothetical seam; two make a real one: Add a seam only where something varies across it, usually production and test.
- Very specific: line 42
Read the module, its callers and tests.
- Distinctive: line 44
Write the interface: entry points, parameters, invariants, error modes, and a two-line caller example.
- Distinctive: line 45
When the shape is contested or the user wants options, follow design_it_twice.md, which holds the parallel-worker pattern for drafting …
- Very specific: line 64
Stop: Ask which candidate to explore.
“Common” is measured: kept by at least 6 in 10 of the 183 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 the writing guide and the collection conventions before drafting, revising, or replying; a checkout of the collection has both under shared/.
Codebase design
Aim for deep modules: much behavior behind a small interface, at a seam where something really varies, tested through that interface. Pick the job from the request:
- Design one module's interface or seam: follow Design a module.
- Survey a codebase or area for deepening opportunities: follow Survey for deepening.
Vocabulary
Use these terms exactly in every reply and report. Do not substitute component, service, unit, API, signature, boundary, layer or wrapper.
| Term | Meaning |
| Module | Anything with an interface and an implementation, at any scale: function, class, package, slice across tiers |
| Interface | Everything a caller must know to use the module: types, plus invariants, ordering, error modes, required config, performance |
| Implementation | The code inside the module |
| Depth | Behavior a caller or test can exercise per unit of interface learned. Deep: small interface, much behavior. Shallow: interface nearly as complex as the implementation |
| Seam | The place where behavior can change without editing there; where an interface lives. Placing it is its own decision |
| Adapter | A concrete thing filling a seam; names a role, not a size |
| Leverage | What callers gain from depth: one implementation pays back across every call site and test |
| Locality | What maintainers gain from depth: change, bugs and verification concentrate in one place |
Depth is measured as leverage, not as a ratio of implementation lines to interface lines, which rewards padding.
Principles
- Depth lives in the interface. A deep module may be built from small swappable parts; they are internal seams, used by its own tests and never exposed.
- Deletion test. Imagine deleting the module. If complexity vanishes, it was a pass-through. If complexity reappears across callers, it earns its place.
- The interface is the test surface. Callers and tests cross the same seam. A test that has to reach past the interface means the module has the wrong shape.
- One adapter is a hypothetical seam; two make a real one. Add a seam only where something varies across it, usually production and test.
- Accept dependencies, return results. Pass collaborators in rather than constructing them inside; return values rather than mutating arguments. Both keep the module testable through its interface.
Design a module
- Read the module, its callers and tests. Read
GLOSSARY.mdand ADRs indocs/adr/when they exist; use their domain names for modules and do not reopen a recorded decision without new friction. - Classify each dependency with deepening.md, which holds the four dependency categories, seam rules and the replace-don't-layer test strategy. Load it whenever a dependency crosses I/O or a network.
- Write the interface: entry points, parameters, invariants, error modes, and a two-line caller example. Ask of each draft: can it have fewer entry points, simpler parameters, more hidden inside?
- When the shape is contested or the user wants options, follow design_it_twice.md, which holds the parallel-worker pattern for drafting three or four radically different interfaces and comparing them.
- Reply with the chosen interface, what it hides, the seam and its adapters, and which existing tests it replaces.
Survey for deepening
The survey changes no file in the repository. It ends with a ranked list.
- Scope. Take the area the user named. Otherwise run
git log --oneline -200 --name-onlyand start from the files that change most; widen only when changes are scattered. - Explore. Read
GLOSSARY.mdand ADRs when present, then walk the area, in a fresh child worker when the runtime has one. Note friction: one concept spread over many small modules, interfaces as wide as their implementations, logic extracted for testing whose bugs live in the callers, coupling that leaks across seams, code untestable through its current interface. Apply the deletion test to each suspect. - Rank. For each candidate record files, problem, proposed deepening, dependency category from deepening.md, wins in vocabulary terms, and strength
Strong,Worth exploringorSpeculative. Flag a candidate that contradicts an ADR only when the friction justifies reopening it. Report. Reply with the ranked list, top candidate first, in this shape:
1. Fold `src/orders/OrderFacade.mjs` into the order intake module (Strong, in-process) Problem: OrderFacade forwards every call unchanged; deleting it moves no complexity. Wins: interface shrinks by one module; tests hit one seam.When the user asks for a visual report, or there are more than five candidates, also write the HTML page described in html_report.md, which holds the page scaffold, before-and-after diagram patterns and style rules. Write it to the OS temp directory, never the repository, and give its absolute path.
- Stop. Ask which candidate to explore. Designing its interface is the Design job above; implementing it is a normal change through
/deliver.
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.

