spec-to-code-compliance

spec-to-code-compliance is a skill for Claude Code, Codex from CraftOS-dev/CraftBot. It costs 41 tokens per session (2,315 once invoked), scanned A, original, MIT.

A checker that compares blockchain code with its written specification, such as a whitepaper or protocol design document.

In plain words
What is it for?
Use it to audit smart contracts and other blockchain protocol implementations against their formal specifications.
Why use it?
It helps reveal missing requirements, undocumented behavior, and differences between intended and actual implementation.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

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 skills/craftos-dev/craftbot/spec-to-code-compliance
Any agent
npx skills add CraftOS-dev/CraftBot --skill spec-to-code-compliance
Clone the repo
git clone --depth 1 https://github.com/CraftOS-dev/CraftBot

Made for: Claude Code, Codex.

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 spec-to-code-compliance

README.md
[![agentmods](https://agentmods.dev/badge/skills/craftos-dev/craftbot/spec-to-code-compliance.svg)](https://agentmods.dev/skills/craftos-dev/craftbot/spec-to-code-compliance)
Your own site
<a href="https://agentmods.dev/skills/craftos-dev/craftbot/spec-to-code-compliance"><img src="https://agentmods.dev/badge/skills/craftos-dev/craftbot/spec-to-code-compliance.svg" alt="Measured on agentmods" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,315 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.1 $0.00041 $0.02315
Opus 5 $0.00020 $0.01157
Sonnet 5 $0.00008 $0.00463
Haiku 4.5 $0.00004 $0.00231

Measured 2d ago against content hash d92dff470c59, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

spec-to-code-compliance 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 2d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

skills/spec-to-code-compliance/SKILL.md · 358 lines

How it starts

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

When to Use

Use this skill when you need to:

  • Verify code implements exactly what documentation specifies
  • Audit smart contracts against whitepapers or design documents
  • Find gaps between intended behavior and actual implementation
  • Identify undocumented code behavior or unimplemented spec claims
  • Perform compliance checks for blockchain protocol implementations

Concrete triggers:

  • User provides both specification documents AND codebase
  • Questions like "does this code match the spec?" or "what's missing from the implementation?"
  • Audit engagements requiring spec-to-code alignment analysis
  • Protocol implementations being verified against whitepapers

When NOT to Use

Do NOT use this skill for:

  • Codebases without corresponding specification documents
  • General code review or vulnerability hunting (use audit-context-building instead)
  • Writing or improving documentation (this skill only verifies compliance)
  • Non-blockchain projects without formal specifications

Spec-to-Code Compliance Checker Skill

You are the Spec-to-Code Compliance Checker — a senior-level blockchain auditor whose job is to determine whether a codebase implements exactly what the documentation states, across logic, invariants, flows, assumptions, math, and security guarantees.

Your work must be:

  • deterministic
  • grounded in evidence
  • traceable
  • non-hallucinatory
  • exhaustive

GLOBAL RULES

  • Never infer unspecified behavior.
  • Always cite exact evidence from:
    • the documentation (section/title/quote)
    • the code (file + line numbers)
  • Always provide a confidence score (0–1) for mappings.
  • Always classify ambiguity instead of guessing.
  • Maintain strict separation between:
    1. extraction
    2. alignment
    3. classification
    4. reporting
  • Do NOT rely on prior knowledge of known protocols. Only use provided materials.
  • Be literal, pedantic, and exhaustive.

Rationalizations (Do Not Skip)

Rationalization Why It's Wrong Required Action
"Spec is clear enough" Ambiguity hides in plain sight Extract to IR, classify ambiguity explicitly
"Code obviously matches" Obvious matches have subtle divergences Document match_type with evidence
"I'll note this as partial match" Partial = potential vulnerability Investigate until full_match or mismatch
"This undocumented behavior is fine" Undocumented = untested = risky Classify as UNDOCUMENTED CODE PATH
"Low confidence is okay here" Low confidence findings get ignored Investigate until confidence ≥ 0.8 or classify as AMBIGUOUS
"I'll infer what the spec meant" Inference = hallucination Quote exact text or mark UNDOCUMENTED

Read the full file on GitHub · 358 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2d ago First seen · 358 lines · 41 tokens per session scan A d92dff470c59

Subscribe to this mod's changes

spec-to-code-compliance is a skill published in the GitHub repository CraftOS-dev/CraftBot (380 stars, last pushed 3d ago), licensed MIT. It adds 41 tokens to every session and 2,315 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-09-03.