codebase-design
Use to design or improve a single MODULE's interface — deciding where a seam goes, making code more testable / AI-navigable, or judging whether a module is…
Skill by KSriki
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/ksriki-codebase-design
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: design, frontend, testing, writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/codebase-design
What's inside
- Skill name
codebase-design- Description
- Use to design or improve a single MODULE's interface — deciding where a seam goes, making code more testable / AI-navigable, or judging whether a module is too shallow. Provides the deep-module vocabulary other skills reuse. Triggers on "design this module", "where should the seam go", "make this testable", "is this interface too shallow", "ports and adapters", "design it twice", "deep module". Do NOT use for system-level pattern choices — sync vs async, caching, CQRS, scaling — that's `architecture-patterns`; for whether to add a whole component (`new-service`); or for writing the tests themselves (`tdd` / `run-tests`).
- License
- MIT
- Instructions
- 75 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Codebase design: deep modules, seams, design-it-twice
> Adapted from `mattpocock/skills` (MIT) — reimplemented in this repo's style.
## When to use this
Designing the *interface* of a module so it hides complexity behind a small surface.
This is the shared vocabulary the architecture/refactor skills lean on — load it when
you're shaping a module boundary or another skill sends you here for the terms.
**Not this skill if:** it's a system-level pattern (sync/async, caching, CQRS,
scaling) → `architecture-patterns`. It's "should this be its own service" →
`new-service`. It's writing tests → `tdd`.
## The vocabulary (load-bearing — use these words precisely)
- **Module** — a scale-agnostic unit (function, class, package) with an interface and an implementation.
- **Interface** — the *complete* surface: signatures, invariants, constraints, error handling, config, performance expectations. (Not just the type signature.)
- **Depth** — behavior accessible per unit of interface learned. **Deep** modules hide complexity; **shallow** ones expose it.
- **Seam** — a place where you can alter behavior *without editing in that place* (Feathers). Distinct from the implementation behind it.
- **Adapter** — a concrete implementation satisfying an interface at a seam.
- **Leverage** — capability per unit of learning, for callers. **Locality** — concentrated change, for maintainers. Depth buys both.
## Design principles
- Depth lives in the **interface contract**, not the internal structure.
- **Test the interface the way callers use it.**
- Introduce a **seam only when variation actually exists** — not speculatively.
- **Accept dependencies; return results, not side effects.**
- Minimize method count and parameter complexity.
**Anti-patterns:** shallow modules that expose a near-complete implementation surface;
treating "interface" as just the type signature; confusing seams with DDD boundaries.
## Dependencies → where the seam goes (the deletion test)
Apply the **deletion test** to a candidate: would collapsing it *concentrate*
complexity (good) or just move it around (not yet)? Then classify each dependency:
| Dependency kind | Seam treatment |
|---|---|
| **In-process / pure** | deepen directly — no adapter |
| **Local-substitutable** (in-memory FS, PGLite…) | internal seam, test stand-in — no port |
| **Remote but owned** | **ports & adapters** — define a port at the seam, inject transport as an adapter, in-memory adapter for tests |
| **True external** (payment, email…) | inject as a port, **mock** adapter in tests |
> **Seam discipline:** *one adapter is a hypothetical seam; two adapters is a real
> one.* Don't add a port for a single adapter — that's just indirection.
## Design it twice (before committing to an interface)
Your first idea is rarely the best (Ousterhout). For a non-trivial interface:
1. **Frame the problem** — write the constraints, the dependency categories, a short
illustrative sketch; show it to the human.
2. **Spawn 3+ implementer/`Explore` sub-agents in parallel** (the Agent tool — this is
an `orchestrate-agents` fan-out), each producing a *radically different* interface
under a different constraint: (a) minimize interface / max leverage, (b) maximize
flexibility, (c) optimize the common caller, (d) ports-&-adapters for cross-seam
deps. Each returns: interface + a usage example + what it hides behind the seam +
its dependency strategy + trade-offs.
3. **Compare by depth, locality, and seam placement**, then give an opinionated
recommendation (or a hybrid).
## Definition of done
- [ ] The interface hides complexity — deep, not shallow (behavior ≫ surface)
- [ ] Seams placed only where **real** variation exists (two-adapter rule)
- [ ] Dependencies classified; ports/mocks only at true boundaries
- [ ] For non-trivial interfaces, **designed twice** and compared before committing
- [ ] The chosen interface written down as a **contract sketch** — signatures,
an I-O pair, or pseudo-code; never implementation bodies (the sketch is
what reviewers and agents orient off)From KSriki/agent-harness-template, MIT.
More from KSriki/agent-harness-template
- 0.565score
evolve-harness
KSriki
Use to turn a repeated correction, a recurring failure, or a researched new practice/trend into a durable change to the AGENT LAYER — a new or edited skill…
SkillAFreshness: AClaude Code +9 - 0.524score
grill-me
KSriki
Use to grill the user relentlessly about a plan, decision, or idea — a frontier-batched interview down the design tree (rounds of ready questions, each with a…
SkillBFreshness: BClaude Code +9 - 0.524score
eval-harness
KSriki
Use when building, running, or debugging evaluations for LLM or agent components: golden sets, regression evals, LLM-as-judge, rubric scoring…
SkillBFreshness: BClaude Code +9 - 0.524score
prd-to-issues
KSriki
Use to break a plan, spec/PRD, or the current conversation into a set of tracer-bullet tickets — each a narrow-but-complete vertical slice, declaring its…
SkillBFreshness: BClaude Code +9 - 0.524score
observability
KSriki
Use when instrumenting a service (structured logs, metrics, traces), defining SLOs or alerts, building a dashboard, or triaging a live production incident /…
SkillBFreshness: BClaude Code +9 - 0.524score
orchestrate-agents
KSriki
Use to ship a multi-part change by running several agents IN PARALLEL — fan-out across subagents, each isolated in its own git worktree, then verify-and-merge.
SkillBFreshness: BClaude Code +9 - 0.524score
ci-cd
KSriki
Use when setting up or debugging a CI pipeline, adding a workflow or gate, promoting a build through environments, deploying, cutting a versioned release, or…
SkillBFreshness: BClaude Code +9 - 0.524score
review-pr
KSriki
Use when preparing your own change for review (self-review, commit hygiene, writing the PR description) or when reviewing someone else's pull request for…
SkillBFreshness: BClaude Code +9 - 0.520score
graphify
KSriki
Use for STRUCTURE and relationship questions about a codebase/corpus — how X reaches Y, what depends on what, blast radius, architectural hubs — and to build…
SkillBFreshness: BClaude Code +9 - 0.499score
harness-help
KSriki
Use when the user asks how to customize the harness or where something goes: "how do I add a rule / gotcha / skill", "where do I change the gate", "what file…
SkillBFreshness: BClaude Code +9 - 0.474score
debug-research
KSriki
Use when the answer likely lives OUTSIDE this repo: debugging an error from a library/framework/API, checking whether an SDK signature is current, evaluating…
SkillCFreshness: CClaude Code +9 - 0.474score
domain-modeling
KSriki
Use to actively build and sharpen a project's domain model — pin down terminology / ubiquitous language, resolve fuzzy or overloaded terms, and record the…
SkillCFreshness: CClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Sep 4, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/KSriki/agent-harness-template
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from KSriki
- 0.565score
evolve-harness
KSriki
Use to turn a repeated correction, a recurring failure, or a researched new practice/trend into a durable change to the AGENT LAYER — a new or edited skill…
SkillAFreshness: AClaude Code +9 - 0.524score
grill-me
KSriki
Use to grill the user relentlessly about a plan, decision, or idea — a frontier-batched interview down the design tree (rounds of ready questions, each with a…
SkillBFreshness: BClaude Code +9 - 0.524score
orchestrate-agents
KSriki
Use to ship a multi-part change by running several agents IN PARALLEL — fan-out across subagents, each isolated in its own git worktree, then verify-and-merge.
SkillBFreshness: BClaude Code +9 - 0.524score
eval-harness
KSriki
Use when building, running, or debugging evaluations for LLM or agent components: golden sets, regression evals, LLM-as-judge, rubric scoring…
SkillBFreshness: BClaude Code +9 - 0.524score
observability
KSriki
Use when instrumenting a service (structured logs, metrics, traces), defining SLOs or alerts, building a dashboard, or triaging a live production incident /…
SkillBFreshness: BClaude Code +9 - 0.524score
review-pr
KSriki
Use when preparing your own change for review (self-review, commit hygiene, writing the PR description) or when reviewing someone else's pull request for…
SkillBFreshness: BClaude Code +9
Cite this page
codebase-design skill. Agent Mart. https://agentmart.dev/skills/ksriki-codebase-design (last updated 2026-10-24)