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.svg" alt="Measured on agentmods" 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 | $0.00060 | $0.00459 |
| Sonnet 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 7d 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.
- 7d 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 (3 stars, last pushed today), licensed Apache-2.0. It adds 121 tokens to every session and 918 once invoked, about $0.0006 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-31.
Other skills, from other repositories
benchling-integration
Benchling Python SDK and REST API integration for registry entities, inventory, ELN entries, workflows, Benchling Apps, and Data Warehouse queries. Use when automating lab data with benchling-sdk or the v2 API.
mcp-notion-usage-guide
A usage guide for connecting AI agents to Notion databases through MCP. Notion is a workspace for documents and databases, while a database view is a saved way of displaying database records.
astropy
Core Python library for astronomy and astrophysics workflows that need Astropy APIs, including units/quantities, coordinates, FITS I/O, tables, time systems, WCS, and cosmology. Use when implementing or debugging astronomical data analysis code with Astropy.
esm
Comprehensive toolkit for EvolutionaryScale protein language models including ESM3 (generative multimodal design across sequence, structure, and function) and ESM C (efficient embeddings). Use for protein sequence/structure/function tasks, inverse folding, embeddings, variant design, and ESMFold2 structure prediction…
ralph-loop
An iterative development workflow that moves from requirements to planning to building, with code review and tests required at each stage.
create-pr
Rebase from the latest origin/main, squash the commits from it, and then create a PR on github with intelligent commit messages based on staged changes.