Agent skill

Codebase Design

by ayoubben18 in ayoubben18/ab-method

Shared vocabulary and principles for designing deep modules — small interfaces, clean seams, testable through the interface.

MITAuto-check passed

Install Codebase Design

skills CLI
$ npx skills add ayoubben18/ab-method --skill codebase-design -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ayoubben18/ab-method codebase-design --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ayoubben18/ab-method.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/codebase-design .claude/skills/codebase-design && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
codebase-design
GitHub stars
192
Token cost
~1.7k tokens
SKILL.md length
803 words
Files
3
Skills in repo
26
Repo updated
First seen
Licence
MIT

At a glance

Shared vocabulary and principles for designing deep modules — small interfaces, clean seams, testable through the interface.

  • Works in 3 steps: Accept dependencies, don't create them. → Return results, don't produce side… → Small surface area. Fewer methods =…
  • Improving a modules interface
  • SKILL.md covers Terms, Deep vs shallow, Principles and Relationships, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Codebase Design is an agent skill from ayoubben18/ab-method. Shared vocabulary and principles for designing deep modules — small interfaces, clean seams, testable through the interface. Use when designing or improving a module's interface, deciding where a seam goes, hunting deepening opportunities, making code more testable, or when another skill needs the deep-module vocabulary.

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `DEEPENING.md` and `DESIGN-IT-TWICE.md`).

The repository describes itself as: A workflow system for Claude Code and Codex. It grills a problem into a domain-grounded plan, then either drives it through test-driven missions you review one at a time, or… The licence is MIT.

When your agent uses it

  • Improving a modules interface
  • Deciding where a seam goes
  • Hunting deepening opportunities
  • Making code more testable

Example prompts

  • “/codebase-design”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Accept dependencies, don't create them.
  2. Return results, don't produce side effects.
  3. Small surface area. Fewer methods = fewer tests needed. Fewer params = simpler test setup.

What it can do on your machine

Read from SKILL.md and the folder at commit 85946e3. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Codebase Design loads about 1.7k tokens when it runs. Until then it costs about 85 tokens; SKILL.md has 803 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~85
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ayoubben18/ab-method at commit 85946e3, republished under its MIT licence (© ayoubben18). 803 words, ~1,736 tokens.

Download SKILL.mdSave it as .claude/skills/codebase-design/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
codebase-design
description
Shared vocabulary and principles for designing deep modules — small interfaces, clean seams, testable through the interface. Use when designing or improving a module's interface, deciding where a seam goes, hunting deepening opportunities, making code more testable, or when another skill needs the deep-module vocabulary.

Codebase Design

Design deep modules: a lot of behaviour behind a small interface, placed at a clean seam, testable through that interface. The aim is leverage for callers, locality for maintainers, and testability for everyone.

This skill is the single source of the architecture vocabulary used across AB Method — by improve-codebase-architecture when proposing deepenings, by review-implementation's cleaner-architecture lens when judging a diff, and by tdd when agreeing seams. Consumers reference it; they don't restate it.

Terms

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 — applies equally to a function, class, package, or tier-spanning slice. Avoid: unit, component, service.

