codebase-design
Skill45k starsChanged 4 months agoMITView on GitHub
Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.
139 other projects use a version of this, 87 of them edited; 15 of 82 edited versions we compared changed its rules; 0 new projects in the last 4 weeks, against 3 the 4 before.
How people change it
15 of 82 edited versions changed its rules.
Of the 82 edited versions we compared: 67 keep every rule, 15 made changes of their own.
Rules people drop
- Use these terms exactly — don't substitute "component," "service," "API," or "boundary." Consistent language is the whole point.dropped by 7 of 15
- When designing an interface, ask:dropped by 2 of 15
We split this file and each edited version into the rules they give an agent and match them by wording. A version that adds no rule of its own and has not changed since this file last did reads as an older text, so what it lacks is not counted as dropped. We keep no past texts of a file, so that is inferred, and an edited version that started from an older text still counts its gaps as drops.
Adopted by
Cooling: 0 new projects took it in the last 4 weeks, 0× the 4 weeks before.thin data
Most recently taken up by
- mattpocock/skillsedited, first seen Oct 8, 2026
- rafaelob/pragmatic-agent-skillsedited, first seen Oct 5, 2026
- hmjBill/skillsedited, first seen Oct 5, 2026
- AlexisBalayre/claude-code-configedited, first seen Oct 5, 2026
- KroxiDev/engineering-skillstheir own version, first seen Oct 5, 2026
- gordon1210/reposcoutword for word, first seen Oct 4, 2026
Who's talking about LibreChat-AI/LibreChat
- @github-trending-js.bsky.social“📦 LibreChat-AI / LibreChat ⭐ 45,914 (+69) 🗒 TypeScript Enhanced ChatGPT Clone: Features Agents, MCP, …”Bluesky · Oct 18, 2026 · 2 likes
- LibreChat-AI/admin-panel“fix(auth): handle ended sessions and retry temporary failures”GitHub · Nov 17, 2026 · 1 reactions
- LibreChat-AI/docs“🪪 docs: Document the permissionPrincipalLookups Concurrency Key”GitHub · Nov 13, 2026 · 1 reactions
- genclass-dev/GenClass“Automated issue spam targeting open source projects”GitHub · Nov 7, 2026 · 1 reactions
- @github-trending-js.bsky.social“📦 LibreChat-AI / LibreChat ⭐ 46,602 (+61) 🗒 TypeScript Enhanced ChatGPT Clone: Features Agents, MCP, …”Bluesky · Nov 1, 2026 · 1 likes
The biggest 5 of 52 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 52
Talked about on GitHub and Bluesky (52 times).
On GitHub · 50
- Nov 17, 2026fix(auth): handle ended sessions and retry temporary failures — LibreChat-AI/admin-panel1 reaction · 8 comments
- Nov 13, 2026🪪 docs: Document the permissionPrincipalLookups Concurrency Key — LibreChat-AI/docs1 reaction · 3 comments
- Nov 7, 2026Automated issue spam targeting open source projects — genclass-dev/GenClass1 reaction · 6 comments
- Sep 15, 2026🔖 feat: Anchor GPT-5.6 Cache Breakpoint to the Stable Prefix — LibreChat-AI/agents1 reaction · 2 comments
- Nov 23, 2026[upstream #18745] #18745: csp.spec.js beforeAll exceeds 30 s under quality coverage — berry-13/LibreChat0 reactions
45 more on GitHub
- Nov 21, 2026LibreChat: Unauthorized File Content Access via Chat Attachment file_id — NixOS/nixpkgs0 reactions
- Nov 20, 2026[upstream #18572] #18572: Let users re-pin composer chips after unpinning — berry-13/LibreChat0 reactions
- Nov 17, 2026agent-skills.github.librechat-ai.librechat: 0.8.8 → 0.8.9 — sudosubin/agents.nix0 reactions
- Nov 10, 2026🔎 docs: Widen the mcpCatalogLookups Scope to Agent Tool Assembly — LibreChat-AI/docs0 reactions · 4 comments
- Nov 2, 2026⏱️ docs: Document the Web-Search Reranker Timeout and the `image_gen_oai` Budget — LibreChat-AI/docs0 reactions · 1 comment
- Oct 31, 2026build(deps): bump @librechat/data-schemas from 0.0.74 to 0.0.77 — vsivasamy/MahathiChat-Admin0 reactions
- Oct 29, 2026🪪 docs: Document the Option to Sync Only Existing Entra ID Groups — LibreChat-AI/docs0 reactions · 1 comment
- Oct 29, 2026⚡ docs: Document Performance and Retention Config Keys — LibreChat-AI/docs0 reactions · 3 comments
- Oct 26, 2026fix: mount new inputs before replaying programmatic calls — LibreChat-AI/code-interpreter0 reactions
- Oct 26, 2026fix: preserve MCP file artifacts in programmatic tool calls — LibreChat-AI/agents0 reactions
- Oct 22, 2026[upstream #17357] Validate the theme docs page against the appearance key manifest — berry-13/LibreChat0 reactions
- Oct 21, 2026feat(agent): 실행 추적과 지연 도구 검색을 추가한다 — dungsil/keundal0 reactions · 3 comments
- Oct 21, 2026[upstream #17030] #17030: Give pauses of one generation a server-assigned order — berry-13/LibreChat0 reactions · 2 comments
- Oct 20, 2026[upstream #17268] #17268: Input padding and adornments do not mirror under RTL — berry-13/LibreChat0 reactions
- Oct 19, 2026[upstream #17270] LibreChat-AI/LibreChat#17270: Stop automatic speech before a provider request once the client left — berry-13/LibreChat0 reactions
- Oct 19, 2026🔗 fix: Resolve Sandbox File Links Across the Conversation — aproorg/LibreChat0 reactions · 1 comment
- Oct 19, 2026🔗 fix: Resolve Sandbox File Links to the Turn's Attachments — aproorg/LibreChat0 reactions
- Oct 18, 2026feat: add five independent LibreChat service plugins — AceDataCloud/LibreChatPlugins0 reactions
- Oct 16, 2026[upstream #16809] PR #16809: Run the code environment reconciler in one worker without Redis — berry-13/LibreChat0 reactions
- Oct 14, 2026[upstream #17048] #17048: Replace the log email regexes with a linear scanner and a coverage contract — berry-13/LibreChat0 reactions
- Oct 14, 2026[upstream #17054] Upstream PR 17054: capture the replaced MCP config atomically for the update audit — berry-13/LibreChat0 reactions
- Oct 14, 2026[upstream #17054] Upstream PR 17054: keep audit chain continuity across a full retention purge — berry-13/LibreChat0 reactions
- Oct 14, 2026[upstream #17033] 17033: Shared-link erasure races legacy ACL auto-migration — berry-13/LibreChat0 reactions
- Oct 14, 2026🐳 fix: Publish Admin Panel Image Under Repository Organization — LibreChat-AI/admin-panel0 reactions
- Oct 14, 2026[upstream #17053] #17053: Base the resource lease on the database clock — berry-13/LibreChat0 reactions
- Oct 14, 2026[upstream #17052] 17052: Make OpenID login role-change auditing atomic with the role write — berry-13/LibreChat0 reactions
- Oct 14, 2026[upstream #17049] LibreChat-AI/LibreChat#17049: Agent tool-resource link left behind when the file record write fails — berry-13/LibreChat0 reactions
- Oct 14, 2026[upstream #17053] #17053: Expose the permission lease timing in configSchema — berry-13/LibreChat0 reactions
- Oct 12, 2026[upstream #17033] 17033: Keep Mongoose types out of the eraseUserData dependency contract — berry-13/LibreChat0 reactions
- Oct 11, 2026[upstream #16961] 16961: Persist the reviewer's approval decision on resumed tool calls — berry-13/LibreChat0 reactions
- Oct 11, 2026Update All Docker — pedorich-n/home-server-nixos0 reactions
- Oct 10, 2026[upstream #16961] PR 16961: Include the ask-user part in the stored content union — berry-13/LibreChat0 reactions
- Oct 4, 2026[upstream #16736] LibreChat-AI/LibreChat#16736: Route .prose-only quote bars through the prose-quote-bar role — berry-13/LibreChat0 reactions
- Oct 4, 2026[upstream #16552] #16552: Never reopen a durable ordinary reply with a late disconnect snapshot — berry-13/LibreChat0 reactions
- Oct 4, 2026[upstream #16719] #16719: token search does not use its indexes on DocumentDB planner v1 — berry-13/LibreChat0 reactions
- Oct 3, 2026agent-skills.github.librechat-ai.librechat: init at 0.8.8 — sudosubin/agents.nix0 reactions
- Oct 3, 2026[upstream #16632] #16632: Resolve a detached run only from a fresh status and server-returned history — berry-13/LibreChat0 reactions
- Oct 3, 2026[upstream #16632] #16632: Release a follow-up queued behind an off-screen admitted successor — berry-13/LibreChat0 reactions
- Oct 3, 2026[upstream #16708] #16708: Base the native web search warning on effective provider settings — berry-13/LibreChat0 reactions
- Oct 3, 2026[upstream #14701] #14701: Enforce the local parser size limit before uploading a Context document — berry-13/LibreChat0 reactions
- Oct 3, 2026[upstream #14701] #14701: Answer coded upload refusals with fixed messages even without redaction — berry-13/LibreChat0 reactions
- Oct 3, 2026[upstream #14505] Expose import concurrency and shard-size limits through configSchema — berry-13/LibreChat0 reactions
- Oct 2, 2026[upstream #15959] Forward endpoint prompt-cache retention to cross-provider summarizers — berry-13/LibreChat0 reactions
- Oct 2, 2026[upstream #15959] Explicit prompt-cache breakpoints with one model capability gate — berry-13/LibreChat0 reactions
- Oct 2, 2026[upstream #16643] #16643: Keep one project editor per project, or reject a stale save — berry-13/LibreChat0 reactions
On Bluesky · 2
- Oct 18, 2026📦 LibreChat-AI / LibreChat ⭐ 45,914 (+69) 🗒 TypeScript Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS,… — @github-trending-js.bsky.social2 likes and reposts
- Nov 1, 2026📦 LibreChat-AI / LibreChat ⭐ 46,602 (+61) 🗒 TypeScript Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS,… — @github-trending-js.bsky.social1 likes and repost
Used with
Projects with it also use writing-beats, writing-shape and 10 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.
RoentekSkillwriting-beats
Writing, exploit — assemble raw material into a journey of beats, grounding each term before a beat leans on it.
Also in 23 projects that use this
RoentekSkillwriting-shape
Writing, exploit — shape raw material into an article, paragraph by paragraph.
Also in 23 projects that use this
loulanyueSkillsetup-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 16 projects that use this
risadamsSkillwhich-skill
Router over this pack's skills and flows. Ask it "which skill fits X" when you don't remember what's available.
Also in 5 projects that use this
pahwarangerSkillsetup-skills
Sets up an `## Agent skills` block in AGENTS.md/CLAUDE.md and `docs/agents/` so the engineering skills know this repo's ticket tracker (GitHub or local markdown), triage label vocabulary, and domain doc layout. Run before first use of `to-tickets`, `to-prd`, `triage`, `diagnose`, `tdd`, `improve-codebase-architecture`, or `zoom-out` — or if those skills appear to be missing context about the ticket tracker, triage labels, or domain docs.
Also in 7 projects that use this
qhuang20Skillmigrate-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 24 projects that use this
- +2 more from Roentek
Other versions139 projects use a version of this.
Word for word · 37
- Tiberriver256/mcp-server-azure-devops★ 393100% same
- ninehills/skills★ 280100% same
- loulanyue/skills★ 231100% same
- willdady/platypus★ 114100% same
- scibly-dev/scibly★ 42100% same
- ivanrvpereira/.agents★ 18100% same
- julianromli/faiz-skills★ 16100% same
- evist0/okf-matt-skills★ 13100% same
- PanPanFR/oh-my-kilo★ 12100% same
- michielvandermeer/skills★ 9100% same
27 more not listed
Edited · 87
- mattpocock/skills★ 335k100% same
- vinvcn/mattpocock-skills-zh-CN★ 4.6k18% same
- nodetool-ai/nodetool★ 55197% same
- mxyhi/ok-skills★ 492100% same
- aws/graph-explorer★ 484100% same
- bighadj22/codflow★ 338100% same
- ayoubben18/ab-method★ 19274% same
- tt-a1i/matt-skills-with-to-goal★ 182100% same
- iamyoki/qwen-image-2.1-skill★ 146100% same
- rengwu/wayfinder-maps★ 13387% same
77 more not listed
Wrote their own version · 15
- stevesolun/ctx★ 588same name
- devcxl/mattpocock-skills-zh★ 426same name
- JasonxzWen/harness-hub★ 71same name
- leandrocfe/skills★ 38same name
- sgaabdu4/building-flutter-apps★ 23same name
- aethrox/doctrine★ 18same name
- KroxiDev/engineering-skills★ 4same name
- hahuyhungdev/ai-coding-config★ 3same name
- int2t05/engineering-skills★ 3same name
- marcellocurto/skills★ 3same name
5 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 repository2 other files it gives its agents.
- AGENTS.mdAGENTS.md
- improve-codebase-architectureSkill
The file
We split this skill into the rules it gives an agent
2 rules. 2 are common, 0 are distinctive, and 0 are very specific to this project.
2
Common
Most of the 91 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Common: line 12
Use these terms exactly — don't substitute "component," "service," "API," or "boundary." Consistent language is the whole point.
- Common: line 54
When designing an interface, ask:
“Common” is measured: kept by at least 6 in 10 of the 91 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
Codebase Design
Design deep modules: a lot of behaviour behind a small interface, placed at a clean seam, testable through that interface. Use this language and these principles wherever code is being designed or restructured. The aim is leverage for callers, locality for maintainers, and testability for everyone.
Glossary
Use these terms exactly — don't substitute "component," "service," "API," or "boundary." Consistent language is the whole point.
Module — anything with an interface and an implementation. Deliberately scale-agnostic: a function, class, package, or tier-spanning slice. Avoid: unit, component, service.
Interface — everything a caller must know to use the module correctly: the type signature, but also invariants, ordering constraints, error modes, required configuration, and performance characteristics. Avoid: API, signature (too narrow — they refer only to the type-level surface).
Implementation — what's inside a module, its body of code. Distinct from Adapter: a thing can be a small adapter with a large implementation (a Postgres repo) or a large adapter with a small implementation (an in-memory fake). Reach for "adapter" when the seam is the topic; "implementation" otherwise.
Depth — leverage at the interface: the amount of behaviour a caller (or test) can exercise per unit of interface they have to learn. A module is deep when a large amount of behaviour sits behind a small interface, shallow when the interface is nearly as complex as the implementation.
Seam (Michael Feathers) — a place where you can alter behaviour without editing in that place; the location at which a module's interface lives. Where to put the seam is its own design decision, distinct from what goes behind it. Avoid: boundary (overloaded with DDD's bounded context).
Adapter — a concrete thing that satisfies an interface at a seam. Describes role (what slot it fills), not substance (what's inside).
Leverage — what callers get from depth: more capability per unit of interface they learn. One implementation pays back across N call sites and M tests.
Locality — what maintainers get from depth: change, bugs, knowledge, and verification concentrate in one place rather than spreading across callers. Fix once, fixed everywhere.
Deep vs shallow
Deep module = small interface + lots of implementation:
┌─────────────────────┐
│ Small Interface │ ← Few methods, simple params
├─────────────────────┤
│ │
│ Deep Implementation│ ← Complex logic hidden
│ │
└─────────────────────┘Shallow module = large interface + little implementation (avoid):
┌─────────────────────────────────┐
│ Large Interface │ ← Many methods, complex params
├─────────────────────────────────┤
│ Thin Implementation │ ← Just passes through
└─────────────────────────────────┘When designing an interface, ask:
- Can I reduce the number of methods?
- Can I simplify the parameters?
- Can I hide more complexity inside?
Principles
- Depth is a property of the interface, not the implementation. A deep module can be internally composed of small, mockable, swappable parts — they just aren't part of the interface. A module can have internal seams (private to its implementation, used by its own tests) as well as the external seam at its interface.
- The deletion test. Imagine deleting the module. If complexity vanishes, it was a pass-through. If complexity reappears across N callers, it was earning its keep.
- The interface is the test surface. Callers and tests cross the same seam. If you want to test past the interface, the module is probably the wrong shape.
- One adapter means a hypothetical seam. Two adapters means a real one. Don't introduce a seam unless something actually varies across it.
Designing for testability
Good interfaces make testing natural:
Accept dependencies, don't create them.
// Testable function processOrder(order, paymentGateway) {} // Hard to test function processOrder(order) { const gateway = new StripeGateway(); }Return results, don't produce side effects.
// Testable function calculateDiscount(cart): Discount {} // Hard to test function applyDiscount(cart): void { cart.total -= discount; }- Small surface area. Fewer methods = fewer tests needed. Fewer params = simpler test setup.
Relationships
- A Module has exactly one Interface (the surface it presents to callers and tests).
- Depth is a property of a Module, measured against its Interface.
- A Seam is where a Module's Interface lives.
- An Adapter sits at a Seam and satisfies the Interface.
- Depth produces Leverage for callers and Locality for maintainers.
Rejected framings
- Depth as ratio of implementation-lines to interface-lines (Ousterhout): rewards padding the implementation. We use depth-as-leverage instead.
- "Interface" as the TypeScript
interfacekeyword or a class's public methods: too narrow — interface here includes every fact a caller must know. - "Boundary": overloaded with DDD's bounded context. Say seam or interface.
Going deeper
- Deepening a cluster given its dependencies — see DEEPENING.md: dependency categories, seam discipline, and replace-don't-layer testing.
- Exploring alternative interfaces — see DESIGN-IT-TWICE.md: spin up parallel sub-agents to design the interface several radically different ways, then compare on depth, locality, and seam placement.
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.

