Skip to content
PluginImportedShare-alike license

building-secure-contracts

Comprehensive smart contract security toolkit based on Trail of Bits' Building Secure Contracts framework. Includes vulnerability scanners for 6 blockchains and 5 development guideline assistants.

Imported description, not reviewed yet

This item came from its original repository and was only scanned automatically; no editor has written an Arabic description for it yet. Read its content yourself before you rely on it. This page is not indexed by search engines until it is reviewed.

Download

Files: 58 · Size: 481 KB

Download the ZIP

The file carries the license of the original source.

Install

Plugins are installed from a plugin marketplace in Claude Code, not by copying files. Download the package to read its content and its license.

Instructions

Building Secure Contracts

Comprehensive smart contract security toolkit based on Trail of Bits' Building Secure Contracts framework.

Author: Omar Inuwa

Overview

This plugin provides 11 specialized skills for smart contract security across multiple blockchain platforms:

  • 6 Vulnerability Scanners for platform-specific attack patterns
  • 5 Development Guidelines Assistants for secure development practices

Installation

/plugin install trailofbits/skills/plugins/building-secure-contracts

Vulnerability Scanners

Platform-specific vulnerability detection based on Trail of Bits' Not So Smart Contracts repository.

Algorand Vulnerability Scanner

Skill: /building-secure-contracts:algorand-vulnerability-scanner

Scans Algorand/TEAL codebases for 11 vulnerability patterns including:

  • Rekeying vulnerabilities
  • Unchecked transaction fees
  • Asset closing issues
  • Group size checks
  • Time-based replay attacks
  • And 6 more patterns

Cairo Vulnerability Scanner

Skill: /building-secure-contracts:cairo-vulnerability-scanner

Analyzes StarkNet/Cairo smart contracts for 6 vulnerability patterns:

  • Felt252 arithmetic overflow/underflow
  • L1 to L2 address conversion
  • L1 to L2 message failure
  • Overconstrained L1 <-> L2 interaction
  • Signature replay protection
  • Unchecked from_address in L1 handler

Cosmos Vulnerability Scanner

Skill: /building-secure-contracts:cosmos-vulnerability-scanner

Detects security issues in Cosmos SDK modules for 9 patterns:

  • Undelegation time validation
  • Amount validation
  • Unbonding validation
  • Rounding issues
  • And 5 more patterns

Solana Vulnerability Scanner

Skill: /building-secure-contracts:solana-vulnerability-scanner

Scans Solana/Anchor programs for 6 critical vulnerabilities:

  • Arbitrary CPI
  • Improper PDA validation
  • Missing ownership checks
  • Signer authorization
  • And 2 more patterns

Substrate Vulnerability Scanner

Skill: /building-secure-contracts:substrate-vulnerability-scanner

Analyzes Substrate pallets for 7 security issues:

  • BadOrigin handling
  • Insufficient weight
  • Panics on overflow
  • Unsigned transaction validation
  • And 3 more patterns

TON Vulnerability Scanner

Skill: /building-secure-contracts:ton-vulnerability-scanner

