code-that-fits-in-your-head

code-that-fits-in-your-head is a skill for Claude Code from CodeAlive-AI/ai-driven-development. It costs 215 tokens per session (1,763 once invoked), scanned A, original, MIT.

Software-engineering guidelines for keeping code understandable, maintainable, and easy to change, based on Mark Seemann’s 2021 book. They also address complexity and technical debt in code produced by agents.

In plain words
What is it for?
Writing or reviewing code, refactoring overly tangled systems, designing APIs and invariants, and preventing architectural drift.
Why use it?
Generated code can accumulate confusing structures and long-term maintenance problems. These heuristics help people review and control that complexity.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the ai-driven-development plugin — 22 skills, 1 agent shipped together

Good fit Writing or reviewing code, refactoring overly tangled systems, designing APIs and invariants, and preventing architectural drift.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/codealive-ai/ai-driven-development/code-that-fits-in-your-head
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.

Any agent
npx skills add CodeAlive-AI/ai-driven-development --skill code-that-fits-in-your-head
Clone the repo
git clone --depth 1 https://github.com/CodeAlive-AI/ai-driven-development

Made for: Claude Code.

Or install ai-driven-development, the plugin that ships this one along with the rest of its 22 skills, 1 agent.

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 code-that-fits-in-your-head

README.md
[![agentmods](https://agentmods.dev/badge/skills/codealive-ai/ai-driven-development/code-that-fits-in-your-head/github.svg)](https://agentmods.dev/skills/codealive-ai/ai-driven-development/code-that-fits-in-your-head)
Your own site
<a href="https://agentmods.dev/skills/codealive-ai/ai-driven-development/code-that-fits-in-your-head"><img src="https://agentmods.dev/badge/skills/codealive-ai/ai-driven-development/code-that-fits-in-your-head/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 code-that-fits-in-your-head

Your own site · 80×15
<a href="https://agentmods.dev/skills/codealive-ai/ai-driven-development/code-that-fits-in-your-head"><img src="https://agentmods.dev/badge/skills/codealive-ai/ai-driven-development/code-that-fits-in-your-head.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 215 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,763 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00215 $0.01763
Opus 5.5 $0.00086 $0.00705
Sonnet 5.5 $0.00043 $0.00353
Haiku 4.5 $0.00021 $0.00176

Measured 9d ago against content hash ab3083acd32c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

code-that-fits-in-your-head 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 9d 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/code-that-fits-in-your-head/SKILL.md · 95 lines

How it starts

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

Code That Fits in Your Head

Heuristics for the shape of code inside one code base, based on Mark Seemann's 2021 book and clearly labelled agent-era amendments: can the next reader, human or agent, hold a unit in mind and change it safely?

Code examples are C#-first; every rule and the tooling tables are language-neutral.

Scope

A question belongs to this skill when it is answered by reading the code.

The question is answered by Use
Reading the code: size, cohesion, coupling, names, types, explicit effects This skill
Running something: which checks to write and at which level, whether a test can fail, a flaky or slow test, when a task is done pragmatic-verification
Replaying a sequence of events: a retry, a crash, two writers, two versions; where state lives; how a schema or contract changes; rollout and rollback; what an untrusted caller can reach pragmatic-architecture
Thinking before or around the code: which problem to solve, build or buy, a cause outside the code, delivery and operations fpf-problem-solving

The skill prescribes no order of writing tests and code. Test-driven development is a large part of the book; here it is left to pragmatic-verification, which treats it as one working technique among others. Two ideas from it stay, because they are about code and not about tests: build a feature as a thin slice from the boundary inward, and treat code that is hard to check as a design smell.

Philosophy (Why This Skill Exists)

Software development is principally a design activity, not construction. An agent may produce most of the text, but people still review, operate, extend, and own the resulting system. These heuristics make software sustainable: understandable, resistant to architectural erosion, and cheap to change after thousands of decisions.

Core mental model from Chapter 1:

Metaphor What it gets right What it misses
Building a house Plans, structure Software endures; there's no construction phase (compiling is free); dependencies can start anywhere
Growing a garden Pruning, refactoring, tending Code does not improve by itself; generated code still needs stewardship
Art / craft Skill, mastery, situational knowledge Doesn't scale; leaves newcomers without guidance
Engineering (the target) Heuristics, review, sign-off, checklists We're not there yet — physical-construction calculations don't apply

Read the full file on GitHub · 95 lines

Files

What ships with it

43 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. 9d ago Changed · +10 lines · +46 tokens per session ab3083acd32c
  2. 3mo ago First seen · 85 lines · 169 tokens per session scan A 997c0361f3b8

Subscribe to this mod's changes

code-that-fits-in-your-head is a skill published in the GitHub repository CodeAlive-AI/ai-driven-development (195 stars, last pushed yesterday), licensed MIT. It adds 215 tokens to every session and 1,763 once invoked, about $0.0009 per session on Opus 5.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-30.

Related

code-that-fits-in-your-head compared with skills from other repositories

code-that-fits-in-your-head next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
code-that-fits-in-your-headCodeAlive-AI/ai-driven-developmentSkill195yesterdayMITA215Claude Code
code-reviewpeintune/runjamSkill2231mo agoMITA33Claude Code, Codex
spec-reviewbenjaminthomas/spec-driven-devSkill24d agoMITA219Claude Code
spec-walkthroughbenjaminthomas/spec-driven-devSkill24d agoMITA172Claude Code
codeckisdou/codeckSkill213d agoMITA98Codex
application-security-pentestinghamzabellouch/agent-skillsSkill81mo agoMITA43Claude Code, Codex
reviewerqwerfunch/claddingSkill162mo agoMITA68Claude Code, Codex