_anvil-protocol

_anvil-protocol is an agent for coding agents from samibs/skillfoundry. It costs 0 tokens per session (2,123 once invoked), scanned A, original, MIT.

A set of validation checks that agents must pass when handing work from one phase to another in a software development pipeline.

In plain words
What is it for?
Use it to validate agent handoffs and distinguish conversational checks from the project's automated command-line quality gates.
Why use it?
It catches misunderstandings and defects between agent stages before they spread through the rest of the task.

Agent

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.

agentmods
npx agentmods add agents/samibs/skillfoundry/_anvil-protocol
Clone the repo
git clone --depth 1 https://github.com/samibs/skillfoundry

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 _anvil-protocol

README.md
[![agentmods](https://agentmods.dev/badge/agents/samibs/skillfoundry/_anvil-protocol.svg)](https://agentmods.dev/agents/samibs/skillfoundry/_anvil-protocol)
Your own site
<a href="https://agentmods.dev/agents/samibs/skillfoundry/_anvil-protocol"><img src="https://agentmods.dev/badge/agents/samibs/skillfoundry/_anvil-protocol.svg" alt="Measured on agentmods" 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,123 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.02123
Opus 5 $0.00000 $0.01061
Sonnet 5 $0.00000 $0.00425
Haiku 4.5 $0.00000 $0.00212

Measured yesterday against content hash 0cb8f198276f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

_anvil-protocol 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 yesterday.

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.

agents/_anvil-protocol.md · 203 lines

How it starts

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

The Anvil — 7-Tier Agent-Handoff Gate Protocol (A0–A6)

Version: 1.1 Status: ACTIVE Applies To: All Agents in the Story Execution Pipeline


Purpose

The Anvil is a 7-tier validation system that runs between every agent phase in the story execution pipeline. It catches issues at the source — before they cascade through the chain and require expensive re-runs.

Core insight: LLMs generate code optimistically (forward, single-pass) but debug analytically (backwards from evidence). The Anvil forces analytical validation at every handoff point, not just at the end.

Namespace — read this first. Anvil tiers use the A-namespace (A0–A6). They are agent-handoff prompt checks. They are distinct from the CLI quality gates (T0–T7) implemented in sf_cli/src/core/gates.ts and scripts/anvil.sh, which the deterministic sf engine runs. The two systems have the same count but different checks — e.g. Anvil A3 is Self-Adversarial Review, while CLI gate T3 is Tests. Never conflate an "A#" (Anvil) with a "T#" (CLI gate). This is the single canonical Anvil tier definition; other docs reference it rather than re-tabulating.


The 7 Anvil Tiers (A0–A6)

Tier Name Type When What It Catches
A0 Correctness Contract Static check (no LLM, no build) Before any agent runs Missing tests for completed story acceptance criteria — every done_when item must have a corresponding test
A1 Shell Pre-Flight Shell script (no LLM) Between EVERY agent handoff Syntax errors, banned patterns, missing files, broken imports
A2 Canary Smoke Test Quick execution test After Coder, before Tester Fundamental breakage — module won't import, won't compile
A3 Self-Adversarial Review Coder self-critique After Coder writes code Coder's blind spots, untested failure modes
A4 Scope Validation Diff comparison In Gate-Keeper validation Scope creep, incomplete implementation
A4b Traceability Test Line-level diff analysis In Gate-Keeper validation (after A4) Orthogonal changes — lines that don't trace to the request (see LLM-020)
A5 Contract Enforcement API contract check In Gate-Keeper validation API drift, wrong signatures, missing endpoints
A6 Shadow Tester Parallel risk agent Concurrent with Coder Risk prioritization for Tester, early warnings

Read the full file on GitHub · 203 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. yesterday First seen · 203 lines · 0 tokens per session scan A 0cb8f198276f

Subscribe to this mod's changes

_anvil-protocol is an agent published in the GitHub repository samibs/skillfoundry (12 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,123 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-09-03.