From building-secure-contracts
Analyzes Solidity smart contract codebases using Trail of Bits guidelines: generates docs/specs, reviews architecture, upgradeability, proxies, implementation, pitfalls, dependencies, and testing.
npx claudepluginhub trailofbits/skills --plugin building-secure-contractsThis skill uses the workspace's default tool permissions.
Systematically analyzes the codebase and provides guidance based on Trail of Bits' development guidelines:
Analyzes smart contract codebases per Trail of Bits best practices: generates documentation/specs, reviews architecture, upgradeability patterns, implementation quality, pitfalls, dependencies, testing. Provides actionable recommendations.
Assesses smart contract codebase maturity using Trail of Bits' 9 categories: arithmetic safety, auditing, access controls, complexity, decentralization, documentation, MEV risks, low-level code, testing. Outputs scorecard with evidence-based ratings and recommendations.
Generates project overviews and audit scopes for smart contract security by mapping structure, entry points, value flows, trust boundaries, and high-risk areas.
Share bugs, ideas, or general feedback.
Systematically analyzes the codebase and provides guidance based on Trail of Bits' development guidelines:
Framework: Building Secure Contracts - Development Guidelines
Explores the codebase to understand:
Helps create:
Analyzes:
Assesses:
Provides:
I analyze 11 comprehensive areas covering all aspects of smart contract development. For detailed criteria, best practices, and specific checks, see ASSESSMENT_AREAS.md.
Documentation & Specifications
On-Chain vs Off-Chain Computation
Upgradeability
Delegatecall Proxy Pattern
Function Composition
Inheritance
Events
Common Pitfalls
Dependencies
Testing & Verification
Platform-Specific Guidance
For complete details on each area including what I'll check, analyze, and recommend, see ASSESSMENT_AREAS.md.
When the analysis is complete, you'll receive comprehensive guidance covering:
For a complete example analysis report, see EXAMPLE_REPORT.md.
I provide four comprehensive deliverable categories:
For detailed templates and examples of each deliverable, see DELIVERABLES.md.
When invoked, I will:
Explore the codebase
Generate documentation
Analyze architecture
Review implementation
Provide recommendations
| Rationalization | Why It's Wrong | Required Action |
|---|---|---|
| "System is simple, description covers everything" | Plain English descriptions miss security-critical details | Complete all 5 phases: documentation, architecture, implementation, dependencies, recommendations |
| "No upgrades detected, skip upgradeability section" | Upgradeability can be implicit (ownable patterns, delegatecall) | Search for proxy patterns, delegatecall, storage collisions before declaring N/A |
| "Not applicable" without verification | Premature scope reduction misses vulnerabilities | Verify with explicit codebase search before skipping any guideline section |
| "Architecture is straightforward, no analysis needed" | Obvious architectures have subtle trust boundaries | Analyze on-chain/off-chain distribution, access control flow, external dependencies |
| "Common pitfalls don't apply to this codebase" | Every codebase has common pitfalls | Systematically check all guideline pitfalls with grep/code search |
| "Tests exist, testing guideline is satisfied" | Test existence ≠ test quality | Check coverage, property-based tests, integration tests, failure cases |
| "I can provide generic best practices" | Generic advice isn't actionable | Provide project-specific findings with file:line references |
| "User knows what to improve from findings" | Findings without prioritization = no action plan | Generate prioritized improvement roadmap with specific next steps |
What I'll need:
Let's analyze your codebase and improve it using Trail of Bits' best practices!