jeffthomason

Agent Doctrine — AI skill for Claude Code

AI community

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 ★
  • Skilldock — SkillDock is an AI skill manager and skill management desktop app for Claude Code, Cursor, Codex, Windsurf, Ge 490 ★
  • Memtrace Public — Structural memory for AI coding agents 466 ★

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