Skip to content
Back to skills

Codebase Design

ASecurity

Design or improve module interfaces using deep-module heuristics. Use when deciding where a seam belongs, reducing caller-facing complexity, improving testability or navigability, or comparing module designs.

  • 583 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 5, 2026
ai-agentsaws

Security analysis

A100/100

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

Scanned September 5, 2026

npx -y skills add stevesolun/ctx --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/stevesolun-codebase-design/badge)](https://www.skillsdirectory.com/skills/stevesolun-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 or improve module interfaces using deep-module heuristics. Use when deciding where a seam belongs, reducing caller-facing complexity, improving testability or navigability, or comparing module designs.
---

# Codebase Design

Seek **deep modules**: substantial useful behavior behind a small, stable
interface. Use the concepts below as design lenses, while matching the
repository's established domain language.

## Working vocabulary

- **Module**: a coherent unit with an interface and implementation, at any scale.
- **Interface**: everything callers must know, including invariants and failure
  modes—not just a type signature.
- **Seam**: a location where behavior can vary without editing its callers.
- **Adapter**: an implementation that connects at a seam.
- **Depth**: useful capability relative to interface complexity.
- **Leverage**: capability gained by callers; **locality**: change and knowledge
  concentrated for maintainers.

Translate these terms to the project's vocabulary when that makes the design
clearer. Consistency with the codebase is more valuable than enforcing a private
lexicon.

## Design workflow

1. Map representative callers, responsibilities, dependencies, and existing
   contracts.
2. Look for coordination or policy that can move behind a smaller interface.
3. Place seams where variation, ownership, or test isolation justifies them.
4. Compare alternatives when the choice is consequential.
5. Validate the candidate with representative caller code and tests.

## Heuristics, not laws

- Reduce methods, parameters, ordering constraints, and configuration callers
  must understand.
- Use the deletion test: if removing a module merely spreads its complexity
  across callers, it was likely earning its keep.
- Treat pass-through layers skeptically, but keep them when they provide a real
  compatibility, ownership, policy, or navigation boundary.
- Introduce dependency seams when actual variation or test isolation repays the
  indirection; avoid interfaces justified only by hypothetical futures.
- Prefer tests through observable interfaces, while allowing focused internal
  tests when they provide cheaper or more precise feedback.
- Favor explicit dependencies and returned results when they improve control and
  testability; side effects and internally created dependencies can still be
  appropriate at well-defined boundaries.

Read [DEEPENING.md](DEEPENING.md) when consolidating a cluster across dependency
boundaries. Read [DESIGN-IT-TWICE.md](DESIGN-IT-TWICE.md) when materially
different interface designs can be explored independently.

Files in this skill

  • DEEPENING.md2.2 KB
  • DESIGN-IT-TWICE.md2.2 KB
  • SKILL.md2.6 KB
  • agents/openai.yaml102 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.

Comments

Loading comments…

Newsletter

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