codebase-design

A design-review skill for finding places where a codebase could be reorganised into modules with clear boundaries and useful interfaces. A codebase is the full collection of a project's source files and related code.

In plain words
What is it for?
Use it when designing or restructuring modules, combining tightly connected small modules, or identifying refactoring opportunities. It designs the change but does not edit the code.
Why use it?
It makes architectural friction visible and helps you choose improvements that can make code easier to test and navigate.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/int2t05/engineering-skills/codebase-design
Any agent
npx skills add int2t05/engineering-skills --skill codebase-design
Clone the repo
git clone --depth 1 https://github.com/int2t05/engineering-skills

Made for: Claude Code, Codex.

Per session 113 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,681 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00113 $0.01681
Opus 5 $0.00056 $0.00840
Sonnet 5 $0.00023 $0.00336
Haiku 4.5 $0.00011 $0.00168

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

skills/03-design/codebase-design/SKILL.md · 106 lines

How it starts

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

Codebase Design

Design deep modules: a lot of behaviour behind a small interface, placed at a clean seam, testable through that interface. Leverage for callers, locality for maintainers, testability for everyone. This skill merges the deep-module vocabulary with a scan-and-grill workflow: surface architectural friction as deepening opportunities, present them as a visual HTML report, then grill through the one the user picks.

When to use

  • Designing a new module or restructuring an existing one — deciding where a seam goes, what hides behind it
  • Finding refactoring or deepening opportunities across a codebase
  • Making a codebase more testable or AI-navigable
  • Consolidating tightly-coupled shallow modules into one deep module
  • Triggers on "deep module", "seam", "refactoring opportunity", "架构改进", "模块设计", "deepening", "深化模块", "重构架构", "代码库设计"

Not for: executing the structural change once the design is settled (use refactoring); single-file clarity cleanup — naming, nesting, dead code (use simplify); greenfield system architecture (use architecture); feature-level API contracts (use api-design). This skill designs and audits; it does not edit code.

Steps

1. Scan for deepening opportunities

Read the project's domain glossary (CONTEXT.md) and any ADRs in the area you're touching first — the domain language names good seams; ADRs record decisions not to re-litigate.

Scope before you scan — put weight on parts of the codebase that have recently changed. If the user named a direction, take it. Otherwise walk the commit history (git log --oneline) to find hot spots, then explore those paths first.

Spawn an Explore sub-agent to walk the codebase and note friction (if sub-agents are unavailable in this environment, walk it yourself with Glob/Grep/Read, focusing on recently-changed files via git log --oneline -20). Note where understanding one concept requires bouncing between many small modules; where modules are shallow (interface nearly as complex as the implementation); where pure functions were extracted just for testability but bugs hide in how they're called; where tightly-coupled modules leak across seams; where code is untested or hard to test through its current interface.

Read the full file on GitHub · 106 lines

Files

What ships with it

6 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. 2d ago First seen · 106 lines · 113 tokens per session scan A bbfba67e7e0e

Subscribe to this mod's changes

codebase-design is a skill published in the GitHub repository int2t05/engineering-skills (3 stars, last pushed 13d ago), licensed MIT. It adds 113 tokens to every session and 1,681 once invoked, about $0.0006 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-08-31.

Related

Other skills, from other repositories

absolute-work

End-to-end, phase-gated SDLC for AI coding agents: relentless design interview → reviewed spec → dependency-graphed task board → safe-wave TDD execution → verification → converge. Handles features, bugs, refactors, greenfield projects, planning breakdowns, and migrations. Triggers on "absolute work", "build this…

maddhruv/absolute · 104 tokens

production-engineering-workflows

End-to-end production engineering workflows that encode the complete software development lifecycle into repeatable, quality-gated agent commands. Covers everything from spec-driven ideation through planning, test-driven implementation, automated testing, rigorous code review, web performance auditing, code…

JPeetz/agent-skills · 204 tokens

finishing-a-development-branch

Use when implementation is complete, all tests pass, and you need to decide how to integrate the work.

obra/superpowers · 27 tokens

nunit-testing

Use when writing or modifying tests in NUnit's own test projects, or when making a behavioral change to production code that needs test coverage. Covers test structure, attribute choice, helper visibility, platform guards, and which test projects are real.

nunit/nunit · 51 tokens

software-test-execution

Run scoped tests for a TDD slice, determine the appropriate test framework and command, and report structured pass/fail results. Use when tests need to be executed after writing, implementing, or refactoring code. Reads test metadata, discovers the test framework if needed, executes the scoped test command, parses…

stencila/stencila · 97 tokens

nunit-api-design

Use when adding or modifying public API surface in NUnit — new or changed constraints, attributes, assertions, helpers, or any type/member visibility change. Covers the conventions NUnit maintainers enforce for types that ship to consumers of the framework.

nunit/nunit · 51 tokens