Detects vulnerabilities in TON smart contracts for 3 patterns:

  • Integer as boolean (FunC's true is -1)
  • Fake Jetton contract
  • Forward TON without gas check

Development Guidelines Assistants

Based on Trail of Bits' Development Guidelines.

Audit Prep Assistant

Skill: /building-secure-contracts:audit-prep-assistant

Prepare your codebase for security reviews with a comprehensive checklist:

  1. Set review goals - Define objectives and concerns
  2. Resolve easy issues - Run static analysis (Slither, dylint, golangci-lint)
  3. Ensure accessibility - Build instructions, frozen commits, scope clarity
  4. Generate documentation - Flowcharts, user stories, glossaries

Use this: 1-2 weeks before your audit to maximize review effectiveness.

Code Maturity Assessor

Skill: /building-secure-contracts:code-maturity-assessor

Systematic code maturity evaluation using Trail of Bits' 9-category framework:

  • Arithmetic safety
  • Auditing practices
  • Authentication/Access controls
  • Complexity management
  • Decentralization
  • Documentation quality
  • Transaction ordering risks
  • Low-level manipulation
  • Testing and verification

Output: Maturity scorecard with evidence-based ratings and a priority-ordered improvement roadmap.

Guidelines Advisor

Skill: /building-secure-contracts:guidelines-advisor

Comprehensive development best practices advisor covering:

  • Documentation & Specifications - Generate system descriptions and architectural diagrams
  • Architecture Analysis - Optimize on-chain/off-chain distribution
  • Upgradeability Review - Assess upgrade patterns and delegatecall proxies
  • Implementation Quality - Review functions, inheritance, events
  • Common Pitfalls - Identify security anti-patterns
  • Dependencies - Evaluate library usage
  • Testing - Suggest improvements

Use this: Throughout development for architectural and implementation guidance.

Secure Workflow Guide

Skill: /building-secure-contracts:secure-workflow-guide

Interactive 5-step secure development workflow:

  1. Known Security Issues - Run Slither with 70+ detectors
  2. Special Features - Check upgradeability, ERC conformance, token integration
  3. Visual Inspection - Generate inheritance graphs, function summaries, authorization maps
  4. Security Properties - Document properties, set up Echidna/Manticore
  5. Manual Review - Analyze privacy, front-running, cryptography, DeFi risks

Use this: On every check-in or before deployment for continuous security validation.

Token Integration Analyzer

Skill: /building-secure-contracts:token-integration-analyzer

Comprehensive token security analysis for both implementations and integrations:

  • ERC20/ERC721 Conformity - Validate standard compliance
  • Contract Composition - Assess complexity and SafeMath usage
  • Owner Privileges - Review upgradeability, minting, pausability, blacklists
  • 20+ Weird Token Patterns - Check for non-standard behaviors (missing returns, fee-on-transfer, rebasing, etc.)
  • On-chain Analysis - Query deployed contracts for scarcity and distribution
  • Integration Safety - Verify defensive patterns and safe transfer usage

Use this: When building tokens or integrating with external tokens.


Skill Organization

building-secure-contracts/
└── skills/
    ├── algorand-vulnerability-scanner/
    ├── audit-prep-assistant/
    ├── cairo-vulnerability-scanner/
    ├── code-maturity-assessor/
    ├── cosmos-vulnerability-scanner/
    ├── guidelines-advisor/
    ├── secure-workflow-guide/
    ├── solana-vulnerability-scanner/
    ├── substrate-vulnerability-scanner/
    ├── token-integration-analyzer/
    └── ton-vulnerability-scanner/

Example Workflows

Pre-Audit Preparation

  1. Run /building-secure-contracts:secure-workflow-guide to ensure clean Slither report
  2. Use /building-secure-contracts:code-maturity-assessor to evaluate overall maturity
  3. Run /building-secure-contracts:audit-prep-assistant to prepare documentation and checklist
  4. Share prepared package with auditors

Platform-Specific Security Review

  1. Run appropriate vulnerability scanner for your platform
  2. Use /building-secure-contracts:guidelines-advisor for implementation best practices
  3. Run /building-secure-contracts:secure-workflow-guide for comprehensive security checks
  4. Address findings and re-scan

Token Development/Integration

  1. Run /building-secure-contracts:token-integration-analyzer for conformity and weird patterns
  2. Use /building-secure-contracts:guidelines-advisor for token-specific best practices
  3. Run /building-secure-contracts:secure-workflow-guide for complete validation
  4. Deploy with confidence

Continuous Security

  1. Run /building-secure-contracts:secure-workflow-guide on every check-in
  2. Use platform scanner for vulnerability detection
  3. Monitor code maturity with /building-secure-contracts:code-maturity-assessor
  4. Maintain documentation with /building-secure-contracts:guidelines-advisor

Tool Integration

Many skills leverage security tools when available:

  • Slither - Static analysis for Solidity (70+ detectors, visual diagrams, upgradeability checks)
  • Echidna - Property-based fuzzing
  • Manticore - Symbolic execution
  • Tealer - Static analyzer for TEAL/PyTeal
  • Web3/Ethers - On-chain queries for deployed contracts

Note: Skills gracefully adapt when tools are unavailable, performing manual analysis instead.


Source Material

This plugin is based on Trail of Bits' open-source security resources:


Related Skills

  • audit-context-building - Build deep architectural context before vulnerability hunting
  • issue-writer - Transform findings into professional audit reports
  • solidity-poc-builder - Build proof-of-concept exploits for Solidity vulnerabilities

Support

For questions or issues:

Files

  • folder.claude-plugin431 B
    • plugin.json431 B
  • folderskills452 KB
    • folderalgorand-vulnerability-scanner28 KB
      • folderagents250 B
        • openai.yaml250 B
      • folderassets3 KB
        • trail-of-bits-mark.svg3 KB
      • folderresources12 KB
        • VULNERABILITY_PATTERNS.md12 KB
      • SKILL.md12 KB
    • folderaudit-prep-assistant13 KB
      • folderagents240 B
        • openai.yaml240 B
      • folderassets3 KB
        • trail-of-bits-mark.svg3 KB
      • SKILL.md9.8 KB
    • foldercairo-vulnerability-scanner37 KB
      • folderagents259 B
        • openai.yaml259 B
      • folderassets3 KB
        • trail-of-bits-mark.svg3 KB
      • folderresources21 KB
        • VULNERABILITY_PATTERNS.md21 KB
      • SKILL.md13 KB
    • foldercode-maturity-assessor28 KB
      • folderagents242 B
        • openai.yaml242 B
      • folderassets3 KB
        • trail-of-bits-mark.svg3 KB
      • folderresources18 KB
        • ASSESSMENT_CRITERIA.md9.6 KB
        • EXAMPLE_REPORT.md7.4 KB
        • REPORT_FORMAT.md726 B
      • SKILL.md7.1 KB
    • foldercosmos-vulnerability-scanner151 KB
      • folderagents256 B
        • openai.yaml256 B
      • folderassets3 KB
        • trail-of-bits-mark.svg3 KB
      • folderresources124 KB
        • ADVANCED_VULNERABILITY_PATTERNS.md13 KB
        • COSMWASM_VULNERABILITY_PATTERNS.md7.5 KB
        • DISCOVERY.md2.9 KB
        • EVM_VULNERABILITY_PATTERNS.md18 KB
        • IBC_VULNERABILITY_PATTERNS.md27 KB
        • STATE_VULNERABILITY_PATTERNS.md29 KB
        • VULNERABILITY_PATTERNS.md26 KB
      • CHANGELOG.md13 KB
      • SKILL.md11 KB
    • folderguidelines-advisor30 KB
      • folderagents258 B
        • openai.yaml258 B
      • folderassets3 KB
        • trail-of-bits-mark.svg3 KB
      • folderresources18 KB
        • ASSESSMENT_AREAS.md7.8 KB
        • DELIVERABLES.md2.3 KB
        • EXAMPLE_REPORT.md8.2 KB
      • SKILL.md8.5 KB
    • foldersecure-workflow-guide20 KB
      • folderagents250 B
        • openai.yaml250 B
      • folderassets3 KB
        • trail-of-bits-mark.svg3 KB
      • folderresources10 KB
        • EXAMPLE_REPORT.md7.2 KB
        • WORKFLOW_STEPS.md3 KB
      • SKILL.md6.6 KB
    • foldersolana-vulnerability-scanner37 KB
      • folderagents258 B
        • openai.yaml258 B
      • folderassets3 KB
        • trail-of-bits-mark.svg3 KB
      • folderresources20 KB
        • VULNERABILITY_PATTERNS.md20 KB
      • SKILL.md14 KB
    • foldersubstrate-vulnerability-scanner40 KB
      • folderagents258 B
        • openai.yaml258 B
      • folderassets3 KB
        • trail-of-bits-mark.svg3 KB
      • folderresources24 KB
        • VULNERABILITY_PATTERNS.md24 KB
      • SKILL.md13 KB
    • foldertoken-integration-analyzer32 KB
      • folderagents247 B
        • openai.yaml247 B
      • folderassets3 KB
        • trail-of-bits-mark.svg3 KB
      • folderresources16 KB
        • ASSESSMENT_CATEGORIES.md13 KB
        • REPORT_TEMPLATES.md3.2 KB
      • SKILL.md12 KB
    • folderton-vulnerability-scanner36 KB
      • folderagents248 B
        • openai.yaml248 B
      • folderassets3 KB
        • trail-of-bits-mark.svg3 KB
      • folderresources18 KB
        • VULNERABILITY_PATTERNS.md18 KB
      • SKILL.md15 KB
  • LICENSE20 KB
  • README.md8.8 KB

Comments (0)

No comments yet. Be the first.

Sign in to comment. Commenting comes at level 1 (Member).

Report

Similar items

  • PluginImported

    blockchain-web3

    Smart contract development with Solidity, DeFi protocol implementation, NFT platforms, and Web3 application architecture

    MITFiles: 11

  • PluginImportedContains scripts

    burpsuite-project-parser

    Search and extract data from Burp Suite project files (.burp) for security analysis

    CC-BY-SA-4.0Files: 8

  • PluginImportedContains scripts

    c-review

    Comprehensive C/C++ security code review, with coverage verified against a parse of the source

    CC-BY-SA-4.0Files: 24

  • PluginImported

    claude-md-management

    Tools to maintain and improve CLAUDE.md files - audit quality, capture session learnings, and keep project memory current.

    Apache-2.0Files: 10

  • PluginImported

    comprehensive-review

    Multi-perspective code analysis covering architecture, security, and best practices

    MITFiles: 6

  • PluginImportedContains scripts

    constant-time-analysis

    Detect compiler-induced timing side-channels in cryptographic code

    CC-BY-SA-4.0Files: 51