code-that-fits-in-your-head

code-that-fits-in-your-head is a skill for Claude Code, Codex from CodeAlive-AI/ai-driven-development. It costs 169 tokens per session (1,468 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 CodeCodex

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

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.

agentmods
npx agentmods add skills/codealive-ai/ai-driven-development/code-that-fits-in-your-head
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, Codex.

Or install ai-driven-development, the plugin that ships this one along with the rest of its 24 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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 169 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,468 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00169 $0.01468
Opus 5 $0.00084 $0.00734
Sonnet 5 $0.00034 $0.00294
Haiku 4.5 $0.00017 $0.00147

Measured 5d ago against content hash 997c0361f3b8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 5d 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 · 85 lines

How it starts

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

Code That Fits in Your Head

Engineering heuristics for sustainable software, based on Mark Seemann's 2021 book and clearly labelled agent-era amendments.

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

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

"The act of describing a program in unambiguous detail and the act of programming are one and the same." — Kevlin Henney

Practical implications for a code agent:

  1. Successful software endures. Prefer changes that preserve clear boundaries and keep future change affordable.
  2. Complexity is the enemy, not task size. Agents can complete changes spanning tens of thousands of lines when architecture, plan, and acceptance criteria are sound. Reject needless coupling, duplication, hidden effects, and unverifiable bulk—not large scope by itself.
  3. Heuristics, not laws. Understand the purpose of a rule before applying or relaxing it. Project policy overrides generic formatting and workflow conventions.
  4. Verification is part of design. Types, tests, schemas, architecture checks, observability, and explicit acceptance criteria constrain both human- and agent-written code.
  5. Code is a liability. Generated volume is not progress. Prefer the smallest coherent design that solves the problem without accumulating debt.

Read the full file on GitHub · 85 lines

Files

What ships with it

52 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. 5d 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 (132 stars, last pushed yesterday), licensed MIT. It adds 169 tokens to every session and 1,468 once invoked, about $0.0008 per session on Opus 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.