dotfiles: Skill for Claude Code

.claude/skills/codebase-design/SKILL.md

codebase-design is a skill for Claude Code, Codex from ahonn/dotfiles. It costs 23 tokens per session (591 once invoked), scanned A, a copy of codebase-design, MIT.

A shared vocabulary and set of design principles for creating modules with small interfaces and most of their behavior hidden inside.

In plain words
What is it for?
Designing or restructuring modules, choosing seams, improving testability, and making code easier for an AI agent to navigate.
Why use it?
It gives developers consistent words for discussing code structure, testing, and clean boundaries.

Skill for Claude CodeCodex

Written for Claude Code and Codex: installed under .claude/, but also agents/openai.yaml present. Also seen: mentions AGENTS.md.

This is ahonn/dotfiles's own configuration. It tells Claude Code and Codex how to work on dotfiles itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything dotfiles configures →

Reuse

Borrowing it

Nothing to install: this file belongs to ahonn/dotfiles. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/ahonn/dotfiles/master/.claude/skills/codebase-design/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/ahonn/dotfiles

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for codebase-design

README.md
[![agentmods](https://agentmods.dev/badge/skills/ahonn/dotfiles/codebase-design/github.svg)](https://agentmods.dev/skills/ahonn/dotfiles/codebase-design)
Your own site
<a href="https://agentmods.dev/skills/ahonn/dotfiles/codebase-design"><img src="https://agentmods.dev/badge/skills/ahonn/dotfiles/codebase-design/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for codebase-design

Your own site · 80×15
<a href="https://agentmods.dev/skills/ahonn/dotfiles/codebase-design"><img src="https://agentmods.dev/badge/skills/ahonn/dotfiles/codebase-design.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 591 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod 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.1 $0.00023 $0.00591
Opus 5.5 $0.00009 $0.00236
Sonnet 5.5 $0.00005 $0.00118
Haiku 4.5 $0.00002 $0.00059

Measured 20d ago against content hash 88e911797609, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 20d 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.

Origin

This is a copy

100% identical to codebase-design — 122 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.claude/skills/codebase-design/SKILL.md · 43 lines

How it starts

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

Codebase Design

Design modules that hide substantial behavior behind interfaces callers can understand. Judge a design by the knowledge and coordination it removes from callers, not by file counts or implementation length.

Use the project's established domain language. The vocabulary below supports reasoning; it does not forbid terms such as component, service, API, or boundary.

Working vocabulary

  • Module: Code with an interface and an implementation, from a function to a package or feature.
  • Interface: Everything callers must know: inputs, outputs, invariants, ordering, errors, configuration, and relevant performance constraints.
  • Depth: Useful behavior exposed relative to the complexity callers must understand.
  • Seam: A place where behavior can be substituted without editing its consumers.
  • Adapter: A concrete implementation that connects a dependency at a seam.
  • Locality: Related decisions and changes stay together instead of spreading across callers.

Design from the actual problem

Inspect callers, implementation, and dependencies before proposing a new interface. Identify the concrete cost: repeated policy, change amplification, unclear ownership, or difficult verification. Keep the existing design when a new abstraction would add more navigation or coordination than it removes.

  • Hide implementation decisions and maintain invariants inside the module that owns them.
  • Keep callers' common operations straightforward. Fewer methods are useful only when they reduce the contract callers must learn.
  • Keep related behavior together. Do not split a coherent function or file merely to satisfy size targets.
  • Introduce dependency injection where substitution, side-effect control, or an existing architectural boundary provides a concrete benefit. Do not invent a second adapter to justify an interface.
  • Keep internal dependencies private unless callers need to supply or configure them.
  • Prefer pure computation for domain decisions and explicit ownership for effects. An orchestration module may legitimately perform I/O.
  • Consider removing a pass-through layer when it contributes no policy, isolation, or stable contract. A thin adapter may still be valuable for an external dependency.

Read the full file on GitHub · 43 lines

Files

What ships with it

3 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. 20d ago Changed · -72 lines · -34 tokens per session 88e911797609
  2. 1mo ago First seen · 115 lines · 57 tokens per session scan A a8d50abac5a4

Subscribe to this mod's changes

codebase-design is a skill published in the GitHub repository ahonn/dotfiles (63 stars, last pushed 6d ago), licensed MIT. It adds 23 tokens to every session and 591 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to codebase-design, differing in 122 lines, and is treated as a copy.

Related

Other skills, from other repositories

pr-review

Intelligent PR code review with dynamic agent allocation based on change types. Analyzes PR changes and generates targeted review tasks.

magic3007/dotfiles · 28 tokens

analyze-pr

Analyze a GitHub/GitLab Pull Request by fetching its diff, reading its web description, and generating a comprehensive document. Use when the user provides a PR link and wants to understand what changes the PR introduces, or asks to review/analyze/summarize a pull request.

magic3007/dotfiles · 60 tokens

assess-quality

Foundational quality framework: the five questions (readable, easy to start, expands without bloat, consistent, intentional) every other dev skill is judged against, plus the dual-audience and workshop principles. Use when onboarding to a project, defining a quality bar, setting an assessment checklist, or arbitrating…

urmzd/dotfiles · 120 tokens

merge-ready

Drive an existing pull request to a mergeable state: get CI green, resolve merge conflicts with the base branch, address and resolve review comments, trigger required bot reviews/approvals (e.g. commenting '@claude review'), link associated issues, and clean up the PR title and description. Ends with a readiness…

urmzd/dotfiles · 208 tokens

check-project

Validate project structure against scaffold conventions -- check for required files, CI consistency, documentation completeness, sub-package/workspace members, and optional directory usage, reporting PASS/WARN/FAIL with fix suggestions. Use to audit an existing project or verify a scaffold was applied correctly. Do…

urmzd/dotfiles · 82 tokens

review-diff

Standardized review of the CURRENT working-tree changes -- staged, unstaged, and untracked -- against an explicit five-dimension rubric (correctness, security, tests, scope-creep, conventions). Emits a prioritized findings list, each with file:line, severity, and a suggested fix. Read-only: it reviews and reports, it…

urmzd/dotfiles · 170 tokens