Official agent skill

Spec To Code Compliance

by trailofbits in trailofbits/skills

Check code against the documentation that specifies it - which requirements hold, which the code contradicts, which are absent, and what the code does that no document mentions.

OfficialCC-BY-SA-4.0Auto-check passedDocuments & Office

Install Spec To Code Compliance

skills CLI
$ npx skills add trailofbits/skills --skill spec-to-code-compliance -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install trailofbits/skills spec-to-code-compliance --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/trailofbits/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/spec-to-code-compliance/skills/spec-to-code-compliance .claude/skills/spec-to-code-compliance && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
spec-to-code-compliance
GitHub stars
7.4k
Token cost
~1.9k tokens
SKILL.md length
1,083 words
Files
7 (incl. assets)
Skills in repo
79
Repo updated
First seen
Licence
CC-BY-SA-4.0

At a glance

Check code against the documentation that specifies it - which requirements hold, which the code contradicts, which are absent, and what the code does that no document mentions.

  • Comparing an implementation against a whitepaper
  • SKILL.md covers When to Use, When NOT to Use, Do not check requirements in… and What comes back, and how to…, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Design document

What it does

Spec To Code Compliance is an agent skill from trailofbits/skills, published by the product's own GitHub organization. Check code against the documentation that specifies it - which requirements hold, which the code contradicts, which are absent, and what the code does that no document mentions. Use when comparing an implementation against a whitepaper, protocol spec, or design document.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 9 other files, including assets (for example `agents/openai.yaml`, `resources/ANALYSIS_FORMAT.md` and `resources/DIVERGENCE_RUBRIC.md`).

It sits in Documents & Office, covering Report writing. The repository describes itself as: Trail of Bits Claude Code skills for security research, vulnerability detection, and audit workflows. The licence is CC-BY-SA-4.0.

When your agent uses it

  • Comparing an implementation against a whitepaper
  • Design document

Example prompts

  • “/spec-to-code-compliance”

Requirements

  • Pre-approved tools (allowed-tools): Workflow, Task, Read, Grep, Glob

What it can do on your machine

Read from SKILL.md and the folder at commit 82fe822. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Workflow
    • Task
    • Read
    • Grep
    • Glob

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Spec To Code Compliance loads about 1.9k tokens when it runs. Until then it costs about 74 tokens; SKILL.md has 1,083 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~74
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from trailofbits/skills at commit 82fe822, republished under its CC-BY-SA-4.0 licence (© trailofbits). 1,083 words, ~1,878 tokens.

Download SKILL.mdSave it as .claude/skills/spec-to-code-compliance/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
spec-to-code-compliance
description
Check code against the documentation that specifies it - which requirements hold, which the code contradicts, which are absent, and what the code does that no document mentions. Use when comparing an implementation against a whitepaper, protocol spec, or design document.
allowed-tools
Workflow, Task, Read, Grep, Glob

Spec-to-Code Compliance

Two artifacts disagree, and the job is to find where. The documentation says what the system does; the code decides what it actually does. Every gap between them is either a bug or a documentation fix, and which one it is is the finding.

When to Use

You have both documentation describing intended behavior and the code that should implement it. A whitepaper against a protocol, a design note against a service, a README's stated guarantees against the functions behind them.

Most useful when the document is authoritative — something a client wrote, published, or is audited against — because then a divergence is a defect rather than stale prose.

When NOT to Use

Not for code with no documentation of intended behavior. There is nothing to check against, and a requirement inferred from the code is checked against itself. Build the system model first with audit-context-building.

Not for finding bugs in general. This finds one class: where the code and the document disagree. A bug both artifacts are silent about is out of scope, and a bug the document endorses is a finding against the document.

Not for writing or improving documentation, though it produces the list of what needs fixing.

Do not check requirements in this context

Run /spec-to-code-compliance:spec-compliance <path>. The slash command takes a path; to name the specification directly or widen the fan-out, ask for the run with those values — "run spec-compliance on ./contracts against SPEC.md, checking 20 requirements" — and they reach the script as {path, spec, limit}. Typing the object literally after the slash command does not work; it arrives as a string and becomes the path.

