codebase-design

codebase-design is a skill for Claude Code, Codex from OutlineDriven/odin-claude-plugin. It costs 51 tokens per session (1,558 once invoked), scanned A, original, Apache-2.0.

A design guide for building deep modules: pieces of code that hide substantial behaviour behind a small, clear interface. An interface is the information callers need to use that code correctly.

In plain words
What is it for?
Designing module interfaces, choosing clean seams between parts of a codebase, improving testability, and planning adapters.
Why use it?
It helps keep complexity inside well-placed modules, making code easier to use, maintain, and test.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also agents/openai.yaml present.

Part of the odin-code plugin — 60 skills shipped together

Good fit Designing module interfaces, choosing clean seams between parts of a codebase, improving testability, and planning adapters.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/outlinedriven/odin-claude-plugin/codebase-design
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add OutlineDriven/odin-claude-plugin --skill codebase-design
Clone the repo
git clone --depth 1 https://github.com/OutlineDriven/odin-claude-plugin

Made for: Claude Code, Codex.

Or install odin-code, the plugin that ships this one along with the rest of its 60 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for codebase-design

README.md
[![agentmods](https://agentmods.dev/badge/skills/outlinedriven/odin-claude-plugin/codebase-design/github.svg)](https://agentmods.dev/skills/outlinedriven/odin-claude-plugin/codebase-design)
Your own site
<a href="https://agentmods.dev/skills/outlinedriven/odin-claude-plugin/codebase-design"><img src="https://agentmods.dev/badge/skills/outlinedriven/odin-claude-plugin/codebase-design/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for codebase-design

Your own site · 80×15
<a href="https://agentmods.dev/skills/outlinedriven/odin-claude-plugin/codebase-design"><img src="https://agentmods.dev/badge/skills/outlinedriven/odin-claude-plugin/codebase-design.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,558 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00051 $0.01558
Opus 5.5 $0.00020 $0.00623
Sonnet 5.5 $0.00010 $0.00312
Haiku 4.5 $0.00005 $0.00156

Measured 1mo ago against content hash 6a39e71cd735, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

codebase-design scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/odin-code/skills/codebase-design/SKILL.md · 52 lines

How it starts

The opening of the file, as written. The whole thing — 52 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Codebase design

Contract

Field Bound contract
Trigger Designing or improving a module interface, locating a seam, increasing testability, or needing shared deep-module vocabulary.
Authority Reversible-local: recommendations go to chat; local restructuring edits only the named module's files, rolled back by reverting the uncommitted edits (version-control checkout or manual revert). No remote, credential, paid, published, or deployed mutation.
Side effect Chat design recommendations plus optional local edits confined to the named module; no remote mutation.
Done The chosen module presents a small coherent interface, hides implementation complexity, concentrates change locally, and is testable through explicit seams.

Inputs

  • Required: one named target module (a function, class, package, crate, or tier-spanning slice) with readable source and enough of its callers and tests to judge what they must know.
  • Optional: intended adapters, candidate seam locations, and the target language, which is inferred from the source when not stated.

Procedure

  1. Bound the scope. Name exactly one target module and confirm its source is readable; a name matching nothing is an unbounded-target stop, not a guess. Read the interface surface, the implementation, and the callers and tests crossing them. If depth cannot be judged inside this scope, stop and name the missing evidence. Done when: one module is named, its source is read, and its callers and tests are surveyed.
  2. Fix the vocabulary. Use these terms exactly; do not substitute near-synonyms.
    • Module: anything with an interface and an implementation, scale-agnostic from a single function to a tier-spanning slice. Avoid: "unit," "component," "service."
    • Interface: everything a caller must know: type signature, invariants, ordering constraints, error modes, required configuration, performance characteristics. Avoid: "API," "signature"; they name only the type-level surface.
    • Implementation: the body inside the module. A small adapter can hold a large implementation (a Postgres or JPA repository) and a large adapter a small one (an in-memory fake); say "adapter" when the seam is the topic, "implementation" otherwise.
    • Seam (Michael Feathers): a place where behaviour can be altered without editing in that place; it is where the module's interface lives. Avoid: "boundary"; it is overloaded with DDD's bounded context.
    • Adapter: a concrete thing that satisfies an interface at a seam; it names the role, not the substance.
    • Depth: the behaviour a caller or test can exercise per unit of interface it must learn. Deep means large behaviour behind a small interface; shallow means the interface is nearly as complex as the implementation.
    • Leverage: what callers get from depth: capability per unit of interface learned, one implementation paying back across N call sites and M tests.
    • Locality: what maintainers get from depth: change, bugs, knowledge, and verification concentrate in one place; fix once, fixed everywhere. Done when: the vocabulary is fixed and no near-synonym substitution remains.
  3. Classify depth by leverage, not line ratio. Depth is a property of the interface, not the implementation: internal parts, including internal seams used only by the module's own tests, are not interface, and a module has exactly one interface. A single method that handles a hard problem well is deeper than ten methods that each forward to another layer. Done when: a deep/shallow classification is stated with leverage evidence.
  4. Run the deletion test. Imagine deleting the module: if the complexity vanishes, it was a pass-through hiding nothing; if the complexity reappears across N callers, it is earning its keep. Done when: the deletion test produces a pass-through or earning-its-keep verdict.
  5. Narrow the interface. Ask in order: can methods be reduced? can parameters be simplified? can more complexity be hidden inside? Prefer the form that gives callers leverage and maintainers locality. Done when: the interface is at its narrowest form that preserves caller-visible behavior.
  6. Place seams by variation. The external seam carries the interface; internal seams stay private to the implementation and its tests. Introduce a seam only when something actually varies across it: one adapter means a hypothetical seam, two adapters mean a real one. Done when: every seam is placed where variation actually crosses it.
  7. Check the test surface. Callers and tests cross the same seam; a test that must reach past the interface means the module is the wrong shape. Restructure by accepting dependencies instead of constructing them (process_order(order, gateway) with an injected gateway is testable; an internal StripeGateway() construction is not), returning results instead of mutating (calculate_discount(cart) -> Discount is testable; mutating cart.total in place is not), and keeping the surface small: fewer methods mean fewer tests, fewer parameters mean simpler setup. Done when: callers and tests cross the same seam without reaching past the interface.
  8. Anchor terms in the target language. See references/language-anchors.md for the per-language module, interface, seam, and adapter mappings (Rust, Go, OCaml, Java/Kotlin). Done when: the vocabulary is anchored in the target language's constructs.
  9. Reject these framings wherever they appear. Depth measured as a ratio of implementation lines to interface lines rewards padding the implementation: use depth-as-leverage. "Interface" narrowed to the language keyword or a class's public methods is too narrow: the interface is every fact a caller must know. Done when: both rejected framings are checked and neither is present in the analysis.
  10. Deliver, then edit. Emit the recommendation in the fixed vocabulary; when restructuring is in scope, apply local edits confined to the bounded module while every caller and test keeps crossing the same seam. Done when: the recommendation is delivered and any local edits are applied within the bounded module.

Read the full file on GitHub · 52 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · -90 lines · -7 tokens per session 6a39e71cd735
  2. 1mo ago First seen · 142 lines · 58 tokens per session scan A 63664b6a023c

Subscribe to this mod's changes

codebase-design is a skill published in the GitHub repository OutlineDriven/odin-claude-plugin (37 stars, last pushed 21d ago), licensed Apache-2.0. It adds 51 tokens to every session and 1,558 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens

next-cache-components-optimizer

Optimize the meaningful UI available immediately from a Next.js route on an initial load (hard navigation) or named client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route and entry point at a time; the shipped test then guards…

vercel/next.js · 123 tokens