{
  "schemaVersion": "1.0",
  "item": {
    "slug": "solidity-guardian",
    "name": "Solidity Guardian",
    "source": "tencent",
    "type": "skill",
    "category": "安全合规",
    "sourceUrl": "https://clawhub.ai/aviclaw/solidity-guardian",
    "canonicalUrl": "https://clawhub.ai/aviclaw/solidity-guardian",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/solidity-guardian",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=solidity-guardian",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "BEST_PRACTICES.md",
      "SKILL.md",
      "analyzer.js",
      "package.json",
      "slither-integration.js"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "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."
        },
        {
          "label": "Upgrade existing",
          "body": "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."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-23T16:43:11.935Z",
      "expiresAt": "2026-04-30T16:43:11.935Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
        "contentDisposition": "attachment; filename=\"4claw-imageboard-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/solidity-guardian"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/solidity-guardian",
    "agentPageUrl": "https://openagent3.xyz/skills/solidity-guardian/agent",
    "manifestUrl": "https://openagent3.xyz/skills/solidity-guardian/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/solidity-guardian/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "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."
      },
      {
        "label": "Upgrade existing",
        "body": "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."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Solidity Guardian 🛡️",
        "body": "Security analysis for Solidity smart contracts. Find vulnerabilities, get fix suggestions, follow best practices."
      },
      {
        "title": "Quick Start",
        "body": "# Analyze a single contract\nnode skills/solidity-guardian/analyze.js contracts/MyContract.sol\n\n# Analyze entire project\nnode skills/solidity-guardian/analyze.js ./contracts/\n\n# Generate markdown report\nnode skills/solidity-guardian/analyze.js ./contracts/ --format markdown > AUDIT.md"
      },
      {
        "title": "Critical (Must Fix)",
        "body": "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"
      },
      {
        "title": "High (Should Fix)",
        "body": "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"
      },
      {
        "title": "Medium (Consider Fixing)",
        "body": "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"
      },
      {
        "title": "Low (Best Practice)",
        "body": "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"
      },
      {
        "title": "Basic Analysis",
        "body": "const { analyzeContract } = require('./analyzer');\n\nconst results = await analyzeContract('contracts/Token.sol');\nconsole.log(results.findings);"
      },
      {
        "title": "With Fix Suggestions",
        "body": "const results = await analyzeContract('contracts/Vault.sol', {\n  includeFixes: true,\n  severity: ['critical', 'high']\n});\n\nfor (const finding of results.findings) {\n  console.log(`[${finding.severity}] ${finding.title}`);\n  console.log(`  Line ${finding.line}: ${finding.description}`);\n  console.log(`  Fix: ${finding.suggestion}`);\n}"
      },
      {
        "title": "Generate Report",
        "body": "const { generateReport } = require('./reporter');\n\nconst report = await generateReport('./contracts/', {\n  format: 'markdown',\n  includeGas: true,\n  includeBestPractices: true\n});\n\nfs.writeFileSync('SECURITY_AUDIT.md', report);"
      },
      {
        "title": "Best Practices Checklist",
        "body": "When writing secure contracts, follow these guidelines:"
      },
      {
        "title": "Access Control",
        "body": "Use OpenZeppelin's Ownable or AccessControl\n Apply onlyOwner or role checks to sensitive functions\n Implement two-step ownership transfer\n Consider timelocks for critical operations"
      },
      {
        "title": "Reentrancy Prevention",
        "body": "Use ReentrancyGuard on all external-facing functions\n Follow checks-effects-interactions pattern\n Update state BEFORE external calls\n Use pull over push for payments"
      },
      {
        "title": "Input Validation",
        "body": "Validate all external inputs\n Check for zero addresses\n Validate array lengths match\n Use SafeERC20 for token transfers"
      },
      {
        "title": "Arithmetic Safety",
        "body": "Use Solidity 0.8+ or SafeMath\n Check for division by zero\n Validate percentage calculations (≤100)\n Be careful with token decimals"
      },
      {
        "title": "Upgradeability (if applicable)",
        "body": "Use initializer instead of constructor\n Protect initialize from re-initialization\n Follow storage layout rules\n Test upgrade paths"
      },
      {
        "title": "Slither Integration",
        "body": "Guardian can run alongside Slither for comprehensive analysis:\n\n# Combined analysis (auto-installs Slither if missing)\nnode skills/solidity-guardian/slither-integration.js ./contracts/ --install-slither\n\n# Generate combined report\nnode skills/solidity-guardian/slither-integration.js . --format markdown --output AUDIT.md\n\n# Guardian only (faster, no Slither dependency)\nnode skills/solidity-guardian/slither-integration.js ./contracts/ --guardian-only\n\n# Slither only\nnode skills/solidity-guardian/slither-integration.js ./contracts/ --slither-only\n\nWhy both?\n\nGuardian: Fast pattern matching, custom rules, no compilation needed\nSlither: Deep dataflow analysis, CFG-based detection, more comprehensive"
      },
      {
        "title": "Hardhat",
        "body": "// hardhat.config.js\nrequire('./skills/solidity-guardian/hardhat-plugin');\n\n// Run: npx hardhat guardian"
      },
      {
        "title": "Foundry",
        "body": "# Add to CI\nforge build\nnode skills/solidity-guardian/analyze.js ./src/"
      },
      {
        "title": "References",
        "body": "Trail of Bits - Building Secure Contracts\nOpenZeppelin - Security Best Practices\nConsensys - Smart Contract Best Practices\nSWC Registry\n\nBuilt by Avi 🔐 | Security-first, ship always."
      }
    ],
    "body": "Solidity Guardian 🛡️\n\nSecurity analysis for Solidity smart contracts. Find vulnerabilities, get fix suggestions, follow best practices.\n\nQuick Start\n# Analyze a single contract\nnode skills/solidity-guardian/analyze.js contracts/MyContract.sol\n\n# Analyze entire project\nnode skills/solidity-guardian/analyze.js ./contracts/\n\n# Generate markdown report\nnode skills/solidity-guardian/analyze.js ./contracts/ --format markdown > AUDIT.md\n\nWhat It Detects (40+ Patterns)\nCritical (Must Fix)\nID\tVulnerability\tDescription\nSG-001\tReentrancy\tExternal calls before state updates\nSG-002\tUnprotected selfdestruct\tMissing access control on selfdestruct\nSG-003\tDelegatecall to untrusted\tDelegatecall with user-controlled address\nSG-004\tUninitialized storage pointer\tStorage pointer overwrites slots\nSG-005\tSignature replay\tecrecover without nonce/chainId\nSG-006\tArbitrary jump\tFunction type from user input\nHigh (Should Fix)\nID\tVulnerability\tDescription\nSG-010\tMissing access control\tPublic functions that should be restricted\nSG-011\tUnchecked transfer\tERC20 transfer without return check\nSG-012\tInteger overflow\tArithmetic without SafeMath (pre-0.8)\nSG-013\ttx.origin auth\tUsing tx.origin for authentication\nSG-014\tWeak randomness\tblock.timestamp/blockhash for randomness\nSG-015\tUnprotected withdrawal\tWithdrawal without ownership check\nSG-016\tUnchecked low-level call\t.call() without success check\nSG-017\tDangerous equality\tStrict balance check (manipulable)\nSG-018\tDeprecated functions\tsuicide, sha3, throw, callcode\nSG-019\tWrong constructor\tFunction name matches contract\nMedium (Consider Fixing)\nID\tVulnerability\tDescription\nSG-020\tFloating pragma\tNon-pinned Solidity version\nSG-021\tMissing zero check\tNo validation for zero address\nSG-022\tTimestamp dependence\tLogic depends on block.timestamp\nSG-023\tDoS with revert\tLoop with external call can revert\nSG-024\tFront-running risk\tPredictable state changes\nLow (Best Practice)\nID\tVulnerability\tDescription\nSG-030\tMissing events\tState changes without events\nSG-031\tMagic numbers\tHardcoded values without constants\nSG-032\tImplicit visibility\tFunctions without explicit visibility\nSG-033\tLarge contract\tContract exceeds size recommendations\nSG-034\tMissing NatSpec\tPublic functions without documentation\nUsage Examples\nBasic Analysis\nconst { analyzeContract } = require('./analyzer');\n\nconst results = await analyzeContract('contracts/Token.sol');\nconsole.log(results.findings);\n\nWith Fix Suggestions\nconst results = await analyzeContract('contracts/Vault.sol', {\n  includeFixes: true,\n  severity: ['critical', 'high']\n});\n\nfor (const finding of results.findings) {\n  console.log(`[${finding.severity}] ${finding.title}`);\n  console.log(`  Line ${finding.line}: ${finding.description}`);\n  console.log(`  Fix: ${finding.suggestion}`);\n}\n\nGenerate Report\nconst { generateReport } = require('./reporter');\n\nconst report = await generateReport('./contracts/', {\n  format: 'markdown',\n  includeGas: true,\n  includeBestPractices: true\n});\n\nfs.writeFileSync('SECURITY_AUDIT.md', report);\n\nBest Practices Checklist\n\nWhen writing secure contracts, follow these guidelines:\n\nAccess Control\n Use OpenZeppelin's Ownable or AccessControl\n Apply onlyOwner or role checks to sensitive functions\n Implement two-step ownership transfer\n Consider timelocks for critical operations\nReentrancy Prevention\n Use ReentrancyGuard on all external-facing functions\n Follow checks-effects-interactions pattern\n Update state BEFORE external calls\n Use pull over push for payments\nInput Validation\n Validate all external inputs\n Check for zero addresses\n Validate array lengths match\n Use SafeERC20 for token transfers\nArithmetic Safety\n Use Solidity 0.8+ or SafeMath\n Check for division by zero\n Validate percentage calculations (≤100)\n Be careful with token decimals\nUpgradeability (if applicable)\n Use initializer instead of constructor\n Protect initialize from re-initialization\n Follow storage layout rules\n Test upgrade paths\nSlither Integration\n\nGuardian can run alongside Slither for comprehensive analysis:\n\n# Combined analysis (auto-installs Slither if missing)\nnode skills/solidity-guardian/slither-integration.js ./contracts/ --install-slither\n\n# Generate combined report\nnode skills/solidity-guardian/slither-integration.js . --format markdown --output AUDIT.md\n\n# Guardian only (faster, no Slither dependency)\nnode skills/solidity-guardian/slither-integration.js ./contracts/ --guardian-only\n\n# Slither only\nnode skills/solidity-guardian/slither-integration.js ./contracts/ --slither-only\n\n\nWhy both?\n\nGuardian: Fast pattern matching, custom rules, no compilation needed\nSlither: Deep dataflow analysis, CFG-based detection, more comprehensive\nIntegration with Other Tools\nHardhat\n// hardhat.config.js\nrequire('./skills/solidity-guardian/hardhat-plugin');\n\n// Run: npx hardhat guardian\n\nFoundry\n# Add to CI\nforge build\nnode skills/solidity-guardian/analyze.js ./src/\n\nReferences\nTrail of Bits - Building Secure Contracts\nOpenZeppelin - Security Best Practices\nConsensys - Smart Contract Best Practices\nSWC Registry\n\nBuilt by Avi 🔐 | Security-first, ship always."
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/aviclaw/solidity-guardian",
    "publisherUrl": "https://clawhub.ai/aviclaw/solidity-guardian",
    "owner": "aviclaw",
    "version": "1.0.3",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/solidity-guardian",
    "downloadUrl": "https://openagent3.xyz/downloads/solidity-guardian",
    "agentUrl": "https://openagent3.xyz/skills/solidity-guardian/agent",
    "manifestUrl": "https://openagent3.xyz/skills/solidity-guardian/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/solidity-guardian/agent.md"
  }
}