It finds the documents, splits them into individually checkable requirements, gives each requirement its own agent to hunt the code with, has independent agents try to refute every divergence before it is reported, and writes spec-compliance/REPORT.md plus one file per requirement under spec-compliance/requirements/. Only compact records come back here.

For a single requirement, dispatch the spec-to-code-compliance:spec-compliance-checker agent at it.

This is not a preference about where output lands. The check does not fit in one context window if it is done honestly: judging one requirement means reading the enforcement, its callees, and its callers, and doing that for thirty requirements means holding thirty call chains at once. Attempted inline, the first few get a real check and the rest get a plausible one — and the transcript looks the same either way, because a verdict resting on a promising function name reads exactly like one resting on having read the function. Per requirement, in its own context, is what makes that difference visible.

Two properties come from the script rather than from instructions, and cannot be had here:

  • A refutation the finding's author did not perform. Claude favors findings it produced when asked to check them. The workflow sends each divergence to agents that did not produce it — one reading the code again, one re-reading the document — and drops what either knocks down.
  • Records that cannot be prose. A subagent bound to a return schema has to name the lines it read and the searches it ran. An absent verdict arrives with the patterns tried and their results attached, which is the only thing separating a real absence from a search that stopped early.

Measured on the routes-not-inline eval: with this plugin installed the work is dispatched every run, without it never — Δ +1.00. Deleting this section while leaving the workflow in place changes nothing, because the workflow is a real command that gets found and dispatched on its own. Read that as the mechanism carrying the behavior rather than this text: the section is here so a human knows what runs and why, not because the routing depends on it.

Show full SKILL.md (461 more words)Show less

What comes back, and how to read it

Every requirement gets one of six verdicts: implemented, partial, contradicted, stronger-than-spec, absent, or undecidable. The interesting ones are the middle four.

  • partial is usually the most serious thing in the report. The requirement holds on the paths anyone would test and fails on one nobody did, which is how it survived long enough to be found.
  • absent rests entirely on its searched record. Read it. Enforcement often lives somewhere the search did not go — a modifier, a base class, a caller that checks first.
  • undecidable, and any documentProblem, are findings about the documentation. A requirement too vague to check is one the client cannot hold anyone to.
  • stronger-than-spec is an undocumented constraint. It works today, and nothing tells the next person changing that code that anything depended on it.

The report also carries the reverse direction — behavior the code has that no document mentions — which the per-requirement pass cannot find by construction, since it is driven by the documents.

Read notChecked, unverified, and unreadableDocuments before treating the report as complete. Requirements below the fan-out cut were never checked, and a divergence whose refutation agents both failed is unverified rather than confirmed.

Judgment the workflow does not make for you

Severity is consequence, not distance from the text: DIVERGENCE_RUBRIC.md. A rounding step that bleeds a pool outranks a MUST satisfied by different means than the document describes, and documentation drift with no behavioral consequence is a docs ticket.

The verdict is not the finding. absent on a mandatory requirement is a finding; absent on a sentence describing a roadmap item is not. Deciding which is which is what this skill is for, and the workflow hands you the evidence to decide it with.

The target does not have to be a contract

The question is the same everywhere — what does this requirement demand, where would it be enforced, is it enforced on every path — but what counts as a specification and where enforcement hides both change. DOMAIN_NOTES.md maps that across contracts, C and C++, services, and decompiled firmware, and covers the case where the specification is an RFC or a standard rather than a project document. Read it when the target is not a contract, and when scoping a check against a large standard.

Reference

  • ANALYSIS_FORMAT.md — the on-disk format for a per-requirement analysis. Read when extending this plugin or judging whether a record is trustworthy.
  • WORKED_EXAMPLE.md — three requirements chased to a verdict, one per verdict that is easy to get wrong: arithmetic that satisfies a requirement it does not resemble, an absence whose searches are the finding, and enforcement present on every path but the one nobody tested.
  • DOMAIN_NOTES.md — per-domain mapping of specifications and enforcement.
  • DIVERGENCE_RUBRIC.md — severity, and the two directions of a gap.

