Skip to content
Back to skills

Codebase Design

ASecurity

Design deep modules, clean interfaces, adapters, and test seams. Use when deciding where a seam goes, improving module shape, reducing shallow pass-through code, making code more testable or AI-navigable, or discussing architecture in terms of interface, depth, locality, and leverage.

  • 4 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 19, 2026
ai-agentsgoperformance

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned November 19, 2026

npx -y skills add AnonymXXX/agent-harness-engineering --skill codebase-design --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Codebase Design?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Codebase Design
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/anonymxxx-codebase-design/badge)](https://www.skillsdirectory.com/skills/anonymxxx-codebase-design)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: codebase-design
description: Design deep modules, clean interfaces, adapters, and test seams. Use when deciding where a seam goes, improving module shape, reducing shallow pass-through code, making code more testable or AI-navigable, or discussing architecture in terms of interface, depth, locality, and leverage.
---

# Codebase Design

Use a small shared vocabulary to design code that is easier for humans and Codex to change.

## Vocabulary

- **Module**: anything with an interface and implementation, from a function to a package.
- **Interface**: everything a caller must know: type shape, invariants, ordering, errors, config, and performance expectations.
- **Implementation**: what is hidden behind the interface.
- **Seam**: where behavior can vary without editing the caller.
- **Adapter**: a concrete implementation that satisfies an interface at a seam.
- **Depth**: how much behavior sits behind how little interface.
- **Leverage**: capability gained by callers from a small interface.
- **Locality**: bugs, changes, and verification stay concentrated.

Use precise terms when they clarify the design; preserve the project's established domain vocabulary and explain unfamiliar terms only when needed.

## Design Heuristics

- Prefer deep modules: small interface, substantial behavior behind it.
- Use the deletion test: if deleting the module merely moves complexity to callers, it was shallow.
- The interface is the test surface. If tests need to reach past it, reconsider the module shape.
- One adapter means a hypothetical seam; two adapters or a real variation point means a useful seam.
- Accept dependencies instead of creating them internally when it improves testability.
- Return results where practical; avoid making all behavior observable only through side effects.

## Harness Fit

When a design decision passes the Harness Capture Gate:

- capture product behavior in product/spec docs;
- capture engineering rules or invariants in engineering-rule docs;
- add executable checks when the rule can be mechanically verified;
- avoid broad refactors unless they directly support the current change or a documented execution plan.

Use `tdd` when test-first work is requested or meaningful behavioral regression coverage is needed; a design discussion alone does not require an implementation handoff.

Files in this skill

  • LICENSE.txt1.1 KB
  • SKILL.md2.3 KB
  • agents/openai.yaml199 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.