Interface Everything a caller must know to use the module correctly. Includes the type signature, but also invariants, ordering constraints, error modes, required configuration, and performance characteristics. Avoid: API, signature (too narrow — those 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. A module is shallow when the interface is nearly as complex as the implementation.

Seam (from Michael Feathers) A place where you can alter behaviour without editing in that place. The location at which a module's interface lives. Choosing 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 have to learn. One implementation pays back across N call sites and M tests.

Locality What maintainers get from depth. Change, bugs, knowledge, and verification concentrate at 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, the module wasn't hiding anything (it was a pass-through). If complexity reappears across N callers, the module 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.
Show full SKILL.md (279 more words)Show less

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 interface keyword 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.

Designing for testability

Good interfaces make testing natural:

  1. Accept dependencies, don't create them.

    typescript
    // Testable
    function processOrder(order, paymentGateway) {}
    
    // Hard to test
    function processOrder(order) {
      const gateway = new StripeGateway();
    }
  2. Return results, don't produce side effects.

    typescript
    // Testable
    function calculateDiscount(cart): Discount {}
    
    // Hard to test
    function applyDiscount(cart): void {
      cart.total -= discount;
    }
  3. Small surface area. Fewer methods = fewer tests needed. Fewer params = simpler test setup.

This is the design-side counterpart of the tdd skill's seam discipline: tdd says test only at pre-agreed seams; this says shape the module so the seam is worth testing at.

Going deeper

  • Deepening a cluster given its dependencies — see DEEPENING.md: the four 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.

Where the domain model fits

The architecture vocabulary here names shapes; CONTEXT.md names concepts. Use both: "the Order intake module is shallow" — domain noun from CONTEXT.md, architecture verdict from this glossary. Never "the OrderService is badly factored", which uses neither.

© ayoubben18, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files in .agents/skills/codebase-design of ayoubben18/ab-method.

  • SKILL.md
  • DEEPENING.md
  • DESIGN-IT-TWICE.md

Open the folder on GitHubat commit 85946e3

Compare with similar skills

Codebase Design next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Codebase Design compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Codebase Design this skillayoubben18/ab-method192—~1.7kAutomated safety check: PassMIT
Design Audit Against Rams' Principlesthedotmack/claude-mem97k—~4.6kAutomated safety check: PassApache-2.0
Interface Design for Dashboards and Appsholaboss-ai/holaOS11k3 repos~6kAutomated safety check: PassMIT
Design Systemaffaan-m/ECC274k—~698Automated safety check: PassMIT
Design Guidepaperclipai/paperclip98k1 repos~3.1kAutomated safety check: PassMIT
Interface Designreactive/data-client2k—~1.1kAutomated safety check: PassApache-2.0

Similar skills

  • Audits a design against Dieter Rams' ten principles of good design, scores each with evidence, and hands off a make-plan prompt for a new, refined or redesigned outcome.

    97k GitHub stars~4.6k tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • Pushes an agent past generic defaults when designing dashboards, admin panels, SaaS apps and tools, with attention to structure, type, navigation and how data is shown.

    11k GitHub starsUsed in 3 repos~6k tokens
    Frontend & DesignAuto-check passed
  • Design System

    affaan-m/ECC

    Generate a design system from an existing codebase or audit one for visual consistency: extract tokens (colors, typography, spacing, shadows) into design-tokens.json and CSS custom properties with…

    274k GitHub stars~698 tokensUpdated 2 days ago
    Frontend & DesignAuto-check passed
  • Design Guide

    paperclipai/paperclip

    Paperclip UI design system guide for building consistent, reusable frontend components.

    98k GitHub starsUsed in 1 repo~3.1k tokens
    Frontend & DesignAuto-check passed
  • Interface Design

    reactive/data-client

    Interface design principles for package APIs — where configuration, behavior, and state belong across schema, endpoint, and hook layers.

    2k GitHub stars~1.1k tokensUpdated today
    Backend & APIsAuto-check passed
  • Figma Design to Code

    warpdotdev/warp

    Turns a Figma frame or component into production code that matches the design, using the Figma MCP server and the project's own design system.

    65k GitHub starsUsed in 4 repos~2.9k tokens
    Frontend & DesignAuto-check passed

More from ayoubben18/ab-method

All 26 skills in this repo
  • Grill With Docs

    ayoubben18/ab-method

    Grilling session that challenges your plan against the existing domain model, sharpens terminology, and updates documentation (CONTEXT.md, ADRs) inline as decisions crystallise.

    192 GitHub stars~2.1k tokensUpdated 6 days ago
    Auto-check passed
  • Change Map

    ayoubben18/ab-method

    Draw a task's blast radius twice. An agent skill from ayoubben18/ab-method.

    192 GitHub stars~2.9k tokensUpdated 6 days ago
    Auto-check passed
  • Handoff

    ayoubben18/ab-method

    Compact the current conversation (or a side-topic that surfaced mid-grill) into a handoff document another agent can pick up.

    192 GitHub stars~696 tokensUpdated 6 days ago
    Auto-check passed
  • Improve Codebase Architecture

    ayoubben18/ab-method

    Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.

    192 GitHub stars~1.9k tokensUpdated 6 days ago
    Auto-check passed
  • Reconcile Roadmap

    ayoubben18/ab-method

    Cross-plan coherence critic for a whole roadmap. An agent skill from ayoubben18/ab-method.

    192 GitHub stars~2.8k tokensUpdated 6 days ago
    Auto-check passed
  • Review Implementation

    ayoubben18/ab-method

    Post-implementation review. An agent skill from ayoubben18/ab-method.

    192 GitHub stars~1.5k tokensUpdated 6 days ago
    Auto-check passed

Questions about Codebase Design

What does Codebase Design do?

Shared vocabulary and principles for designing deep modules — small interfaces, clean seams, testable through the interface. Codebase Design is an agent skill from ayoubben18/ab-method. Shared vocabulary and principles for designing deep modules — small interfaces, clean seams, testable through the interface.

When should I use Codebase Design?

Codebase Design fits situations like: improving a modules interface; deciding where a seam goes; hunting deepening opportunities; making code more testable.

How do I install Codebase Design in Claude Code?

Run `npx skills add ayoubben18/ab-method --skill codebase-design -a claude-code`. Or copy the skill folder (.agents/skills/codebase-design in ayoubben18/ab-method) into .claude/skills/codebase-design in your project. Claude Code loads it when a task matches its description.

How do I install Codebase Design in Codex?

Run `npx skills add ayoubben18/ab-method --skill codebase-design -a codex`. Or copy the skill folder (.agents/skills/codebase-design in ayoubben18/ab-method) into .agents/skills/codebase-design in your project. Codex loads it when a task matches its description.

Can I use Codebase Design in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ayoubben18/ab-method --skill codebase-design -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/codebase-design, .gemini/skills/codebase-design, .github/skills/codebase-design and .opencode/skills/codebase-design in your project.

What does Codebase Design need to run?

SKILL.md names no scripts, command-line tools or credentials: Codebase Design is instructions for the agent only.

Does Codebase Design access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Codebase Design safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Codebase Design use?

Codebase Design is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Codebase Design use?

About 1.7k tokens (SKILL.md is roughly 6.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Codebase Design?

Skills that share tags, products or a category with Codebase Design: Design Audit Against Rams' Principles (thedotmack/claude-mem, 97k stars), Interface Design for Dashboards and Apps (holaboss-ai/holaOS, 11k stars), Design System (affaan-m/ECC, 274k stars) and Design Guide (paperclipai/paperclip, 98k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Codebase Design?

ayoubben18 (a GitHub user) maintains it in ayoubben18/ab-method, which has 192 GitHub stars. The repository holds 26 skills in this directory. The repository was last updated on October 1, 2026.

Source: ayoubben18/ab-method on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.