skills/advanced/protocol-templates/SKILL.md
Structured, protocol-type-specific audit templates enumerating the exact checks, invariants, and attack vectors relevant to each protocol category. Use when auditing AMM/DEX, lending, bridge, governance, or vault protocols to load targeted checklists based on context detection results.
npx skillsauth add 0x-shashi/web3-audit-skills skills/advanced/protocol-templatesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
4 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Provide structured, protocol-type-specific audit templates that enumerate the exact checks, invariants, and attack vectors relevant to each protocol category. These templates are loaded based on context detection.
| Template | Protocol Type | Key Focus Areas | |----------|--------------|-----------------| | AMM/DEX | Uniswap, Curve, Balancer-style | Price manipulation, LP attacks, MEV | | Bridge | Cross-chain bridges | Message verification, replay, accounting | | Lending | Aave, Compound-style | Oracle, liquidation, interest rates | | NFT Marketplace | OpenSea, Blur-style | Order validation, royalties, signatures | | Staking | Lido, RocketPool-style | Reward distribution, withdrawal, delegation |
Each template follows a consistent format:
Protocol templates require Context Detection for automatic loading. Manual template selection is also supported.
To verify template coverage, validate against known protocol types:
# Validate template completeness
required_sections = ["Overview", "Architecture Checklist", "Invariants", "Attack Vectors", "Critical Functions"]
for template in templates:
for section in required_sections:
assert section in template.sections, f"{template.name} missing {section}"
# Example template loading configuration
detected_type: amm-dex
confidence: 0.92
loaded_templates:
- amm-dex-template.md
- defi-patterns.md
checklist: dex-amm-checklist
# Test template file integrity
for f in *-template.md; do echo "Validating $f"; head -5 "$f"; done
development
Systematically hunt for every variant of a discovered vulnerability across the entire codebase. Use when a bug is found and all instances of the same root cause pattern must be identified, or when performing variant analysis during competitive audits on Code4rena or Sherlock.
testing
Use when the user wants to audit TON smart contracts for security vulnerabilities, scan FunC or Tact contracts for message chain replay, bounce handling, or gas issues, review TON DeFi protocols for actor-model concurrency flaws, or analyze asynchronous message passing security.
tools
Analyze ERC20/ERC721/ERC1155 token implementations for non-standard behavior, fee-on-transfer mechanics, rebasing logic, blacklists, pausability, and integration risks. Use when reviewing protocols that interact with external tokens or implementing token-related features.
testing
Use when the user wants to audit Sui Move smart contracts, scan Sui-specific patterns including object ownership, shared objects, or dynamic fields, review Sui DeFi protocols for object model security issues, or analyze Sui-specific transaction and consensus patterns.