spec-to-code-compliance
Specification-to-code compliance checker for blockchain audits
Developer Setup
Setup & Installation
npx skills add https://github.com/trailofbits/skills --skill spec-to-code-compliancenpx skills add https://github.com/trailofbits/skills --skill spec-to-code-complianceOverview
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.
Application
When to use this Skill
- Configuring integration settings for custom agent workflows.
- Optimizing query execution and response latency in production.
- Developing clean, standard-compliant implementations for enterprise services.
- Troubleshooting connection timeouts and authentication handshakes.
- Monitoring API rate limits and execution pipelines programmatically.
Documentation
Show Skills.md file
Spec-to-Code Compliance
Specification-to-code compliance checker for blockchain audits with evidence-based alignment analysis.
Author: Omar Inuwa
When to Use
Use this skill when you need to:
- Verify that code implements exactly what documentation specifies
- Find gaps between intended behavior and actual implementation
- Audit smart contracts against whitepapers or design documents
- Identify undocumented code behavior or unimplemented spec claims
What It Does
This skill performs deterministic, evidence-based alignment between specifications and code:
- Documentation Discovery - Finds all spec sources (whitepapers, READMEs, design notes)
- Spec Intent Extraction - Normalizes all intended behavior into structured format
- Code Behavior Analysis - Line-by-line semantic analysis of actual implementation
- Alignment Comparison - Maps spec items to code with match types and confidence scores
- Divergence Classification - Categorizes misalignments by severity (Critical/High/Medium/Low)
Key Principle
Recommendations