Spec To Code Compliance
Check code against the documentation that specifies it: one agent per requirement, divergences refuted before they are reported, evidence cited to the line
- Type
- Plugin
- Repository
- trailofbits/skills
- GitHub stars
- 7.3k
- License
- CC-BY-SA-4.0
- Repo last updated
- Sep 25, 2026
- Version
- 2.0.2
- Author
- Omar Inuwa
What Spec To Code Compliance is
Spec To Code Compliance is a plugin published in the trailofbits/skills repository on GitHub, which has about 7.3k stars. The repository describes itself as: “Trail of Bits Claude Code skills for security research, vulnerability detection, and audit workflows”
A plugin is a package that bundles skills, slash commands, subagents, hooks, and MCP connectors so they install together. Plugins are plain files with a manifest at .claude-plugin/plugin.json, and they work in both Claude Code and Claude Cowork.
Installing Spec To Code Compliance adds everything it ships in one step. Connectors inside a plugin still need to be connected separately, and hooks and subagents only run in Cowork and Claude Code, not in regular chat.
How to install Spec To Code Compliance
Claude Code
- Add the repository as a plugin marketplace: claude plugin marketplace add trailofbits/skills
- Install the plugin: claude plugin install spec-to-code-compliance@<marketplace-name>, using the marketplace name from the repository's .claude-plugin/marketplace.json.
- Restart the session if the new skills or commands don't appear straight away.
Claude Cowork
- Open Customize → Plugins and choose Add marketplace.
- Enter trailofbits/skills (the owner/repo shorthand works for GitHub).
- Find Spec To Code Compliance in the list, click Install, then connect any connectors it needs from its Connectors tab.
New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.
Inside the source file
An excerpt from plugins/spec-to-code-compliance/.claude-plugin/plugin.json, shared under the repository's CC-BY-SA-4.0 license. Read the full file on GitHub.
Check code against the documentation that specifies it. Every gap is either a bug or a documentation fix, and which one it is is the finding.
Author: Omar Inuwa
Install
/plugin install trailofbits/skills/plugins/spec-to-code-complianceUse
/spec-to-code-compliance:spec-compliance ./contractsThe slash command takes a path. To name the specification directly or widen the fan-out, ask for the run in words — "run spec-compliance on ./contracts against SPEC.md, checking 20 requirements" — and the values reach the script as {path, spec, limit}. Typing that object after the slash command does not work: it arrives as a string and is treated as the path.
Writes spec-compliance/REPORT.md and one analysis per requirement under spec-compliance/requirements/. The session gets the alignment matrix and the surviving divergences, not the analysis.
How it works
- Extract — find the documents describing intended behavior, and split them into individually checkable requirements, quoted verbatim. Compound claims are split: a sentence requiring two things is two requirements, because the code can get one right and the other wrong.
- Align — one agent per requirement hunts the code for that requirement alone, reading the enforcement, its callees, and its callers. A separate agent sweeps the reverse direction for behavior no document mentions.
- Verify — each divergence goes to two agents that did not produce it, one re-reading the code and one re-reading the document, both trying to refute it. What either knocks down is dropped.
- Report — alignment matrix, surviving divergences worst first, undocumented behavior, and the problems in the documentation itself.
Per-requirement fan-out is what makes the check honest. Judging a requirement means reading a call chain; thirty requirements is thirty call chains, which does not fit one context window. Done inline, the first few requirements get a real check and the rest get a plausible one — and a verdict resting on a promising function name reads exactly like one resting on having read the function.
Verdicts
Components
- workflows/spec-compliance.js — the orchestration
- agents/spec-compliance-checker.md — the per-requirement worker; dispatch it directly for a single requirement
- resources/ANALYSIS_FORMAT.md — the on-disk format for a per-requirement analysis
- resources/DOMAIN_NOTES.md — what counts as a specification and where enforcement hides, across contracts, C and C++, services, and firmware, plus scoping a check against an RFC or standard
- resources/WORKED_EXAMPLE.md — three requirements chased to a verdict, for calibration
- resources/DIVERGENCE_RUBRIC.md — severity, and the two directions of a gap
Resources live under skills/spec-to-code-compliance/.
Migrating from 1.x
/trailofbits:spec-compliance is removed. The entry point is /spec-to-code-compliance:spec-compliance , and the arguments inverted: the path comes first and the specification is discovered rather than named. Pass {path, spec} when you want to point at it directly.
PDF whitepapers work. DOCX and Notion exports do not — 1.x claimed to normalize them and had no converter; the discovery step now names an unreadable document instead of guessing at its contents.
The report is no longer a fixed 16 sections. Sections with nothing in them are left out rather than filled.
Related
- audit-context-building — build the system model first when the code is unfamiliar
- issue-writer — turn surviving divergences into client-facing findings
Before you install
- Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
- Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
- Try it in a test project or a copy of your files before pointing it at real work.
- Pin the version you tested, and review changes before updating.
- Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.
FAQ
What is Spec To Code Compliance?
Spec To Code Compliance is a plugin for Claude Code and Claude Cowork from the trailofbits/skills repository on GitHub. Check code against the documentation that specifies it: one agent per requirement, divergences refuted before they are reported, evidence cited to the line
How do I install Spec To Code Compliance in Claude Code?
Add the repository as a plugin marketplace: claude plugin marketplace add trailofbits/skills Install the plugin: claude plugin install spec-to-code-compliance@<marketplace-name>, using the marketplace name from the repository's .claude-plugin/marketplace.json. Restart the session if the new skills or commands don't appear straight away.
Can I use Spec To Code Compliance in Claude Cowork?
Open Customize → Plugins and choose Add marketplace. Enter trailofbits/skills (the owner/repo shorthand works for GitHub). Find Spec To Code Compliance in the list, click Install, then connect any connectors it needs from its Connectors tab.
Is Spec To Code Compliance safe to install?
It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.
Similar resources
- Trailofbits:Entry Points Identifies state-changing entry points in smart contracts Slash Command · trailofbits/skills
- Workflow Skill Reviewer Reviews workflow-based Claude Code skills for structural quality, pattern adherence, tool assignment correctness, and anti-pattern… Subagent · trailofbits/skills
- Trailofbits:Semgrep Rule Creates Semgrep rules with test-first methodology Slash Command · trailofbits/skills
- Trailofbits:Variants Finds similar vulnerabilities using pattern-based analysis Slash Command · trailofbits/skills
- Static Analysis Static analysis toolkit with CodeQL, Semgrep, and SARIF parsing for security vulnerability detection Plugin · trailofbits/skills
- Skill Improver Automatically reviews and fixes Claude Code skills through iterative refinement until they meet quality standards. Requires plugin-dev… Plugin · trailofbits/skills
- Supply Chain Risk Auditor Audit a project's npm, PyPI, and Go dependencies for supply-chain risk: version-matched advisories for direct dependencies and the full lockfile tree, abandoned upstreams, npm publisher concentration, and install scripts Plugin · trailofbits/skills
- Sharp Edges Identify error-prone APIs, dangerous configurations, and footgun designs that enable security mistakes Plugin · trailofbits/skills