agent-glovebox: Skill for Claude Code

.claude/skills/doctrine-capture/SKILL.md

doctrine-capture is a skill for Claude Code from AlexanderMattTurner/agent-glovebox. It costs 211 tokens per session (1,538 once invoked), scanned C, original, Apache-2.0.

A workflow for recording permanent project rules when a user says something should always or never happen. It writes the rule into the repository so later sessions can follow it.

In plain words
What is it for?
It helps capture standing rules, update repository guidance, and distinguish lasting instructions from one-time requests.
Why use it?
It prevents important instructions from disappearing when a conversation ends and helps correct the current mistake before recording the rule.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions CLAUDE.md; mentions subagents.

This is AlexanderMattTurner/agent-glovebox's own configuration. It tells Claude Code how to work on agent-glovebox itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything agent-glovebox configures →

Reuse

Borrowing it

Nothing to install: this file belongs to AlexanderMattTurner/agent-glovebox. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/AlexanderMattTurner/agent-glovebox/main/.claude/skills/doctrine-capture/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/AlexanderMattTurner/agent-glovebox

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 doctrine-capture

README.md
[![agentmods](https://agentmods.dev/badge/skills/alexandermattturner/agent-glovebox/doctrine-capture/github.svg)](https://agentmods.dev/skills/alexandermattturner/agent-glovebox/doctrine-capture)
Your own site
<a href="https://agentmods.dev/skills/alexandermattturner/agent-glovebox/doctrine-capture"><img src="https://agentmods.dev/badge/skills/alexandermattturner/agent-glovebox/doctrine-capture/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.

agentmods 80×15 button for doctrine-capture

Your own site · 80×15
<a href="https://agentmods.dev/skills/alexandermattturner/agent-glovebox/doctrine-capture"><img src="https://agentmods.dev/badge/skills/alexandermattturner/agent-glovebox/doctrine-capture.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 211 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,538 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00211 $0.01538
Opus 5.5 $0.00084 $0.00615
Sonnet 5.5 $0.00042 $0.00308
Haiku 4.5 $0.00021 $0.00154

Measured 3d ago against content hash 49814b9821d1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

doctrine-capture scanned grade C with 1 finding 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 3d 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.

Instruction-override phrasinghighPrompt injection

Text telling the model to disregard its earlier instructions or safety rules is the shape of a prompt injection, whoever wrote it.

3. **Root `CLAUDE.md`** takes it only when it must fire BEFORE any file is opened, or must override the system prompt. That is a small set, and everything else that lands there taxes every unrelated session.
.claude/skills/doctrine-capture/SKILL.md · 62 lines

How it starts

The opening of the file, as written. The whole thing — 62 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Capturing a NEVER or an ALWAYS

The doctrine

A capitalised NEVER or ALWAYS from the user is a standing rule, and you are the only one who will ever hear it. The conversation ends and the next session starts from the committed tree, so a rule you merely obey this turn is a rule you deleted. Obey it now AND write it down, in the same turn.

A doctrine change needs no approval. Root CLAUDE.md § Guard budget asks only that it be LOUDLY ANNOUNCED in the PR description. Write a standing rule the user just stated without asking, and quote their sentence in the PR body. Apply the § What is NOT doctrine test below first, and write nothing when the test does not pass.

Fix the instance first, then the rule.

A complaint about the session's process is a capture too

When the user faults how this session ran, or calls a fix a patch, fix the instance at its cause, then capture the rule in the same turn without waiting to be asked. Find the doctrine sentence or tool that let it happen and REWRITE it. The doctrine files net zero lines or fewer: pay each clause you add by cutting an argument, an anecdote or a restatement, in that file first. Read git diff --numstat on the capture commit before you push it. Prefer the tool: a rule the session must obey under momentum belongs on the tool-use loop (prompt-authoring.md). Worked case: a session babysitting "even PRs" saved its set --bounded, so it sat with zero agents while seven even PRs went unwatched. The capture gave babysit-next.py a --parity rule that refills at every run.

A defect class you notice is a capture too

Do not wait for the user to complain. When you notice a defect CLASS — a third copy of a helper, a rule a sub-agent broke, a finding you are about to write under ## Also noticed — fix the instance, then find the rule that should have stopped it. No rule: write one. A rule that exists but did not fire: move it to where it fires — the sub-agent brief, the skill the activity loads, a hook. Worked case: an open PR added a third "is the process gone" helper, and the session only recorded it. The capture widened code-style.md's one-reader rule from grammars to every job, and made every implementation brief report the definitions it added.

Read the full file on GitHub · 62 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. 3d ago Changed · +6 tokens per session 49814b9821d1
  2. 15d ago Changed · +4 lines · +33 tokens per session 0b0352e7cddb
  3. 16d ago Changed · +29 tokens per session cf857286fbdd
  4. 24d ago Changed · +4 lines · +47 tokens per session 02a53bc92600
  5. 1mo ago Changed · +9 lines scan D → C e190659189d8
  6. 1mo ago Changed scan C → D 944586afd901
  7. 1mo ago Changed cff274df7041
  8. 1mo ago First seen · 45 lines · 96 tokens per session scan C ce91fe8cc42e

Subscribe to this mod's changes

doctrine-capture is a skill published in the GitHub repository AlexanderMattTurner/agent-glovebox (68 stars, last pushed today), licensed Apache-2.0. It adds 211 tokens to every session and 1,538 once invoked, about $0.0008 per session on Opus 5.5. A static security scan graded it C with 1 finding (instruction-override phrasing). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.