agent-design-doctrine

agent-design-doctrine is a skill for Claude Code from urmzd/dotfiles. It costs 121 tokens per session (918 once invoked), scanned A, original, Apache-2.0.

A set of design rules for building software agents that use language models and tools. It covers safety controls, tool behavior, small control loops, component boundaries, typed settings, and repeatable testing.

In plain words
What is it for?
Use it when designing or reviewing an agent's tool interfaces, safety limits, configuration, control loop, architecture, or evaluation tests.
Why use it?
It helps prevent unsafe actions from depending only on the model following instructions. It also gives teams consistent ways to structure, test, and review agent systems.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it when designing or reviewing an agent's tool interfaces, safety limits, configuration, control loop, architecture, or evaluation tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/urmzd/dotfiles/agent-design-doctrine
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 urmzd/dotfiles --skill agent-design-doctrine
Clone the repo
git clone --depth 1 https://github.com/urmzd/dotfiles

Made for: Claude Code.

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 agent-design-doctrine

README.md
[![agentmods](https://agentmods.dev/badge/skills/urmzd/dotfiles/agent-design-doctrine.svg)](https://agentmods.dev/skills/urmzd/dotfiles/agent-design-doctrine)
Your own site
<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>
Per session 121 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 918 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 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.00121 $0.00918
Opus 5 $0.00060 $0.00459
Sonnet 5 $0.00024 $0.00184
Haiku 4.5 $0.00012 $0.00092

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

Security

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.

dot_agents/skills/agent-design-doctrine/SKILL.md · 102 lines

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.

Read the full file on GitHub · 102 lines

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. 7d ago First seen · 102 lines · 121 tokens per session scan A be27f86d591f

Subscribe to this mod's changes

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.

Related

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.

magic3007/dotfiles · 50 tokens

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.

magic3007/dotfiles · 174 tokens

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.

magic3007/dotfiles · 56 tokens

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…

magic3007/dotfiles · 96 tokens

ralph-loop

An iterative development workflow that moves from requirements to planning to building, with code review and tests required at each stage.

magic3007/dotfiles · 63 tokens

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.

magic3007/dotfiles · 34 tokens