codebase-design

codebase-design is a skill for Codex from OutlineDriven/outline-driven-development. It costs 51 tokens per session (1,558 once invoked), scanned A, original, Apache-2.0.

A method for designing a code module with a small interface that hides its internal complexity and can be tested through clear connection points.

In plain words
What is it for?
Use it to improve a function, class, package, crate, or related code slice when you need a cleaner boundary or better testability.
Why use it?
It reduces the number of implementation details that callers must understand and makes changes easier to isolate and test.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it to improve a function, class, package, crate, or related code slice when you need a cleaner boundary or better testability.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/outlinedriven/outline-driven-development/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/outline-driven-development --skill codebase-design
Clone the repo
git clone --depth 1 https://github.com/OutlineDriven/outline-driven-development

Made for: Codex.

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/outline-driven-development/codebase-design/github.svg)](https://agentmods.dev/skills/outlinedriven/outline-driven-development/codebase-design)
Your own site
<a href="https://agentmods.dev/skills/outlinedriven/outline-driven-development/codebase-design"><img src="https://agentmods.dev/badge/skills/outlinedriven/outline-driven-development/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/outline-driven-development/codebase-design"><img src="https://agentmods.dev/badge/skills/outlinedriven/outline-driven-development/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 $0.00026 $0.00779
Sonnet 5 $0.00010 $0.00312
Haiku 4.5 $0.00005 $0.00156

Measured 4d ago against content hash 6a39e71cd735, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, 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 4d 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.

.devin/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. 4d ago First seen · 52 lines · 51 tokens per session scan A 6a39e71cd735

Subscribe to this mod's changes

codebase-design is a skill published in the GitHub repository OutlineDriven/outline-driven-development (52 stars, last pushed 3d ago), licensed Apache-2.0. It adds 51 tokens to every session and 1,558 once invoked, about $0.0003 per session on Opus 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-09-03.