Requirements
- Target platform
- OpenClaw
- Install method
- Manual import
- Extraction
- Extract archive
- Prerequisites
- OpenClaw
- Primary doc
- SKILL.md
Smart contract security analysis skill. Detect vulnerabilities, suggest fixes, generate audit reports. Supports Hardhat/Foundry projects. Uses pattern matchi...
Smart contract security analysis skill. Detect vulnerabilities, suggest fixes, generate audit reports. Supports Hardhat/Foundry projects. Uses pattern matchi...
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
Security analysis for Solidity smart contracts. Find vulnerabilities, get fix suggestions, follow best practices.
# Analyze a single contract node skills/solidity-guardian/analyze.js contracts/MyContract.sol # Analyze entire project node skills/solidity-guardian/analyze.js ./contracts/ # Generate markdown report node skills/solidity-guardian/analyze.js ./contracts/ --format markdown > AUDIT.md
IDVulnerabilityDescriptionSG-001ReentrancyExternal calls before state updatesSG-002Unprotected selfdestructMissing access control on selfdestructSG-003Delegatecall to untrustedDelegatecall with user-controlled addressSG-004Uninitialized storage pointerStorage pointer overwrites slotsSG-005Signature replayecrecover without nonce/chainIdSG-006Arbitrary jumpFunction type from user input
IDVulnerabilityDescriptionSG-010Missing access controlPublic functions that should be restrictedSG-011Unchecked transferERC20 transfer without return checkSG-012Integer overflowArithmetic without SafeMath (pre-0.8)SG-013tx.origin authUsing tx.origin for authenticationSG-014Weak randomnessblock.timestamp/blockhash for randomnessSG-015Unprotected withdrawalWithdrawal without ownership checkSG-016Unchecked low-level call.call() without success checkSG-017Dangerous equalityStrict balance check (manipulable)SG-018Deprecated functionssuicide, sha3, throw, callcodeSG-019Wrong constructorFunction name matches contract
IDVulnerabilityDescriptionSG-020Floating pragmaNon-pinned Solidity versionSG-021Missing zero checkNo validation for zero addressSG-022Timestamp dependenceLogic depends on block.timestampSG-023DoS with revertLoop with external call can revertSG-024Front-running riskPredictable state changes
IDVulnerabilityDescriptionSG-030Missing eventsState changes without eventsSG-031Magic numbersHardcoded values without constantsSG-032Implicit visibilityFunctions without explicit visibilitySG-033Large contractContract exceeds size recommendationsSG-034Missing NatSpecPublic functions without documentation
const { analyzeContract } = require('./analyzer'); const results = await analyzeContract('contracts/Token.sol'); console.log(results.findings);
const results = await analyzeContract('contracts/Vault.sol', { includeFixes: true, severity: ['critical', 'high'] }); for (const finding of results.findings) { console.log(`[${finding.severity}] ${finding.title}`); console.log(` Line ${finding.line}: ${finding.description}`); console.log(` Fix: ${finding.suggestion}`); }
const { generateReport } = require('./reporter'); const report = await generateReport('./contracts/', { format: 'markdown', includeGas: true, includeBestPractices: true }); fs.writeFileSync('SECURITY_AUDIT.md', report);
When writing secure contracts, follow these guidelines:
Use OpenZeppelin's Ownable or AccessControl Apply onlyOwner or role checks to sensitive functions Implement two-step ownership transfer Consider timelocks for critical operations
Use ReentrancyGuard on all external-facing functions Follow checks-effects-interactions pattern Update state BEFORE external calls Use pull over push for payments
Validate all external inputs Check for zero addresses Validate array lengths match Use SafeERC20 for token transfers
Use Solidity 0.8+ or SafeMath Check for division by zero Validate percentage calculations (โค100) Be careful with token decimals
Use initializer instead of constructor Protect initialize from re-initialization Follow storage layout rules Test upgrade paths
Guardian can run alongside Slither for comprehensive analysis: # Combined analysis (auto-installs Slither if missing) node skills/solidity-guardian/slither-integration.js ./contracts/ --install-slither # Generate combined report node skills/solidity-guardian/slither-integration.js . --format markdown --output AUDIT.md # Guardian only (faster, no Slither dependency) node skills/solidity-guardian/slither-integration.js ./contracts/ --guardian-only # Slither only node skills/solidity-guardian/slither-integration.js ./contracts/ --slither-only Why both? Guardian: Fast pattern matching, custom rules, no compilation needed Slither: Deep dataflow analysis, CFG-based detection, more comprehensive
// hardhat.config.js require('./skills/solidity-guardian/hardhat-plugin'); // Run: npx hardhat guardian
# Add to CI forge build node skills/solidity-guardian/analyze.js ./src/
Trail of Bits - Building Secure Contracts OpenZeppelin - Security Best Practices Consensys - Smart Contract Best Practices SWC Registry Built by Avi ๐ | Security-first, ship always.
Identity, auth, scanning, governance, audit, and operational guardrails.
Largest current source with strong distribution and engagement signals.