© trailofbits, CC-BY-SA-4.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 6 other files (assets) in plugins/spec-to-code-compliance/skills/spec-to-code-compliance of trailofbits/skills.

  • SKILL.md
  • agents/openai.yaml
  • assets/trail-of-bits-mark.svg
  • resources/ANALYSIS_FORMAT.md
  • resources/DIVERGENCE_RUBRIC.md
  • resources/DOMAIN_NOTES.md
  • resources/WORKED_EXAMPLE.md

Open the folder on GitHubat commit 82fe822

Compare with similar skills

Spec To Code Compliance next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Spec To Code Compliance compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Spec To Code Compliance this skilltrailofbits/skills7.4k—~1.9kAutomated safety check: PassCC-BY-SA-4.0
Graphic EbookVarnan-Tech/opendirectory672—~5kAutomated safety check: PassMIT
Make Photo Stamp ArchiveDlcccc71913/skill-make-photo-stamp-archive366—~1.3kAutomated safety check: PassMIT
Ky Markdown RebuilderKyrieCheungYep/ky-markdown-rebuilder117—~5.7kAutomated safety check: PassNone
Make Tape Collagesherlyryn/make-tape-collage117—~4.7kAutomated safety check: PassMIT
HTML Summarytestdouble/han279—~2.9kAutomated safety check: PassMIT

Similar skills

  • Graphic Ebook

    Varnan-Tech/opendirectory

    Creates professionally designed B2B SaaS e-books in HTML + CSS, exported as print-ready PDF.

    672 GitHub stars~5k tokensUpdated 1 mo ago
    Documents & OfficeAuto-check passed
  • Make Photo Stamp Archive

    Dlcccc71913/skill-make-photo-stamp-archive

    Transform one or more supplied photos into clean direct-splice archival artworks that pair a faithfully preserved photograph with a warm-white paper panel containing a compact hand-pressed custom…

    366 GitHub stars~1.3k tokensUpdated 1 mo ago
    Documents & OfficeAuto-check passed
  • Ky Markdown Rebuilder

    KyrieCheungYep/ky-markdown-rebuilder

    Rebuild visual documents into reliable Markdown by combining text extraction with page or screenshot alignment.

    117 GitHub stars~5.7k tokensUpdated 2 mo ago
    Documents & OfficeAuto-check passed
  • Make Tape Collage

    sherlyryn/make-tape-collage

    Transform a supplied photo or text description into a clean, tactile tape-collage raster artwork, or pair a faithfully preserved borderless photo print with a spacious warm-white paper panel…

    117 GitHub stars~4.7k tokensUpdated 1 mo ago
    Documents & OfficeAuto-check passed
  • HTML Summary

    testdouble/han

    Convert a stakeholder summary markdown file into a single self-contained HTML executive report — bottom line and decision asks up front, supporting detail later — styled with a Test Double-derived…

    279 GitHub stars~2.9k tokensUpdated 6 days ago
    Documents & OfficeAuto-check passed
  • Summarize

    reysu/ai-life-skills

    Summarize any content (YouTube video, article, whitepaper/PDF, podcast episode, book chapter, etc.) into a rich Obsidian note with section-by-section breakdowns, wikilinks to all technical concepts…

    270 GitHub stars~7.7k tokensUpdated 1 mo ago
    Documents & OfficeAuto-check passed

More from trailofbits/skills

