anchor

anchor is a command for Claude Code from jonase47/ccpr. It costs 0 tokens per session (2,749 once invoked), scanned A, original, MIT.

A command that checks whether project documents match the repository's actual Git history. Git is the system that records code changes over time, and an anchor commit is a specific recorded version used for comparison.

In plain words
What is it for?
Use it to verify phase documents against repository commits. It requires a Git repository with at least one commit and project phase folders under docs/.
Why use it?
It helps detect documents that describe code from the wrong version or claim a state that was never committed. It can check the whole project or one project phase.

Command for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: reads .claude/ paths; mentions subagents.

Good fit Use it to verify phase documents against repository commits. It requires a Git repository with at least one commit and project phase folders under docs/.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/jonase47/ccpr/anchor
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.

Clone the repo
git clone --depth 1 https://github.com/jonase47/ccpr

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 anchor

README.md
[![agentmods](https://agentmods.dev/badge/commands/jonase47/ccpr/anchor/github.svg)](https://agentmods.dev/commands/jonase47/ccpr/anchor)
Your own site
<a href="https://agentmods.dev/commands/jonase47/ccpr/anchor"><img src="https://agentmods.dev/badge/commands/jonase47/ccpr/anchor/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 anchor

Your own site · 80×15
<a href="https://agentmods.dev/commands/jonase47/ccpr/anchor"><img src="https://agentmods.dev/badge/commands/jonase47/ccpr/anchor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,749 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.00000 $0.02749
Opus 5.5 $0.00000 $0.01100
Sonnet 5.5 $0.00000 $0.00550
Haiku 4.5 $0.00000 $0.00275

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

Security

Grade A, and why

anchor 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 26d 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.

commands/anchor.md · 209 lines

How it starts

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

/anchor – Anchored State Verification (Docs vs. Implementation)

Checks phase documents against the code they describe, not against other documents. Where /cross-check compares Markdown to Markdown, /anchor compares a document's declared anchor_commit to the repository's actual history — the two-stage check design of docs/adr/ADR-0009-anchored-state-verification.md (both addenda).

Argument: $ARGUMENTS = [optional: projectdir] [--scope ]

  • Without argument: operates on $(pwd).
  • --scope <folder> restricts the run to one phase folder (discovery, concept, validation, architecture, planning, quality, launch, operations).

Prerequisites

  • A git repository with at least one commit.
  • At least one phase folder under docs/ (discovery/, concept/, validation/, architecture/, planning/, quality/, launch/, operations/).
  • Not required, but the reason a run reports mostly "not verified": an anchor written on the phase index via anchor set (normally done by the freeze hook on a Gate-Go, ADR-0009 Addendum 2).

Lead Agent

Orchestrator runs Stage 1 directly (a mechanical script call, nothing to delegate). Stage 2's per-document judgment can be done by the orchestrator or delegated to code-reviewer / system-architekt for a scope with unfamiliar code — in either case, the agent doing Stage 2 is bound by The agent clause below (§3 is the escalation step, not the clause).

Execution

1. Stage 1 — mechanical delta (no verdict)

Run exactly:

bash ~/.claude/scripts/anchor.sh check [projectdir] [--scope <folder>]

This is the only source for Stage 1 data — do not re-derive the delta by hand (e.g. git diff against a guessed commit). The report already contains, per scope: the resolved anchor_commit/anchor_date, the last production-code commit, the changed production-code paths, which document(s) claim each path via covers:, and the full "Affected documents" list per scope with each document's own status.

Read the full file on GitHub · 209 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. 26d ago Changed · -1 lines 312bab41a77b
  2. 1mo ago Changed · +3 lines 5a149aa6b19b
  3. 1mo ago Changed ec8480047870
  4. 1mo ago Changed · +3 lines 69c7d400408c
  5. 1mo ago First seen · 204 lines · 0 tokens per session scan A 539b0fa50b24

Subscribe to this mod's changes

anchor is a command published in the GitHub repository jonase47/ccpr (1 stars, last pushed 26d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,749 tokens. 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.