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.
npx skills add urmzd/dotfiles --skill agent-design-doctrinegit clone --depth 1 https://github.com/urmzd/dotfilesWrote 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.
[](https://agentmods.dev/skills/urmzd/dotfiles/agent-design-doctrine)<a href="https://agentmods.dev/skills/urmzd/dotfiles/agent-design-doctrine"><img src="https://agentmods.dev/badge/skills/urmzd/dotfiles/agent-design-doctrine/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.
<a href="https://agentmods.dev/skills/urmzd/dotfiles/agent-design-doctrine"><img src="https://agentmods.dev/badge/skills/urmzd/dotfiles/agent-design-doctrine.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00121 | $0.00918 |
| Opus 5.5 | $0.00048 | $0.00367 |
| Sonnet 5.5 | $0.00024 | $0.00184 |
| Haiku 4.5 | $0.00012 | $0.00092 |
Grade A, and why
agent-design-doctrine 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 3mo 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.
How it starts
The opening of the file, as written. The whole thing — 102 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Agent Design Doctrine
Stable architectural positions for agent systems. Apply these before writing code and cite the violated rule when reviewing.
1. Safety lives in the harness, never the model
The model is a planner, not a guard. Enforce every safety property at a layer the model cannot talk its way past.
| Layer | Enforcement |
|---|---|
| Database | Read-only role, statement timeout, row limits |
| Tool implementation | Validate and sanitize inputs, allowlist operations, cap output size |
| Harness | Turn limits, budget caps, kill switches |
| Prompt | Guidance only. Never the sole control for anything destructive |
If a safety rule is only stated in the system prompt, it does not exist.
2. Tools execute and return results
A tool call does the work and returns the outcome. The model decides what to do with a failure; the tool never defers execution back to the loop or leaks partial state into context.
- Wrong: tool returns SQL for the loop to run later.
- Right: tool runs the SQL (under harness limits) and returns rows or a structured error the model can react to.
3. Minimal loop code
The framework owns the agent loop. If you are writing retry logic, tool dispatch, or message threading by hand, stop and check what the framework already does. Your code should be: tool definitions, config, and the harness guards from rule 1.
4. Interface-first seams
Every swappable component (provider, storage, embedder, renderer) sits behind a small interface defined before the first implementation. One protocol, N implementations, zero conditionals on vendor names in call sites.
5. Typed config, no raw env access
Read configuration once at startup into a typed settings object
(pydantic-settings or the language equivalent). No os.environ scattered
through the codebase, no hardcoded model IDs or prices; anything that can
change per deployment is a setting.
6. Human-in-the-loop is a mechanism, not a hardcode
Approval gates are a generic interrupt the harness exposes (pause, surface context, resume on decision), not an if-statement for one specific tool.
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.
- 3mo ago First seen · 102 lines · 121 tokens per session scan A be27f86d591f
agent-design-doctrine is a skill published in the GitHub repository urmzd/dotfiles (6 stars, last pushed 4d ago), licensed Apache-2.0. It adds 121 tokens to every session and 918 once invoked, about $0.0005 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-31.
agent-design-doctrine compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| agent-design-doctrineurmzd/dotfiles | Skill | 6 | 4d ago | Apache-2.0 | A | 121 | Claude Code |
| metaceptionmagic3007/dotfiles | Skill | 11 | 5d ago | MIT | A | 332 | Claude Code |
| astropymagic3007/dotfiles | Skill | 11 | 5d ago | MIT | A | 56 | Claude Code, Codex |
| benchling-integrationmagic3007/dotfiles | Skill | 11 | 5d ago | MIT | A | 50 | Claude Code |
| mcp-notion-usage-guidemagic3007/dotfiles | Skill | 11 | 5d ago | MIT | A | 174 | Claude Code, Codex |
| esmmagic3007/dotfiles | Skill | 11 | 5d ago | MIT | A | 96 | Claude Code, Codex |
| ralph-loopmagic3007/dotfiles | Skill | 11 | 5d ago | MIT | A | 63 | Claude Code, Codex |