All 79 skills in this repo
  • CodeQL Security Scan

    trailofbits/skills

    Official

    Scans a codebase for vulnerabilities with CodeQL's data flow and taint tracking in run-all or important-only modes, including data extensions for project-specific sources and sinks.

    7.4k GitHub stars~4.6k tokensUpdated 5 days ago
    Auto-check: notes
  • Code Graph Mermaid Diagrams

    trailofbits/skills

    Official

    Generates Mermaid diagrams from Trailmark code graphs, including call graphs, class hierarchies, module dependency maps, complexity heatmaps and attack surface data flows.

    7.4k GitHub stars~1.7k tokensUpdated 5 days ago
    Auto-check passed
  • Trailmark Graph Evolution

    trailofbits/skills

    Official

    Compares Trailmark code graphs at two snapshots, such as commits, tags or directories, to surface attack paths, blast radius and taint changes that text diffs miss.

    7.4k GitHub stars~3.4k tokensUpdated 5 days ago
    Auto-check passed
  • Let Fate Decide

    trailofbits/skills

    Official

    Draws a 12 Houses tarot spread to break ties when a request is vague or casually delegated, then reads the cards to pick the next step.

    7.4k GitHub stars~2.5k tokensUpdated 5 days ago
    Auto-check: notes
  • Semgrep Security Scan

    trailofbits/skills

    Official

    Detects languages, proposes rulesets for approval, then runs the approved Semgrep scan across a codebase and merges the output into one SARIF file.

    7.4k GitHub stars~3.7k tokensUpdated 5 days ago
    Auto-check: notes
  • Burp Suite Project Parser

    trailofbits/skills

    Official

    Searches and extracts data from Burp Suite project files on the command line: regex searches over responses, audit findings, proxy history and site map data.

    7.4k GitHub starsUsed in 3 repos~4.2k tokens
    Auto-check: notes

Questions about Spec To Code Compliance

What does Spec To Code Compliance do?

Check code against the documentation that specifies it - which requirements hold, which the code contradicts, which are absent, and what the code does that no document mentions. Spec To Code Compliance is an agent skill from trailofbits/skills, published by the product's own GitHub organization. Check code against the documentation that specifies it - which requirements hold, which the code contradicts, which are absent, and what the code does that no document mentions.

When should I use Spec To Code Compliance?

Spec To Code Compliance fits situations like: comparing an implementation against a whitepaper; design document.

How do I install Spec To Code Compliance in Claude Code?

Run `npx skills add trailofbits/skills --skill spec-to-code-compliance -a claude-code`. Or copy the skill folder (plugins/spec-to-code-compliance/skills/spec-to-code-compliance in trailofbits/skills) into .claude/skills/spec-to-code-compliance in your project. Claude Code loads it when a task matches its description.

How do I install Spec To Code Compliance in Codex?

Run `npx skills add trailofbits/skills --skill spec-to-code-compliance -a codex`. Or copy the skill folder (plugins/spec-to-code-compliance/skills/spec-to-code-compliance in trailofbits/skills) into .agents/skills/spec-to-code-compliance in your project. Codex loads it when a task matches its description.

Can I use Spec To Code Compliance in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add trailofbits/skills --skill spec-to-code-compliance -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/spec-to-code-compliance, .gemini/skills/spec-to-code-compliance, .github/skills/spec-to-code-compliance and .opencode/skills/spec-to-code-compliance in your project.

What does Spec To Code Compliance need to run?

SKILL.md names no scripts, command-line tools or credentials: Spec To Code Compliance is instructions for the agent only. Its frontmatter pre-approves these tools: Workflow, Task, Read, Grep, Glob.

Does Spec To Code Compliance access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Spec To Code Compliance safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Spec To Code Compliance use?

Spec To Code Compliance is published under the CC-BY-SA-4.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Spec To Code Compliance use?

About 1.9k tokens (SKILL.md is roughly 7.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Spec To Code Compliance?

Skills that share tags, products or a category with Spec To Code Compliance: Graphic Ebook (Varnan-Tech/opendirectory, 672 stars), Make Photo Stamp Archive (Dlcccc71913/skill-make-photo-stamp-archive, 366 stars), Ky Markdown Rebuilder (KyrieCheungYep/ky-markdown-rebuilder, 117 stars) and Make Tape Collage (sherlyryn/make-tape-collage, 117 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Spec To Code Compliance?

trailofbits (a GitHub organization, an official publisher) maintains it in trailofbits/skills, which has 7,400 GitHub stars. The repository holds 79 skills in this directory. The repository was last updated on October 2, 2026.

Source: trailofbits/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.