anchor

anchor is a command for Claude Code from Redtropig/harness-anchor. It costs 37 tokens per session (866 once invoked), scanned A, original, MIT.

A setup command that creates harness-anchor project files, including instructions, a feature list, an initialization script, progress notes, and project documentation.

In plain words
What is it for?
Use it when starting harness-anchor in a project, especially when the project needs initialization checks, feature tracking, progress handoffs, or a project contents overview.
Why use it?
It gives a project a shared set of files for tracking work and checking its environment. It also makes conflicts visible instead of silently replacing existing files.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool; mentions AGENTS.md.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the harness-anchor plugin — 14 skills, 9 commands, 5 agents, 5 hooks shipped together

Good fit Use it when starting harness-anchor in a project, especially when the project needs initialization checks, feature tracking, progress handoffs, or a project contents overview.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add Redtropig/harness-anchor
Claude Code
/plugin install harness-anchor

Made for: Claude Code.

Or install harness-anchor, the plugin that ships this one along with the rest of its 14 skills, 9 commands, 5 agents, 5 hooks.

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/redtropig/harness-anchor/anchor/github.svg)](https://agentmods.dev/commands/redtropig/harness-anchor/anchor)
Your own site
<a href="https://agentmods.dev/commands/redtropig/harness-anchor/anchor"><img src="https://agentmods.dev/badge/commands/redtropig/harness-anchor/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/redtropig/harness-anchor/anchor"><img src="https://agentmods.dev/badge/commands/redtropig/harness-anchor/anchor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 866 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.00037 $0.00866
Opus 5 $0.00018 $0.00433
Sonnet 5 $0.00007 $0.00173
Haiku 4.5 $0.00004 $0.00087

Measured 9d ago against content hash 706e3e4c9c25, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, 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 9d 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 · 79 lines

How it starts

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

/anchor

Initialize harness-anchor state files in the current project. The mechanical work (existence checks, placeholder substitution, writes, chmod) is done by scripts/scaffold.sh — the single source of truth. Your job is the decisions the script refuses to make.

Steps

  1. If the directory is not a git repository, ask first: continue anyway (TOC freshness will report not-git) or run git init (recommended)? The script itself only reports the fact; this decision is yours to ask.

  2. Run the scaffold:

    bash ${CLAUDE_PLUGIN_ROOT}/scripts/scaffold.sh --target "$(pwd)"
    

    The report lists written: / kept (skip-by-default): / conflicts (need decision): and prints the next-steps block.

  3. Resolve conflicts — never silently overwrite. For each file under conflicts (need decision):, AskUserQuestion with options [Overwrite / Skip / Show diff].

    • Show diff → run diff "$(pwd)/<file>" <(bash ${CLAUDE_PLUGIN_ROOT}/scripts/scaffold.sh --target "$(pwd)" --render <file>) and show it, then re-ask.
    • Collect the approved files and apply them in ONE call: bash ${CLAUDE_PLUGIN_ROOT}/scripts/scaffold.sh --target "$(pwd)" --overwrite <f1,f2>
    • kept (skip-by-default) files (feature_list.json, golden-rules.md) hold accumulated value — only overwrite if the user explicitly asks; mention they were kept.
  4. Print the script's next-steps block verbatim (it is the report tail).

  5. Do NOT auto-commit. Let the user review the diff first.

  6. Hand off to /cpp-init if this is a C/C++ project missing its config.

    bash ${CLAUDE_PLUGIN_ROOT}/scripts/cpp-detect.sh --target "$(pwd)"
    

    If is_cpp_project is true and either has_clang_format or has_clang_tidy is false, make the last line of your reply a concrete recommendation:

    Next: run /cpp-init — this is a <build_system> project with no .clang-format/.clang-tidy yet, and /cpp-init drops those plus a per-build-system init.sh, scripts/lint.sh, and the sanitizer build.

Read the full file on GitHub · 79 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. 9d ago First seen · 79 lines · 37 tokens per session scan A 706e3e4c9c25

Subscribe to this mod's changes

anchor is a command published in the GitHub repository Redtropig/harness-anchor (13 stars, last pushed 1mo ago), licensed MIT. It adds 37 tokens to every session and 866 once invoked, about $0.0002 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-30.

Related

Other commands, from other repositories

explore

Multi-angle codebase exploration spawning 3-5 parallel agents for code structure, data flow, architecture patterns, and health assessment. Generates ASCII visualizations, import graphs, and design pattern detection with cross-session memory storage. Use when exploring a repo, discovering architecture, onboarding to a…

yonatangross/orchestkit · 68 tokens

commit

Run when user calls /commit or asks to generate a commit message. Analyzes staged changes and writes a structured commit message.

guanyang/open-agent-hub · 28 tokens

design-context-extract

Extract design DNA from app screenshots, live URLs, or screen recordings using Google Stitch — color palettes, typography, spacing tokens, component patterns, and motion specs as design-tokens.json or Tailwind config. Use when the user points to a screenshot, URL, or video and asks to extract or audit the design…

yonatangross/orchestkit · 84 tokens

design-import

Scaffolds React components from a Claude Design handoff bundle and stops at files on disk: no stories, no tests, no pull request. Use when handed a claude.ai/design URL or a local bundle file; when that same scaffold should carry on through test generation, browser verification and an opened PR, run /ork:design-ship…

yonatangross/orchestkit · 74 tokens

dev

One-command dev loop boot. Spins up portless (named HTTPS subdomain), emulate (stateful API mocks), the project's dev server, and an agent-browser session, all keyed to the current git branch. Use when starting a feature branch, switching worktrees, or returning to a project after a break. Skips silently with install…

yonatangross/orchestkit · 76 tokens

test-tdd

Run when user calls /test-tdd. Scans modified files, locates their corresponding unit/integration test suites, and runs them.

guanyang/open-agent-hub · 32 tokens