Agent Doctrine — AI skill for Claude Code
A free, opinionated set of doctrine files that keep AI coding agents (Claude Code, Cursor, Codex, Copilot, Windsurf, etc.) from drifting, overstepping scope, and quietly burning your token budget on c.
How to install Agent Doctrine
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open jeffthomason/agent-doctrine and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Agent Doctrine does
A free, opinionated set of doctrine files that keep AI coding agents (Claude Code, Cursor, Codex, Copilot, Windsurf, etc.) from drifting, overstepping scope, and quietly burning your token budget on context they didn't need.
Alternatives in AI
- Codeburn — Free, local tool to track AI coding token usage and cost across 37 tools and agents (Claude Code, Cursor, Code 9.7k ★
- AI Toolkit — Professional-grade AI coding toolkit: 94 skills, 44 agents, multi-platform (Claude, Cursor, Windsurf, Copilot 167 ★
- Terseai — Claude Code & Cursor token usage monitor and cost tracker for macOS & Windows 58 ★
README
Agent Doctrine Template
A free, opinionated set of doctrine files that keep AI coding agents (Claude Code, Cursor, Codex, Copilot, Windsurf, etc.) from drifting, overstepping scope, and quietly burning your token budget on context they didn't need.
This isn't auto-generated from scanning your repo. It's distilled from three real, solo-built, shipped production codebases — refined project over project, not written in one sitting.
Why this exists
If you've built anything real with an AI coding agent, you already know the failure mode: it works great for a few days, then it starts making up its own conventions, touching files it shouldn't, re-explaining decisions you already made, and quietly bloating every prompt with context it doesn't need. The fix isn't a smarter model. It's giving the agent a persistent, explicit doctrine to read before it plans anything — the same way you'd onboard a new engineer with a README instead of just pointing at the codebase and hoping.
That idea has a name now — **spec-driven development** — and by 2026 most major AI coding tools ship some version of it (GitHub Spec Kit, Amazon Kiro, Claude Code's own agent-doc conventions, and more). This template isn't trying to replace any of that. It's a smaller, opinionated starting point, free, that you can drop into a project in five minutes — built from what actually held up across real shipped work, not a framework designed top-down.
How this is different from the auto-generators
There are already good free tools (`agentscribe`, `agentinit`, and others) that scan your codebase and auto-generate `AGENTS.md`/`CLAUDE.md`/`.cursorrules` from your stack. Those are genuinely useful for the *mechanical* part — detecting your linter, your package manager, your test runner.
This template is not that, and doesn't try to be. It focuses on the part auto-detection can't give you:
- Explicit stop conditions — the specific situations where an agent should stop and ask instead of guessing
Related Skills
Context Token Budget
Guard AI context usage with a fail-closed token budget — stop burning tokens. 用 fail-closed 的 token 预算守护 AI 上下
Rebound Skill
Rebound recomposition budget monitor — AI agent skill for Compose performance analysis. Works with Claude Code
Secretless AI
One command to keep secrets out of AI (LLMs). Works with Claude Code, Cursor, Copilot, Windsurf, and any AI co
Agent Context Framework
Production-ready Markdown (.md) context templates for AI coding agents (Cursor, Claude Code, Aider, Windsurf).
AI Rules Sync
Keep one source of truth for your AI coding-agent rules. Convert and sync between AGENTS.md, CLAUDE.md, .curso
Usewarden
Free, local guardrail for AI coding agents — Claude Code, Cursor, Gemini CLI and more. Blocks out-of-scope wri
Related Agents
10x Tool Calls
Cursor and Windsurf meter usage by requests and tool calls rather than tokens, which means a finished or stall
AI Manager
Orchestrates work via the 4 Codex agents, manages context/memory lifecycle and token budget
Agentic Auditor
PYA specialist spawned by the /pya orchestrator. Audits AI agent and LLM surfaces in an untrusted repository: