Back to skills

spec-to-code-compliance

security

Verifies that a smart contract codebase implements exactly what its specification documents describe. It works by extracting intent from whitepapers, design docs, and protocol specs, then mapping each

Setup & Installation

npx skills add https://github.com/trailofbits/spec-to-code-compliance --skill spec-to-code-compliance
or paste the link and ask your coding assistant to install it
https://github.com/trailofbits/spec-to-code-compliance
View on GitHub

What This Skill Does

Verifies that a smart contract codebase implements exactly what its specification documents describe. It works by extracting intent from whitepapers, design docs, and protocol specs, then mapping each claim to actual code behavior across logic, math, invariants, access control, and state transitions. Gaps, divergences, and undocumented behaviors are classified by severity and reported with full evidence traces. Manual spec-to-code review misses subtle divergences because auditors rely on intuition rather than exhaustive line-by-line extraction and alignment against a structured IR, which this skill enforces mechanically.

When to use it

  • Working with spec to code compliance functionality
  • Implementing spec to code compliance features
  • Debugging spec to code compliance related issues