---
stable_id: skills/skills-sh-trailofbits-skills-spec-to-code-compliance
type: skills
title: skills-sh-trailofbits-skills-spec-to-code-compliance
summary: >-
  # Intermediate Representation Examples

  The following examples demonstrate the complete IR workflow using realistic
  DEX swap patterns.

  ---

  ## Example 1: Spec-IR Record

  **Scenario:** Extracting a security requirement from a DEX protocol
  whitepaper.

  ```yaml

  id: SPEC-001

  spec_excerpt: "All swaps MUST enforce maximum slippage of 1% to protect users
  from sandwich attacks"

  source_section: "Whitepaper §4.1 - Trading Mechanism & User Protection"

  source_document: "dex-protocol-whitepaper-v3.pdf"
tags:
  - skills-sh
  - skills-sh-all-time
source_url: https://raw.githubusercontent.com/trailofbits/skills/HEAD/plugins/spec-to-code-compliance/skills/spec-to-code-compliance/resources/IR_EXAMPLES.md
license: ""
upstream_ref: https://skills.sh/trailofbits/skills/spec-to-code-compliance
github_stars: null
github_forks: null
github_is_organization: null
retrieved_at: 2026-06-11T08:32:04.282Z
content_sha256: 053f670171dbb59b795257bbf24865641c66af657a025dc9d79baad4fb2501ec
---
