{"id":"d84659f2-439b-4e6c-ab58-d9b1b283c191","entityType":"agent","slug":"clawhub-bevanding-web3-investor","name":"Web3 Investor","canonicalUrl":"https://www.xpersona.co/agent/clawhub-bevanding-web3-investor","canonicalPath":"/agent/clawhub-bevanding-web3-investor","generatedAt":"2026-10-10T08:09:34.589Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-10T04:26:24.322Z","emptyReason":null},"description":"AI-native DeFi investment intelligence. Discover, analyze, and compare yield opportunities across 2,500+ protocols with intent-aware search, LLM-powered deep... Skill: Web3 Investor Owner: bevanding Summary: AI-native DeFi investment intelligence. Discover, analyze, and compare yield opportunities across 2,500+ protocols with intent-aware search, LLM-powered deep... Tags: latest:3.8.2 Version history: v3.8.2 | 2026-04-14T12:31:39.943Z | auto No changes detected in this version. - Version number updated to 3.8.2. - No code or documentation changes present. v3.8.1 | 2026-04-14","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1.7K downloads reported by the source. Last updated 10/10/2026.","installCommand":"clawhub skill install s170y7z7x5ezz2nb74g7fnq4vn83k5ee:web3-investor","sourceUrl":"https://clawhub.ai/bevanding/web3-investor","homepage":"https://clawhub.ai/bevanding/skills/web3-investor","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/bevanding/web3-investor","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/bevanding/skills/web3-investor","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":57,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"AI-native DeFi investment intelligence. Discover, analyze, and compare yield opportunities across 2,500+ protocols with intent-aware search, LLM-powered deep..."},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-10T04:26:24.322Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T04:26:24.322Z","emptyReason":null},"stars":null,"forks":null,"downloads":1688,"packageName":null,"latestVersion":"3.8.2","tractionLabel":"1.7K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T04:26:24.322Z","emptyReason":null},"lastUpdatedAt":"2026-10-10T04:26:24.322Z","lastCrawledAt":"2026-10-10T04:26:24.322Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-11T04:26:24.322Z","lastVerifiedAt":null,"highlights":[{"version":"3.8.2","createdAt":"2026-04-14T12:31:39.943Z","changelog":"No changes detected in this version. - Version number updated to 3.8.2. - No code or documentation changes present.","fileCount":12,"zipByteSize":24410},{"version":"3.8.1","createdAt":"2026-04-14T12:31:19.783Z","changelog":"- Updated security notes in SKILL.md to clarify that all queries are sent to the Antalpha MCP server and zero API keys are required on the client. - Removed references to user-controlled persistence and local investment records from the metadata section. - Clarified server-side processing of user investment intent in the documentation. - No changes to actual skill functionality or API; documentation-only update.","fileCount":11,"zipByteSize":22887},{"version":"3.8.0","createdAt":"2026-04-14T12:12:36.756Z","changelog":"**Major upgrade: Enhanced AI-native DeFi analysis with risk, security, and smart money sentiment.** - Intent-aware discovery now includes 7-dimension risk scoring, DeFi security scanning, and smart money sentiment. - Deep analysis and comparison leverage LLM-powered reasoning and clear explanations. - Multi-round conversational refinement captures user intent across sessions for better recommendations. - Expanded tool descriptions, including pipeline details and session behavior. - Security notes and metadata added for safer deployment and configuration awareness.","fileCount":11,"zipByteSize":22960},{"version":"3.7.2","createdAt":"2026-04-13T02:51:23.783Z","changelog":"Server-side tool reduction: drop investor_feedback, investor_confirm_intent, investor_get_stored_intent (6 tools → 3 tools). mcp_client.py cleanup: remove defunct functions/parsers/dispatch. SKILL.md updated to reflect 3 active tools only.","fileCount":11,"zipByteSize":18655},{"version":"2.0.3","createdAt":"2026-04-08T09:14:20.496Z","changelog":"- Bumped skill version to 2.0.3. - Added a homepage URL (https://www.antalpha.com/) to metadata. - No functional or interface changes.","fileCount":9,"zipByteSize":11716},{"version":"2.0.2","createdAt":"2026-04-08T09:08:59.996Z","changelog":"- Internal update to scripts/mcp_client.py; no external interfaces changed. - No modifications to documentation or user-facing features. - Behavior and usage remain the same for all users.","fileCount":9,"zipByteSize":11700},{"version":"2.0.1","createdAt":"2026-04-08T07:08:28.645Z","changelog":"- Major cleanup of repository: removed 9 unused scripts, templates, and test files. - No changes to commands or user-facing functionality. - Only configuration files were updated; the core skill logic remains as a thin wrapper to the MCP server.","fileCount":9,"zipByteSize":10795},{"version":"2.0.0","createdAt":"2026-04-08T06:57:44.890Z","changelog":"web3-investor 2.0.0 - Major simplification: Now a thin wrapper around a remote MCP server; all business logic and data fetching handled remotely. - Removed all local discovery, trading, portfolio, and protocol scripts; only scripts/mcp_client.py remains. - No longer requires any local API keys or environment variables; all authentication is managed server-side. - Updated commands: Only discovery, analysis, comparison, feedback, and intent management are available via the MCP client. - Documentation and rules revised to reflect the new server-centric workflow. - Significant reduction in codebase and project complexity.","fileCount":18,"zipByteSize":33701}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s170y7z7x5ezz2nb74g7fnq4vn83k5ee:web3-investor","setupComplexity":"low","setupSteps":["Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-bevanding-web3-investor/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-bevanding-web3-investor/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-bevanding-web3-investor/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-bevanding-web3-investor/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-bevanding-web3-investor/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-bevanding-web3-investor/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-10T08:09:34.585Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-bevanding-web3-investor/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-bevanding-web3-investor/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-bevanding-web3-investor/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-bevanding-web3-investor/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"high","updatedAt":"2026-10-10T04:26:24.322Z","emptyReason":null},"readme":"Skill: Web3 Investor\n\nOwner: bevanding\n\nSummary: AI-native DeFi investment intelligence. Discover, analyze, and compare yield opportunities across 2,500+ protocols with intent-aware search, LLM-powered deep...\n\nTags: latest:3.8.2\n\nVersion history:\n\nv3.8.2 | 2026-04-14T12:31:39.943Z | auto\n\nNo changes detected in this version.\n\n- Version number updated to 3.8.2.\n- No code or documentation changes present.\n\nv3.8.1 | 2026-04-14T12:31:19.783Z | auto\n\n- Updated security notes in SKILL.md to clarify that all queries are sent to the Antalpha MCP server and zero API keys are required on the client.\n- Removed references to user-controlled persistence and local investment records from the metadata section.\n- Clarified server-side processing of user investment intent in the documentation.\n- No changes to actual skill functionality or API; documentation-only update.\n\nv3.8.0 | 2026-04-14T12:12:36.756Z | auto\n\n**Major upgrade: Enhanced AI-native DeFi analysis with risk, security, and smart money sentiment.**\n\n- Intent-aware discovery now includes 7-dimension risk scoring, DeFi security scanning, and smart money sentiment.\n- Deep analysis and comparison leverage LLM-powered reasoning and clear explanations.\n- Multi-round conversational refinement captures user intent across sessions for better recommendations.\n- Expanded tool descriptions, including pipeline details and session behavior.\n- Security notes and metadata added for safer deployment and configuration awareness.\n\nv3.7.2 | 2026-04-13T02:51:23.783Z | user\n\nServer-side tool reduction: drop investor_feedback, investor_confirm_intent, investor_get_stored_intent (6 tools → 3 tools). mcp_client.py cleanup: remove defunct functions/parsers/dispatch. SKILL.md updated to reflect 3 active tools only.\n\nv2.0.3 | 2026-04-08T09:14:20.496Z | auto\n\n- Bumped skill version to 2.0.3.\n- Added a homepage URL (https://www.antalpha.com/) to metadata.\n- No functional or interface changes.\n\nv2.0.2 | 2026-04-08T09:08:59.996Z | auto\n\n- Internal update to scripts/mcp_client.py; no external interfaces changed.\n- No modifications to documentation or user-facing features.\n- Behavior and usage remain the same for all users.\n\nv2.0.1 | 2026-04-08T07:08:28.645Z | auto\n\n- Major cleanup of repository: removed 9 unused scripts, templates, and test files.\n- No changes to commands or user-facing functionality.\n- Only configuration files were updated; the core skill logic remains as a thin wrapper to the MCP server.\n\nv2.0.0 | 2026-04-08T06:57:44.890Z | auto\n\nweb3-investor 2.0.0\n\n- Major simplification: Now a thin wrapper around a remote MCP server; all business logic and data fetching handled remotely.\n- Removed all local discovery, trading, portfolio, and protocol scripts; only scripts/mcp_client.py remains.\n- No longer requires any local API keys or environment variables; all authentication is managed server-side.\n- Updated commands: Only discovery, analysis, comparison, feedback, and intent management are available via the MCP client.\n- Documentation and rules revised to reflect the new server-centric workflow.\n- Significant reduction in codebase and project complexity.\n\nv0.5.11 | 2026-03-30T02:55:28.582Z | auto\n\nweb3-investor v0.5.11\n\n- Updated SKILL.md to reflect improvements, usage instructions, and module/documentation organization.\n- No code changes; documentation only.\n- Clarified rules and workflows for investment discovery and transaction execution.\n- Enhanced environment variable documentation and security best practices.\n- Refined module and quick start guides for agent developers.\n\nv0.5.10 | 2026-03-29T13:12:25.445Z | auto\n\nweb3-investor v0.5.10\n\n- Updated skill version to 0.5.10 in documentation.\n- No functional or logic changes; documentation version now matches current release.\n\nv0.5.9 | 2026-03-29T12:57:49.726Z | auto\n\nNo file changes detected in this release.\n\nv0.5.8 | 2026-03-29T12:55:13.647Z | auto\n\n**web3-investor v0.5.8 changelog**\n\n- Updated SKILL.md to define required environment variables and security notes in a new `openclaw`-style metadata section.\n- Added explicit security guidance for trusted API endpoints and environment variable usage.\n- No core functionality or major behavioral changes; documentation and metadata structure improvements only.\n\nv0.5.7 | 2026-03-29T12:49:39.214Z | auto\n\nweb3-investor v0.5.7\n\n- Documentation updates and clarifications in SKILL.md only\n- No code or API changes\n- All features, quick start instructions, rules, environment variables, and module overviews remain unchanged\n\nv0.5.6 | 2026-03-29T12:45:40.860Z | auto\n\n- Improved SKILL.md metadata for better compatibility:\n  - Changed `env` to `env_vars`.\n  - Added explicit sensitivity flag to each environment variable.\n  - Added `install` field with `instruction-only` type.\n- No feature or code changes; documentation/metadata update only.\n\nv0.5.5 | 2026-03-29T12:29:40.304Z | auto\n\nweb3-investor v0.5.5\n\n- Updated references/discovery.md for improved documentation and clarity.\n- No code or logic changes; documentation update only.\n\nv0.5.4 | 2026-03-29T09:43:03.407Z | auto\n\nweb3-investor v0.5.4 Changelog\n\n- No code or functional changes; only documentation file SKILL.md was modified.\n- Version metadata remains at 0.5.3; version bump is not reflected in the main documentation.\n- No user-impacting changes in features or usage.\n\nv0.5.3 | 2026-03-29T09:22:22.567Z | auto\n\n- Updated SKILL.md to version 0.5.3.\n- No logic or feature changes; documentation version bump only.\n\nv0.1.2 | 2026-03-29T08:50:45.223Z | auto\n\nweb3-investor v0.1.2\n\n- Added detailed environment variable specifications to SKILL.md, documenting API keys and their usage.\n- Environment variables now formally include DUNE_API_KEY, WEB3_INVESTOR_API_URL, WEB3_INVESTOR_DEBANK_API_KEY, and ALCHEMY_API_KEY with descriptions and sensitivity flags.\n- No logic or usage flow changes—mostly documentation and configuration clarifications for setup and integration.\n\nv0.1.1 | 2026-03-29T08:42:36.282Z | auto\n\n- Adds initial unit testing framework with sample tests for discovery scripts.\n- Updates SKILL.md with version, author, and required Python dependencies metadata.\n- Revises and simplifies discovery data sources (now DefiLlama and Dune; MCP/AntAlpha removed).\n- Updates configuration documentation, including pip requirements and Dune integration sample.\n- Minor updates to config and discovery scripts to improve compatibility with new tests and reflect revised data sources.\n\nv0.5.2 | 2026-03-08T02:44:31.200Z | auto\n\nNo user-facing changes.\n\n- Version bump with no detected file changes.\n- No SKILL.md, code, or configuration updates in this release.\n\nv0.5.1 | 2026-03-08T02:42:50.643Z | auto\n\nweb3-investor v0.5.1\n\n- Updated the JSON schema in config/schema.json to improve configuration validation and maintain consistency.\n- No changes to user-facing features or core workflows.\n\nv0.5.0 | 2026-03-07T17:52:51.929Z | auto\n\n**v0.5.0 Summary: Adds execution readiness checks, new payment capability detection, and support for Dune/MCP discovery sources.**\n\n- Introduced execution preflight check script (`preflight.py`) to detect and suggest available payment methods (keystore signer vs. EIP-681).\n- Updated agent flow: Payment capability must be checked before prompting for transaction details.\n- Major documentation update with a new step-by-step flow, including payment readiness, and details on Dune MCP integration for advanced discovery.\n- Added support for additional discovery data sources (Dune MCP, DefiLlama), including authentication setup.\n- Internal refactors: Separated schemas and utilities into new modules for better maintainability.\n- Deprecated and removed example config file (now rely on main config).\n\nv0.4.0 | 2026-03-05T15:28:02.421Z | auto\n\nweb3-investor v0.4.0\n\n- Added modular documentation: new reference docs for discovery, investment profile, portfolio indexer, and trade executor components.\n- SKILL.md rewritten for clarity and modularity; detailed module overview and configuration guide now included.\n- Project structure updated to reflect new references/ documentation.\n- Improved Quick Start and usage instructions; agent-first design philosophy now summarized.\n- Troubleshooting and security configuration sections refined for easier onboarding.\n\nv0.3.4 | 2026-03-05T11:57:35.009Z | auto\n\nweb3-investor v0.3.4\n\n- Updated SETUP.md to clarify configuration and deployment steps for agents and users.\n- Improved SIGNER_API_SPEC.md documentation for better clarity around REST API expectations and signer service integration.\n- No functional changes to the core codebase—documentation improvements only.\n\nv0.3.3 | 2026-03-05T11:18:28.387Z | auto\n\n**Added support for EIP-681 payment links and QR code generation.**\n\n- Introduced `eip681_payment.py` to generate MetaMask-compatible payment links and QR codes for easy token transfers.\n- SKILL.md updated to describe multiple transaction execution methods: keystore signer and new EIP-681 payment link (including sample commands and recommended usage).\n- Updated project and module structure documentation to highlight the new EIP-681 payment/QR generator as a production-ready option.\n- No breaking changes to existing API or workflows.\n\nv0.3.2 | 2026-03-05T07:45:34.304Z | auto\n\nNo changes in this version (0.3.2):\n\n- No file changes detected.\n- Documentation, features, and workflows remain unchanged from the previous release.\n\nv0.3.1 | 2026-03-05T07:35:25.449Z | auto\n\n## web3-investor v0.3.1 Changelog\n\n- Refactored SKILL.md for improved clarity and accessibility.\n- Replaced non-English sections with English descriptions and guides.\n- Reformulated design philosophy, module usage, and critical rules for a broader audience.\n- No changes to code or features; documentation update only.\n\nv0.3.0 | 2026-03-05T06:58:42.077Z | auto\n\n**Major Change: Web3 Investor skill introduces REST signer integration & agent-first workflow.**\n\n- Added REST signer API integration and new trade_executor.py script for transaction management with preview-approve-execute flow.\n- Project restructured for \"agent-first\" usability, including detailed agent-oriented documentation (SETUP.md, SIGNER_API_SPEC.md).\n- Updated critical usage rules: agents must check signer health before any trading.\n- Execution model, whitelist/security settings, and execution network now fully configurable via config.json.\n- Existing modules and documentation (SKILL.md, TODO.md, CHANGELOG.md) refactored for agent adaptation and security clarity.\n- Now explicitly supports only \"base\" and \"ethereum\" chains, with additional execution and risk control options.\n\nv0.2.3 | 2026-03-04T12:43:50.969Z | user\n\nRewrite SKILL.md: clearer structure, AI-friendly format, mandatory discovery rules\n\nv0.2.2 | 2026-03-04T11:21:55.679Z | user\n\nUpdate SKILL.md: python3 commands, mandatory discovery rule, investment preference workflow\n\nv0.2.1 | 2026-03-04T09:07:29.718Z | user\n\nInvestment preference system, enhanced risk signals, disclaimer added\n\nv0.2.0 | 2026-03-03T13:58:00.682Z | user\n\nv0.2.0: Added Base chain support, local signing capability, and natural language error feedback\n\nv0.1.0-demo | 2026-03-03T11:11:13.330Z | user\n\nInitial demo\n\nArchive index:\n\nArchive v3.8.2: 12 files, 24410 bytes\n\nFiles: config/config.json (181b), config/protocols.json (4175b), config/schema.json (942b), README.md (12840b), references/mcp-servers.md (1791b), references/protocols.md (2715b), references/risk-framework.md (2677b), scripts/mcp_client.py (16662b), scripts/run.sh (503b), skill-card.md (2873b), SKILL.md (16313b), _meta.json (132b)\n\nFile v3.8.2:SKILL.md\n\n---\nname: web3-investor\nversion: 3.8.0\ndescription: AI-native DeFi investment intelligence. Discover, analyze, and compare yield opportunities across 2,500+ protocols with intent-aware search, LLM-powered deep analysis, 7-dimension risk scoring, DeFi security scanning, smart money sentiment, and multi-round conversational refinement. All intelligence runs server-side — zero API keys on the client.\nauthor: Antalpha AI Team\nhomepage: https://www.antalpha.com/\nmetadata:\n  openclaw:\n    requires:\n      bins: [\"python3\"]\n    mcp:\n      antalpha-skills:\n        url: https://mcp-skills.ai.antalpha.com/mcp\n        tools:\n          - antalpha-register\n          - investor_discover\n          - investor_analyze\n          - investor_compare\n    security_notes:\n      - All queries are sent to the Antalpha MCP server (mcp-skills.ai.antalpha.com)\n      - Zero API keys required on the client side\n      - All trading is zero-custody — private keys never leave the user's wallet\n      - User investment intent is processed server-side for analysis\n---\n\n# Web3 Investor\n\n> **Your AI-powered DeFi research analyst.** Not a dashboard — a thinker.\n\nWeb3 Investor turns vague investment intent into structured, risk-aware recommendations. It doesn't just fetch APY data — it *understands* what you're looking for, scores every opportunity across 7 risk dimensions, cross-references smart money flows, scans for contract vulnerabilities, and explains its reasoning in plain English.\n\n---\n\n## The Problem It Solves\n\nDeFi yield farming today looks like this:\n\n1. Open DeFiLlama → see 2,500+ pools → overwhelming\n2. Check audits, TVL, APY trend, IL risk — each on a different site\n3. Cross-reference with Twitter sentiment and whale wallets\n4. Try to figure out if the yield is sustainable or just emission bait\n5. **Give up and put money in USDC savings at 4%**\n\nWeb3 Investor collapses this into **one natural-language request**:\n\n```\n\"I want stablecoin yield, conservative risk, on Ethereum\"\n→ 5 personalized recommendations with full risk analysis in 3 seconds\n```\n\n---\n\n## 🧠 How It Works\n\n### The Intelligence Pipeline\n\n```\nUser Intent (natural language)\n  │\n  ├─ 1. Intent Classification (keyword + LLM fusion)\n  │    Extract: asset type, risk level, chain, time horizon,\n  │            position size, liquidity needs, implicit constraints\n  │\n  ├─ 2. Intent Gate (NEEDS_CLARIFICATION or PASS)\n  │    If ambiguous → ask user a focused question\n  │    If clear → proceed with accumulated context (multi-round session)\n  │\n  ├─ 3. Discovery Engine (DeFiLlama + Dune Analytics + CoinGecko)\n  │    Fetch 200+ candidates → filter by chain, TVL, risk threshold\n  │    → deduplicate → rank by risk-adjusted score\n  │\n  ├─ 4. Risk Scoring (7 dimensions, 0-100)\n  │    TVL, audit status, chain maturity, yield sustainability,\n  │    deposit token safety, reward token safety, protocol trust\n  │    → composite risk level: LOW / MEDIUM / HIGH / VERY_HIGH\n  │\n  ├─ 5. DeFi Security Scan\n  │    AI-powered contract scanner → scam detection → critical issue flag\n  │\n  ├─ 6. Smart Money Sentiment (Dune Analytics)\n  │    Track whale/fund flows → inflow/outflow signal\n  │\n  ├─ 7. Recommendation Explanation\n  │    \"Why this product?\" — benchmarked vs bank deposits,\n  │    risk classification (controllable vs uncontrollable),\n  │    honest alternatives if a better option exists\n  │\n  └─ Output: Ranked recommendations with full context\n```\n\n---\n\n## 🛠 Three Tools. Deep Intelligence.\n\n### `investor_discover` — Find Opportunities\n\nThe entry point. Converts natural language into structured intent, discovers opportunities, and returns ranked recommendations.\n\n**What makes it different from a simple DeFiLlama query:**\n\n| Feature | DeFiLlama | investor_discover |\n|---------|-----------|-------------------|\n| Input | Chain + sort | Natural language (\"stablecoin, conservative\") |\n| Intent understanding | None | Keyword + LLM fusion with 95%+ accuracy |\n| Risk filtering | Manual | Automatic 7-dimension scoring + threshold |\n| Multi-round | N/A | Session-based intent accumulation |\n| Clarification | N/A | Asks focused questions when intent is ambiguous |\n| Smart money | N/A | Integrated whale flow signals |\n| DeFi security | N/A | AI contract scanner per pool |\n| Explanation | N/A | \"Why this?\" reasoning per recommendation |\n\n**Multi-round Session Example:**\n```\nRound 1:\n  User: \"Find me good yields\"\n  Agent: \"What's your risk tolerance? [Conservative] [Moderate] [Aggressive]\"\n  → Session stores partial intent\n\nRound 2:\n  User: \"Conservative, stablecoins only\"\n  Agent: (accumulates Round 1 + Round 2 intent)\n  → Returns conservative stablecoin recommendations on Ethereum\n```\n\n**Request:**\n```json\n{\n  \"agent_id\": \"uuid\",\n  \"natural_language\": \"stablecoin yield, conservative risk, Ethereum\",\n  \"structured_preferences\": {\n    \"chain\": \"ethereum\",\n    \"min_apy\": 5,\n    \"asset_type\": \"stablecoin\"\n  },\n  \"limit\": 5\n}\n```\n\n**Response highlights:**\n```json\n{\n  \"gate_status\": \"PASS\",\n  \"recommendations\": [{\n    \"name\": \"Aave V3 USDC\",\n    \"yield\": { \"apy\": 5.2, \"apy_base\": 2.8, \"apy_reward\": 2.4 },\n    \"scale\": { \"tvl_usd\": 1500000000 },\n    \"risk\": {\n      \"risk_level\": \"LOW\",\n      \"risk_score\": 82,\n      \"risk_factors\": { \"tvl_score\": 95, \"audit_score\": 90, ... },\n      \"warnings\": []\n    },\n    \"data_quality\": { \"score\": 95, \"level\": \"HIGH\", \"cross_validated\": true },\n    \"incentive\": { \"score\": \"medium\", \"reward_ratio\": 0.46 },\n    \"smart_money\": { \"flow\": \"inflow\", \"sentiment_score\": 0.72, \"confidence\": \"high\" },\n    \"explanation\": {\n      \"summary\": \"Aave V3 USDC: 5.2% APY, TVL $1.5B\",\n      \"reasons\": { \"for\": [...], \"against\": [...] },\n      \"compared_to\": { \"benchmark\": \"US bank savings (4.0%)\", \"outperformance\": \"1.3x\" },\n      \"risks\": { \"controllable\": [\"随时可赎回\"], \"uncontrollable\": [\"智能合约风险\"] }\n    }\n  }],\n  \"search_stats\": {\n    \"total_candidates\": 247,\n    \"total_after_risk_filter\": 89,\n    \"final_recommendations\": 5,\n    \"filters_applied\": [\"defillama_fetch:ethereum\", \"intent_filter:STABLECOIN\", \"risk_scoring\", \"dust_filter:50000\"]\n  }\n}\n```\n\n---\n\n### `investor_analyze` — Deep Analysis\n\nLLM-powered 5-step reasoning chain for a single product. Goes beyond numbers to provide *understanding*.\n\n**Analysis depths:**\n\n| Depth | What You Get | Use Case |\n|-------|-------------|----------|\n| `basic` | Key metrics + risk score + 1-paragraph summary | Quick check |\n| `detailed` | Full risk breakdown + yield source analysis + sustainability assessment + smart money + historical APY | **Recommended for investment decisions** |\n| `full` | Everything in detailed + peer comparison + protocol profile + governance analysis + LLM narrative | Due diligence |\n\n**The LLM analysis covers:**\n\n```\nStep 1: Yield Source Analysis\n  → Is this APY from trading fees (sustainable) or token emissions (unsustainable)?\n  → APY breakdown: base yield vs reward yield ratio\n\nStep 2: Sustainability Assessment\n  → Historical APY trend (7d / 30d / 90d)\n  → APY volatility (standard deviation)\n  → Revenue coverage (can the protocol afford these rewards?)\n\nStep 3: Risk Narrative\n  → Comprehensive risk story, not just a score\n  → Smart money sentiment overlay\n  → DeFi security scan results (scam flags, critical issues)\n\nStep 4: Competitive Position\n  → How does this compare to peers in the same category?\n  → Protocol profile: governance, longevity, audit history\n\nStep 5: Investor Considerations\n  → Actionable guidance for the specific investor profile\n  → Key risks and key positives\n  → \"If you're conservative, consider X. If aggressive, consider Y.\"\n```\n\n---\n\n### `investor_compare` — Side-by-Side Comparison\n\nCompare 2–5 products with LLM-powered interpretation across customizable dimensions.\n\n**Default comparison dimensions:** APY, risk score, TVL\n\n**Extended dimensions:** fees, lock period, audit count, IL risk, governance type, smart money sentiment, incentive sustainability\n\n**LLM comparison output:**\n```json\n{\n  \"llm_comparison\": {\n    \"narrative\": \"Aave offers superior security with $1.5B TVL and 6 audits, while Compound provides higher raw yield at 6.1% but with smaller TVL...\",\n    \"risk_comparison\": \"Aave's risk score (82) significantly outperforms Compound (68), primarily due to larger TVL and more comprehensive audit coverage\",\n    \"recommendation_with_reasoning\": {\n      \"for_conservative\": \"Choose Aave — battle-tested protocol, deep liquidity, multiple top-tier audits\",\n      \"for_aggressive\": \"Consider Compound — 0.9% higher APY, acceptable risk for short-term positions\",\n      \"key_tradeoff\": \"0.9% yield premium vs significantly lower risk score (82 vs 68)\"\n    }\n  }\n}\n```\n\n---\n\n## 🏗️ Server-Side Architecture\n\n```\n┌─────────────────────┐\n│    AI Agent          │         MCP JSON-RPC         ┌──────────────────────────────────────┐\n│    (OpenClaw)        │ ─────────────────────────────► │  Antalpha MCP Server                 │\n│                      │                                │  mcp-skills.ai.antalpha.com          │\n│  \"Find me yield\"     │                                │                                      │\n│  → 3 tool calls      │ ◄───────────────────────────── │  Intent Classifier (keyword + LLM)   │\n│  → zero API keys     │   structured results           │  Risk Scoring (7 dimensions)         │\n│  → zero custody      │                                │  DeFi Security Scanner               │\n└─────────────────────┘                                │  LLM Analysis (5-step chain)         │\n                                                       │  Smart Money (Dune Analytics)        │\n                                                       │  Market Context (bull/bear/sideways)  │\n                                                       │  Protocol Profiles (DefiLlama)       │\n                                                       │  Data Validation (cross-source)      │\n                                                       │  Explanation Engine (benchmarked)    │\n                                                       │                                      │\n                                                       │  Data Sources:                        │\n                                                       │  ├─ DefiLlama (2,500+ pools)         │\n                                                       │  ├─ Dune Analytics (smart money)     │\n                                                       │  ├─ CoinGecko (market data)          │\n                                                       │  ├─ DeFi Security (contract scan)    │\n                                                       │  └─ Internal LLM (analysis)          │\n                                                       └──────────────────────────────────────┘\n```\n\n---\n\n## 🔐 Risk Intelligence\n\n### 7-Dimension Risk Scoring\n\nEach opportunity is scored 0–100 across seven independent dimensions:\n\n| Dimension | What It Measures | Weight |\n|-----------|-----------------|--------|\n| **TVL Score** | Total Value Locked — protocol maturity indicator | High |\n| **Audit Score** | Number and quality of security audits | High |\n| **Chain Score** | Chain maturity (L1 vs L2 vs new chain) | Medium |\n| **Sustainability** | Yield source analysis (fees vs emissions) | High |\n| **Deposit Token** | Safety tier of the deposit asset (USDC > DAI > random) | Medium |\n| **Reward Token** | Liquidity and safety of reward tokens | Low |\n| **Protocol Trust** | Governance, longevity, track record | Medium |\n\n**Risk Levels:**\n- **LOW** (score ≥ 70): Battle-tested, well-audited, high TVL\n- **MEDIUM** (score 50–69): Established but with some risk factors\n- **HIGH** (score 30–49): Newer or with significant warnings\n- **VERY_HIGH** (score < 30): Experimental or flagged\n\n### DeFi Security Scanning\n\nEvery pool is scanned by an AI-powered contract security engine:\n\n```json\n{\n  \"defi_security\": {\n    \"aiScore\": 87,\n    \"safetyPercentage\": 92,\n    \"isScam\": false,\n    \"criticalIssues\": 0\n  }\n}\n```\n\n### Smart Money Sentiment\n\nReal-time whale and fund wallet activity aggregated from Dune Analytics:\n\n```json\n{\n  \"smart_money\": {\n    \"flow\": \"inflow\",\n    \"sentiment_score\": 0.72,\n    \"confidence\": \"high\",\n    \"buy_volume_usd\": 15000000,\n    \"sell_volume_usd\": 3200000,\n    \"net_flow_usd\": 11800000,\n    \"signal_count\": 23\n  }\n}\n```\n\n### Market Context Awareness\n\nThe engine is aware of the current market cycle (bull/bear/sideways), total DeFi TVL, BTC dominance, and US Treasury rates — providing context-aware recommendations that adjust for macro conditions.\n\n---\n\n## 🚀 Quick Start\n\n### Prerequisites\n\n- Python 3.8+\n- No API keys needed — all intelligence runs server-side\n\n### Registration (one-time)\n\n```bash\n./scripts/run.sh register\n# Returns agent_id — save this for all subsequent calls\n```\n\n### Usage\n\n```bash\n# Discover opportunities\n./scripts/run.sh discover --chain ethereum --min-apy 5 --limit 5\n\n# Discover with natural language\n./scripts/run.sh discover --natural-language \"stablecoin yield, conservative\"\n\n# Deep analysis\n./scripts/run.sh analyze --product-id <id> --depth detailed\n\n# Full due diligence\n./scripts/run.sh analyze --product-id <id> --depth full\n\n# Compare products\n./scripts/run.sh compare --ids <id1> <id2> <id3>\n```\n\n---\n\n## ⚠️ Critical Rules\n\n### Rule 1: Discovery First\n**Never give generic investment advice without real-time data.**\n```\n❌ \"I recommend Aave for stablecoin yield\"\n✅ investor_discover → analyze results → data-backed recommendation\n```\n\n### Rule 2: Explain Your Reasoning\nEvery recommendation should include the `explanation` object — summary, reasons for/against, benchmark comparison, risk classification.\n\n### Rule 3: Risk Is Non-Negotiable\n- APY data may be delayed — always show `data_quality.score` and `last_updated`\n- Never recommend VERY_HIGH risk products without explicit user acknowledgment\n- Investment decisions are the user's own responsibility — always DYOR\n\n### Rule 4: Honest About Limitations\n- If no good options exist for the user's criteria, say so with `generateHonestNoResultExplanation`\n- Show alternatives even if they don't perfectly match — \"This is close but has X tradeoff\"\n\n---\n\n## 🔒 Security\n\n| Layer | Protection |\n|-------|-----------|\n| **Private Keys** | Zero contact — never held, transmitted, or stored |\n| **Data Sources** | Triple-validated (DefiLlama + Dune + CoinGecko) with cross-source checks |\n| **Contract Safety** | AI-powered DeFi security scanner on every pool |\n| **Risk Scoring** | 7 independent dimensions, no single point of failure |\n| **Scam Detection** | Automated flagging via DeFi Security engine (`isScam` check) |\n| **Data Quality** | Freshness tracking, confidence scores, validation issue logging |\n\n---\n\n## 📝 Changelog\n\n### v3.8.0 (2026-04-14)\n- **Full SKILL.md rewrite** — English, feature-focused, comprehensive\n- Documented complete server-side intelligence pipeline\n- Added 7-dimension risk scoring documentation\n- Added DeFi Security scanning documentation\n- Added Smart Money sentiment documentation\n- Added Market Context awareness documentation\n- Added multi-round session intent accumulation flow\n- Added honest \"no result\" explanation behavior\n- Added incentive sustainability scoring documentation\n- Added data quality cross-validation documentation\n\n### v3.7.2 (2026-04-13)\n- Client cleanup: removed deprecated tools (feedback/confirm-intent/get-intent)\n\n---\n\n## 🤝 Contributing\n\nTest donations welcome:\n- **Network**: Base Chain\n- **Address**: `0x1F3A9A450428BbF161C4C33f10bd7AA1b2599a3e`\n\n---\n\n**Maintainer**: Web3 Investor Skill Team\n**Registry**: https://clawhub.com/skills/web3-investor\n**License**: MIT\n\nFile v3.8.2:README.md\n\n# Web3 Investor Skill\n\n> **English** | [中文](#chinese)\n\nAI-friendly DeFi investment intelligence skill. Discover, analyze, and compare yield opportunities across Ethereum, Base, Arbitrum, and Optimism — powered by Antalpha's remote MCP server. No API keys needed.\n\n---\n\n## Installation\n\n```bash\nopenclaw skill install https://github.com/AntalphaAI/web3-investor\n```\n\n### Install via ClawHub\n\n```bash\nclawhub install web3-investor\n```\n\n> Requires [OpenClaw](https://www.antalpha.com/) with Python 3.7+.  \n> No environment variables required — all data is fetched from the remote MCP server.\n\n---\n\n## Features\n\n### 1. Opportunity Discovery (`discover`)\nSearch for DeFi yield opportunities across chains with flexible filters:\n- Filter by chain: `ethereum`, `base`, `arbitrum`, `optimism`\n- Filter by minimum / maximum APY\n- Stablecoin-only mode\n- Natural language query support (e.g. \"I want safe yields on Base\")\n- Session-aware: remembers your preferences across calls\n\n### 2. Deep Analysis (`analyze`)\nGet a detailed breakdown of any single investment product:\n- Basic / detailed / full depth levels\n- Historical performance data\n- LLM-generated insights\n- Optional: skip history for faster response\n\n### 3. Multi-Product Comparison (`compare`)\nSide-by-side comparison of 2 or more products:\n- Unified metrics table\n- Comparative analysis\n- Final recommendation\n\n### 4. Intent Clarification Flow (`confirm-intent` / `get-intent`)\nWhen a query is ambiguous, the server returns a clarification request. The agent:\n1. Presents clarification options to the user\n2. Calls `confirm-intent` to lock in preferences (risk profile, capital nature, liquidity need)\n3. Re-runs discovery with the stored intent\n\n### 5. Feedback Loop (`feedback`)\nSubmit feedback on any recommendation:\n- Outcomes: `helpful`, `not_helpful`, `invested`, `dismissed`\n- Optional free-text reason\n- Feeds back into server-side recommendation quality\n\n---\n\n## Commands & Usage\n\n### discover\n```bash\npython3 scripts/mcp_client.py discover \\\n  --chain <ethereum|base|arbitrum|optimism> \\\n  --min-apy <number> \\\n  [--max-apy <number>] \\\n  [--stablecoin-only] \\\n  [--limit <1-10>] \\\n  [--session-id <id>] \\\n  [--natural-language \"<query>\"]\n```\n\n### analyze\n```bash\npython3 scripts/mcp_client.py analyze \\\n  --product-id <id> \\\n  [--depth basic|detailed|full] \\\n  [--no-history]\n```\n\n### compare\n```bash\npython3 scripts/mcp_client.py compare \\\n  --ids <id1> <id2> [<id3> ...]\n```\n\n### feedback\n```bash\npython3 scripts/mcp_client.py feedback \\\n  --product-id <id> \\\n  --feedback <helpful|not_helpful|invested|dismissed> \\\n  [--reason \"<text>\"]\n```\n\n### confirm-intent\n```bash\npython3 scripts/mcp_client.py confirm-intent \\\n  --session-id <id> \\\n  --type <intent_type> \\\n  --risk <conservative|moderate|aggressive> \\\n  [--capital-nature <nature>] \\\n  [--liquidity-need <need>]\n```\n\n### get-intent\n```bash\npython3 scripts/mcp_client.py get-intent \\\n  --session-id <id>\n```\n\n---\n\n## MCP Tools Reference\n\n| Tool | Purpose | Key Response Fields |\n|------|---------|---------------------|\n| `investor_discover` | Find yield opportunities | `recommendations[]`, `intent{}`, `search_stats` |\n| `investor_analyze` | Deep analysis of one product | `product{}`, `historical_data`, `llm_insights` |\n| `investor_compare` | Compare multiple products | `products[]`, `comparisons[]`, `recommendation` |\n| `investor_feedback` | Submit feedback | `acknowledged` |\n| `investor_confirm_intent` | Lock in user intent | `acknowledged`, `session_id` |\n| `investor_get_stored_intent` | Retrieve stored intent | `found`, `intent{}` |\n\n---\n\n## Example Sessions\n\n**Find and analyze:**\n```\nUser: Find ETH lending on Base with >5% APY\n→ discover --chain base --min-apy 5\n\nUser: Analyze the top result\n→ analyze --product-id aave-eth-base --depth detailed\n```\n\n**Compare two products:**\n```\n→ compare --ids aave-usdc-base compound-usdc-ethereum\n```\n\n**Intent clarification:**\n```\nUser: I want to invest in DeFi\n→ discover --natural-language \"I want to invest in DeFi\"\n  [Server returns NEEDS_CLARIFICATION]\n\nUser: Stablecoin, moderate risk, 1 month horizon\n→ confirm-intent --session-id <id> --type stablecoin --risk moderate\n→ discover --session-id <id>\n```\n\n---\n\n## Architecture\n\n```\nweb3-investor/\n├── scripts/\n│   └── mcp_client.py     # Thin MCP client wrapper\n├── config/\n│   └── config.json       # MCP server endpoint config\n└── SKILL.md              # Agent skill definition\n```\n\n- All business logic runs on the remote MCP server: `https://mcp-skills.ai.antalpha.com/mcp`\n- The local client handles only: MCP session handshake, request routing, SSE response parsing\n- No local API keys, no local data storage\n\n## Security\n\n- All API keys managed server-side\n- No sensitive data stored locally\n- MCP session protocol: `initialize` → `notifications/initialized` → `tools/call` (with `Mcp-Session-Id` header)\n\n---\n\n## Changelog\n\n### v2.0.3 — 2026-04-08\n- Add `homepage` metadata for provenance and ClawHub trust signals\n- No functional changes\n\n### v2.0.2 — 2026-04-08 ⭐ *Recommended baseline*\n- **Fix critical connection bug**: \"No valid session ID provided\" error resolved\n- Add `MCPClient` class with proper session management\n- Implement full MCP 2024-11-05 handshake: `initialize` → `notifications/initialized`\n- Parse `mcp-session-id` from response headers and reuse across calls\n- Add SSE (`text/event-stream`) response parsing\n- Type hints, improved docstrings, singleton pattern\n- Timeouts: initialize 60s, tools 120s\n\n### v2.0.1 — 2026-04-08\n- **Security fix**: Remove all `localhost:3000` signer API references\n- Remove `DUNE_API_KEY` environment variable dependency\n- Strip all trading/execution code and legacy local modules\n- Simplify config to MCP endpoint only\n- Confirm `env: []` — no local API keys required\n\n### v2.0.0 — 2026-04-08 ⚠️ *Breaking change*\n- Full architecture rewrite: local discovery/trading modules → thin MCP client wrapper\n- New commands: `discover`, `analyze`, `compare`, `feedback`, `confirm-intent`, `get-intent`\n- Natural language query support\n- Intent clarification flow\n- Remove all local API key dependencies\n\n### v0.5.x — 2026-03-29 to 2026-03-30\n- Legacy versions with local service architecture (deprecated)\n- Various metadata format fixes for ClawHub compatibility\n\n---\n\n## License\n\nMIT — [Antalpha AI Team](https://www.antalpha.com/)\n\n---\n\n---\n\n<a name=\"chinese\"></a>\n\n# Web3 Investor Skill（中文文档）\n\nAI 驱动的 DeFi 收益发现与分析技能。支持在 Ethereum、Base、Arbitrum、Optimism 四条链上发现、分析和对比投资机会，所有数据通过 Antalpha 远端 MCP 服务器获取，**无需本地 API Key**。\n\n---\n\n## 安装\n\n```bash\nopenclaw skill install https://github.com/AntalphaAI/web3-investor\n```\n\n### 通过 ClawHub 安装\n\n```bash\nclawhub install web3-investor\n```\n\n> 依赖 [OpenClaw](https://www.antalpha.com/)，Python 3.7+。  \n> 无需配置任何环境变量。\n\n---\n\n## 功能介绍\n\n### 1. 机会发现（`discover`）\n在多条链上搜索 DeFi 收益机会，支持灵活过滤：\n- 按链筛选：`ethereum`、`base`、`arbitrum`、`optimism`\n- 按最低 / 最高 APY 筛选\n- 仅限稳定币模式\n- 自然语言查询（如\"帮我找 Base 上安全稳健的收益\"）\n- 会话感知：跨调用记忆你的偏好\n\n### 2. 深度分析（`analyze`）\n对单一投资产品进行详细解析：\n- 支持 basic / detailed / full 三个分析深度\n- 历史表现数据\n- LLM 生成的投资洞察\n- 可跳过历史数据以加速响应\n\n### 3. 多产品对比（`compare`）\n同时对比 2 个及以上投资产品：\n- 统一指标横向对比\n- 综合分析报告\n- 最终推荐建议\n\n### 4. 意图澄清流程（`confirm-intent` / `get-intent`）\n当查询语义不明时，服务端返回澄清问题，Agent 会：\n1. 向用户展示选项\n2. 调用 `confirm-intent` 锁定偏好（风险等级、资金属性、流动性需求）\n3. 携带已存储意图重新执行发现\n\n### 5. 反馈回路（`feedback`）\n对任何推荐结果提交反馈：\n- 结果类型：`helpful`（有帮助）、`not_helpful`（无帮助）、`invested`（已投资）、`dismissed`（忽略）\n- 可附加文字原因\n- 反馈数据用于服务端推荐质量优化\n\n---\n\n## 命令与用法\n\n### discover — 发现机会\n```bash\npython3 scripts/mcp_client.py discover \\\n  --chain <ethereum|base|arbitrum|optimism> \\\n  --min-apy <数字> \\\n  [--max-apy <数字>] \\\n  [--stablecoin-only] \\\n  [--limit <1-10>] \\\n  [--session-id <id>] \\\n  [--natural-language \"<查询语句>\"]\n```\n\n### analyze — 深度分析\n```bash\npython3 scripts/mcp_client.py analyze \\\n  --product-id <产品ID> \\\n  [--depth basic|detailed|full] \\\n  [--no-history]\n```\n\n### compare — 多产品对比\n```bash\npython3 scripts/mcp_client.py compare \\\n  --ids <id1> <id2> [<id3> ...]\n```\n\n### feedback — 提交反馈\n```bash\npython3 scripts/mcp_client.py feedback \\\n  --product-id <产品ID> \\\n  --feedback <helpful|not_helpful|invested|dismissed> \\\n  [--reason \"<原因文字>\"]\n```\n\n### confirm-intent — 确认用户意图\n```bash\npython3 scripts/mcp_client.py confirm-intent \\\n  --session-id <id> \\\n  --type <意图类型> \\\n  --risk <conservative|moderate|aggressive> \\\n  [--capital-nature <属性>] \\\n  [--liquidity-need <需求>]\n```\n\n### get-intent — 获取已存储意图\n```bash\npython3 scripts/mcp_client.py get-intent \\\n  --session-id <id>\n```\n\n---\n\n## MCP 工具一览\n\n| 工具 | 用途 | 关键返回字段 |\n|------|------|-------------|\n| `investor_discover` | 发现收益机会 | `recommendations[]`, `intent{}`, `search_stats` |\n| `investor_analyze` | 单产品深度分析 | `product{}`, `historical_data`, `llm_insights` |\n| `investor_compare` | 多产品横向对比 | `products[]`, `comparisons[]`, `recommendation` |\n| `investor_feedback` | 提交反馈 | `acknowledged` |\n| `investor_confirm_intent` | 锁定用户意图 | `acknowledged`, `session_id` |\n| `investor_get_stored_intent` | 获取已存储意图 | `found`, `intent{}` |\n\n---\n\n## 使用示例\n\n**发现并分析：**\n```\n用户：帮我找 Base 上 APY > 5% 的 ETH 借贷\n→ discover --chain base --min-apy 5\n\n用户：分析排名第一的产品\n→ analyze --product-id aave-eth-base --depth detailed\n```\n\n**对比两个产品：**\n```\n→ compare --ids aave-usdc-base compound-usdc-ethereum\n```\n\n**意图澄清流程：**\n```\n用户：我想投资 DeFi\n→ discover --natural-language \"我想投资 DeFi\"\n  [服务端返回 NEEDS_CLARIFICATION]\n\n用户：稳定币，中等风险，1个月期限\n→ confirm-intent --session-id <id> --type stablecoin --risk moderate\n→ discover --session-id <id>\n```\n\n---\n\n## 架构说明\n\n```\nweb3-investor/\n├── scripts/\n│   └── mcp_client.py     # 轻量 MCP 客户端封装\n├── config/\n│   └── config.json       # MCP 服务端地址配置\n└── SKILL.md              # Agent 技能定义文件\n```\n\n- 所有业务逻辑运行在远端 MCP 服务器：`https://mcp-skills.ai.antalpha.com/mcp`\n- 本地客户端仅负责：MCP 会话握手、请求路由、SSE 响应解析\n- 无本地 API Key，无本地数据存储\n\n## 安全说明\n\n- 所有 API Key 由服务端统一管理\n- 本地不存储任何敏感数据\n- MCP 会话协议：`initialize` → `notifications/initialized` → `tools/call`（携带 `Mcp-Session-Id` header）\n\n---\n\n## 版本更新说明\n\n### v2.0.3 — 2026-04-08\n- 添加 `homepage` 元数据，改善 ClawHub 信任评分\n- 无功能性变更\n\n### v2.0.2 — 2026-04-08 ⭐ *推荐基准版本*\n- **修复关键连接 Bug**：彻底解决 \"No valid session ID provided\" 错误\n- 新增 `MCPClient` 类，实现完整会话管理\n- 实现标准 MCP 2024-11-05 握手流程：`initialize` → `notifications/initialized`\n- 从响应头提取并复用 `mcp-session-id`\n- 新增 SSE（`text/event-stream`）响应解析\n- 完善类型注解、文档字符串，采用单例模式\n- 超时配置：初始化 60s，工具调用 120s\n\n### v2.0.1 — 2026-04-08\n- **安全修复**：移除所有 `localhost:3000` 签名 API 引用\n- 移除 `DUNE_API_KEY` 环境变量依赖\n- 删除所有交易执行代码和历史遗留本地模块\n- 简化 config 仅保留 MCP 端点配置\n- 确认 `env: []`，无需任何本地 API Key\n\n### v2.0.0 — 2026-04-08 ⚠️ *破坏性变更*\n- 架构全量重写：本地发现/交易模块 → 轻量 MCP 客户端封装\n- 新增 6 条命令：`discover`、`analyze`、`compare`、`feedback`、`confirm-intent`、`get-intent`\n- 支持自然语言查询\n- 支持意图澄清流程\n- 移除所有本地 API Key 依赖\n\n### v0.5.x — 2026-03-29 至 2026-03-30\n- 旧版本，采用本地服务架构（已废弃）\n- 多次修复 ClawHub 元数据格式兼容性问题\n\n---\n\n## 开源协议\n\nMIT — [Antalpha AI 团队](https://www.antalpha.com/)\n\nFile v3.8.2:_meta.json\n\n{\n  \"ownerId\": \"kn7fy7jd9vd0x7wvpxgfxye1pn827f50\",\n  \"slug\": \"web3-investor\",\n  \"version\": \"3.8.2\",\n  \"publishedAt\": 1776169899943\n}\n\nFile v3.8.2:references/mcp-servers.md\n\n# MCP Servers for Web3 Data\n\nThis document lists MCP (Model Context Protocol) servers that provide Web3 data.\n\n## What is MCP?\n\nModel Context Protocol is a standardized way for AI models to access external data sources. MCP servers act as bridges between AI agents and blockchain data.\n\n## Recommended MCP Servers\n\n### 1. Ethereum MCP\n- **Repository**: https://github.com/your-org/ethereum-mcp\n- **Capabilities**: Balance queries, transaction simulation, contract reads\n- **Setup**: `npx ethereum-mcp --rpc-url YOUR_RPC_URL`\n- **Free**: Yes (uses your RPC)\n\n### 2. Etherscan MCP\n- **Repository**: https://github.com/your-org/etherscan-mcp\n- **Capabilities**: Transaction history, contract verification, token info\n- **Setup**: `ETHERSCAN_API_KEY=xxx npx etherscan-mcp`\n- **Free**: Yes (free tier available)\n\n### 3. DefiLlama MCP\n- **Repository**: https://github.com/your-org/defillama-mcp\n- **Capabilities**: TVL data, yield rankings, protocol info\n- **Setup**: `npx defillama-mcp`\n- **Free**: Yes (no API key required)\n\n### 4. Dune Analytics MCP\n- **Repository**: https://github.com/your-org/dune-mcp\n- **Capabilities**: Custom SQL queries on blockchain data\n- **Setup**: `DUNE_API_KEY=xxx npx dune-mcp`\n- **Free**: Free tier available (limited queries)\n\n## Integration Pattern\n\n```python\n# Check MCP availability first, fall back to direct API\nasync def get_tvl(protocol: str) -> float:\n    if mcp_available(\"defillama\"):\n        return await mcp_query(\"defillama\", \"get_tvl\", protocol)\n    else:\n        return await defillama_api_get_tvl(protocol)\n```\n\n## Adding New MCP Servers\n\nWhen adding new MCP servers:\n1. Verify the server supports standard MCP protocol\n2. Test with `mcp-inspector` tool\n3. Document required environment variables\n4. Add fallback logic for when MCP is unavailable\n\nFile v3.8.2:references/protocols.md\n\n# Known Protocol Registry\n\nThis document contains metadata for common DeFi protocols on Ethereum mainnet.\n\n## Lending Protocols\n\n### Aave V3\n- **Contract**: 0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2\n- **Category**: Lending\n- **Risk Level**: Low\n- **Audit**: Multiple (OpenZeppelin, Trail of Bits)\n- **TVL**: > $5B (check DefiLlama for current)\n- **Docs**: https://docs.aave.com/\n\n### Compound V3\n- **Contract**: 0xc3d688B66703497DAA19211EEdff47f25384cdc3\n- **Category**: Lending\n- **Risk Level**: Low\n- **Audit**: Multiple (OpenZeppelin)\n- **TVL**: > $2B\n- **Docs**: https://docs.compound.finance/\n\n### MakerDAO (Spark)\n- **Contract**: Various (see docs)\n- **Category**: Lending\n- **Risk Level**: Low\n- **Audit**: Multiple\n- **TVL**: > $8B\n- **Docs**: https://docs.makerdao.com/\n\n## Liquid Staking\n\n### Lido (stETH)\n- **Contract**: 0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84\n- **Category**: Liquid Staking\n- **Risk Level**: Low\n- **Audit**: Multiple (Quantstamp, MixBytes)\n- **TVL**: > $15B\n- **Docs**: https://docs.lido.fi/\n\n### Rocket Pool (rETH)\n- **Contract**: 0xae78736Cd615f374D3085123A210448E74Fc6393\n- **Category**: Liquid Staking\n- **Risk Level**: Low\n- **Audit**: Multiple (Sigma Prime)\n- **TVL**: > $2B\n- **Docs**: https://docs.rocketpool.net/\n\n## DEXs\n\n### Uniswap V3\n- **Factory**: 0x1F98431c8aD98523631AE4a59f267346ea31F984\n- **Category**: DEX\n- **Risk Level**: Low\n- **Audit**: Multiple\n- **TVL**: > $4B\n- **Docs**: https://docs.uniswap.org/\n\n### Curve Finance\n- **Contract**: 0xD533a949740bb3306d119CC777fa900bA034cd52\n- **Category**: DEX (Stablecoins)\n- **Risk Level**: Low\n- **Audit**: Multiple\n- **TVL**: > $2B\n- **Docs**: https://docs.curve.fi/\n\n## Yield Aggregators\n\n### Yearn V3\n- **Registry**: 0x3c91D8ba3C8cB06D9CFe5b8F31c68a746f0f15B6\n- **Category**: Yield Aggregator\n- **Risk Level**: Medium\n- **Audit**: Multiple\n- **TVL**: Variable\n- **Docs**: https://docs.yearn.fi/\n\n## Protocol Metadata Schema\n\n```json\n{\n  \"name\": \"Protocol Name\",\n  \"address\": \"0x...\",\n  \"chain\": \"ethereum\",\n  \"category\": \"lending|dex|staking|aggregator\",\n  \"risk_level\": \"low|medium|high\",\n  \"audit_status\": \"multiple|single|community|none\",\n  \"tvl\": 1000000000,\n  \"maturity_days\": 730,\n  \"has_timelock\": true,\n  \"governance\": \"dao|multisig|admin\",\n  \"docs_url\": \"https://...\",\n  \"icon_url\": \"https://...\"\n}\n```\n\n## Adding New Protocols\n\nTo add a new protocol, create a JSON file in `config/protocols/`:\n\n```json\n{\n  \"name\": \"New Protocol\",\n  \"address\": \"0x...\",\n  \"chain\": \"ethereum\",\n  \"category\": \"lending\",\n  \"risk_level\": \"medium\",\n  \"audit_status\": \"single\",\n  \"docs_url\": \"https://...\"\n}\n```\n\nThen run:\n```bash\npython scripts/discovery/analyze_protocol.py --add-config config/protocols/new-protocol.json\n```\n\nFile v3.8.2:references/risk-framework.md\n\n# Risk Assessment Framework\n\n## Risk Levels\n\n| Level | Score | Description | Typical Characteristics |\n|-------|-------|-------------|------------------------|\n| **Low** | 0-3 | Blue-chip, battle-tested | TVL > $1B, Audited, 2+ years live |\n| **Medium** | 4-6 | Established but some risk | TVL $100M-$1B, Audited, 1+ year live |\n| **High** | 7-10 | Experimental or new | TVL < $100M, No audit, < 1 year live |\n\n## Risk Factors\n\n### 1. Protocol Maturity (0-3 points)\n\n| Criteria | Points |\n|----------|--------|\n| Live > 2 years with no major exploits | 0 |\n| Live 1-2 years | 1 |\n| Live < 1 year | 2 |\n| Live < 3 months | 3 |\n\n### 2. Audit Status (0-3 points)\n\n| Criteria | Points |\n|----------|--------|\n| Multiple audits from top firms (OpenZeppelin, Trail of Bits, etc.) | 0 |\n| Single audit from reputable firm | 1 |\n| Community audit only | 2 |\n| No audit | 3 |\n\n### 3. TVL Size (0-2 points)\n\n| TVL | Points |\n|-----|--------|\n| > $1 billion | 0 |\n| $100M - $1B | 1 |\n| < $100M | 2 |\n\n### 4. Decentralization (0-2 points)\n\n| Criteria | Points |\n|----------|--------|\n| DAO governance, no admin keys or timelocked | 0 |\n| Timelocked admin keys (> 48h) | 1 |\n| Admin keys, no timelock | 2 |\n\n## Risk Calculation\n\n```\nRisk Score = Protocol Maturity + Audit Status + TVL Size + Decentralization\n```\n\n### Examples\n\n| Protocol | Maturity | Audit | TVL | Decentralization | Total | Level |\n|----------|----------|-------|-----|------------------|-------|-------|\n| Aave V3 | 0 | 0 | 0 | 1 | 1 | Low |\n| Compound | 0 | 0 | 0 | 0 | 0 | Low |\n| New Lending Protocol | 3 | 3 | 2 | 2 | 10 | High |\n\n## Risk-Adjusted APY\n\nWhen comparing opportunities, consider risk-adjusted returns:\n\n```\nRisk-Adjusted APY = Nominal APY × (1 - Risk Score / 20)\n```\n\n### Example\n\n| Protocol | APY | Risk Score | Risk-Adjusted APY |\n|----------|-----|------------|-------------------|\n| Aave USDC | 5% | 1 | 4.75% |\n| New Protocol | 20% | 8 | 12% |\n\n## Special Risk Flags\n\nAdditional risk factors that should be noted but not scored:\n\n- ⚠️ **Fork Risk**: Protocol is a fork of another protocol with issues\n- ⚠️ **Oracle Risk**: Uses custom oracle instead of Chainlink\n- ⚠️ **Leverage Risk**: Involves leverage or looping\n- ⚠️ **Illicit Risk**: Protocol in sanctioned jurisdiction\n- ⚠️ **Regulatory Risk**: Under regulatory scrutiny\n\n## Usage in Discovery\n\nWhen running `find_opportunities.py`:\n\n```bash\n# Only show low-risk opportunities\npython scripts/discovery/find_opportunities.py --max-risk low\n\n# Filter by minimum TVL (in USD)\npython scripts/discovery/find_opportunities.py --min-tvl 1000000\n\n# Require audit\npython scripts/discovery/find_opportunities.py --require-audit\n```\n\nFile v3.8.2:skill-card.md\n\n## Description:\n\nAI-native DeFi investment intelligence for discovering, analyzing, and comparing yield opportunities across protocols using intent-aware search, risk scoring, security scanning, smart money signals, and server-side analysis.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[bevanding](https://clawhub.ai/user/bevanding)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal users and agent developers use this skill to research DeFi yield opportunities, compare products, and generate risk-aware analysis from natural language or structured preferences. The skill is for investment research support, not custody or trade execution.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Submitted DeFi queries, risk preferences, product IDs, session IDs, and optional feedback are sent to Antalpha's remote MCP server.\n\nMitigation: Do not submit wallet seed phrases, private keys, personally identifying details, or full private portfolio records; provide only the minimum investment context needed for research.\n\nRisk: Investment research outputs may be affected by delayed APY data, incomplete market context, or limits in server-side analysis.\n\nMitigation: Review returned data quality and freshness fields, treat recommendations as research support, and perform independent due diligence before making investment decisions.\n\nRisk: Reference material includes optional unpinned npx MCP examples that could execute third-party packages.\n\nMitigation: Pin and verify package sources before running those examples, or use the bundled Python client path instead.\n\n## Reference(s):\n\n- [ClawHub Web3 Investor skill page](https://clawhub.ai/bevanding/skills/web3-investor)\n- [Antalpha MCP server endpoint](https://mcp-skills.ai.antalpha.com/mcp)\n- [Antalpha homepage](https://www.antalpha.com/)\n- [MCP servers reference](artifact/references/mcp-servers.md)\n- [Protocol registry reference](artifact/references/protocols.md)\n- [Risk assessment framework](artifact/references/risk-framework.md)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown-formatted text with structured JSON-derived result summaries and inline shell commands]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Outputs may include ranked recommendations, product analysis, comparison summaries, clarification prompts, suggested next actions, and raw JSON fallback responses.]\n\n## Skill Version(s):\n\n3.8.2 (source: ClawHub release metadata; artifact frontmatter is 3.8.0)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v3.8.2:config/config.json\n\n{\n  \"_comment\": \"Web3 Investor Skill Configuration - v2.0.0 (MCP Client Only)\",\n  \"mcp\": {\n    \"endpoint\": \"https://mcp-skills.ai.antalpha.com/mcp\",\n    \"timeout_seconds\": 30\n  }\n}\n\nFile v3.8.2:config/protocols.json\n\n{\n  \"version\": \"0.2.0\",\n  \"updated\": \"2026-03-04\",\n  \"description\": \"Static protocol registry for Web3 Investor Skill\",\n  \"protocols\": {\n    \"aave-v3\": {\n      \"name\": \"Aave V3\",\n      \"primary_contract\": \"0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2\",\n      \"chain\": \"ethereum\",\n      \"category\": \"lending\",\n      \"registry_risk\": \"low\",\n      \"docs_url\": \"https://docs.aave.com/\",\n      \"actions\": {\n        \"deposit\": {\n          \"method\": \"supply\",\n          \"signature\": \"supply(address,uint256,address,uint16)\"\n        },\n        \"withdraw\": {\n          \"method\": \"withdraw\",\n          \"signature\": \"withdraw(address,uint256,address)\"\n        }\n      }\n    },\n    \"aave\": {\n      \"name\": \"Aave\",\n      \"primary_contract\": \"0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2\",\n      \"chain\": \"ethereum\",\n      \"category\": \"lending\",\n      \"registry_risk\": \"low\",\n      \"docs_url\": \"https://docs.aave.com/\"\n    },\n    \"compound-v3\": {\n      \"name\": \"Compound V3\",\n      \"primary_contract\": \"0xc3d688B66703497DAA19211EEdff47f25384cdc3\",\n      \"chain\": \"ethereum\",\n      \"category\": \"lending\",\n      \"registry_risk\": \"low\",\n      \"docs_url\": \"https://docs.compound.finance/\",\n      \"actions\": {\n        \"deposit\": {\n          \"method\": \"supply\",\n          \"signature\": \"supply(address,uint256)\"\n        },\n        \"withdraw\": {\n          \"method\": \"withdraw\",\n          \"signature\": \"withdraw(uint256)\"\n        }\n      }\n    },\n    \"compound\": {\n      \"name\": \"Compound\",\n      \"primary_contract\": \"0xc3d688B66703497DAA19211EEdff47f25384cdc3\",\n      \"chain\": \"ethereum\",\n      \"category\": \"lending\",\n      \"registry_risk\": \"low\",\n      \"docs_url\": \"https://docs.compound.finance/\"\n    },\n    \"lido\": {\n      \"name\": \"Lido\",\n      \"primary_contract\": \"0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84\",\n      \"chain\": \"ethereum\",\n      \"category\": \"liquid_staking\",\n      \"registry_risk\": \"low\",\n      \"docs_url\": \"https://docs.lido.fi/\",\n      \"output_token\": {\n        \"symbol\": \"stETH\",\n        \"address\": \"0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84\"\n      }\n    },\n    \"rocket-pool\": {\n      \"name\": \"Rocket Pool\",\n      \"primary_contract\": \"0xae78736Cd615f374D3085123A210448E74Fc6393\",\n      \"chain\": \"ethereum\",\n      \"category\": \"liquid_staking\",\n      \"registry_risk\": \"low\",\n      \"docs_url\": \"https://docs.rocketpool.net/\",\n      \"output_token\": {\n        \"symbol\": \"rETH\",\n        \"address\": \"0xae78736Cd615f374D3085123A210448E74Fc6393\"\n      }\n    },\n    \"uniswap-v3\": {\n      \"name\": \"Uniswap V3\",\n      \"factory\": \"0x1F98431c8aD98523631AE4a59f267346ea31F984\",\n      \"chain\": \"ethereum\",\n      \"category\": \"dex\",\n      \"registry_risk\": \"low\",\n      \"docs_url\": \"https://docs.uniswap.org/\"\n    },\n    \"uniswap-v4\": {\n      \"name\": \"Uniswap V4\",\n      \"chain\": \"ethereum\",\n      \"category\": \"dex\",\n      \"registry_risk\": \"medium\",\n      \"docs_url\": \"https://docs.uniswap.org/\",\n      \"notes\": \"New version, may have undiscovered issues\"\n    },\n    \"curve\": {\n      \"name\": \"Curve Finance\",\n      \"primary_contract\": \"0xD533a949740bb3306d119CC777fa900bA034cd52\",\n      \"chain\": \"ethereum\",\n      \"category\": \"dex\",\n      \"registry_risk\": \"low\",\n      \"docs_url\": \"https://docs.curve.fi/\"\n    },\n    \"yearn\": {\n      \"name\": \"Yearn V3\",\n      \"registry\": \"0x3c91D8ba3C8cB06D9CFe5b8F31c68a746f0f15B6\",\n      \"chain\": \"ethereum\",\n      \"category\": \"yield_aggregator\",\n      \"registry_risk\": \"medium\",\n      \"docs_url\": \"https://docs.yearn.fi/\"\n    },\n    \"makerdao\": {\n      \"name\": \"MakerDAO\",\n      \"chain\": \"ethereum\",\n      \"category\": \"lending\",\n      \"registry_risk\": \"low\",\n      \"docs_url\": \"https://docs.makerdao.com/\"\n    },\n    \"convex\": {\n      \"name\": \"Convex\",\n      \"chain\": \"ethereum\",\n      \"category\": \"yield_aggregator\",\n      \"registry_risk\": \"medium\",\n      \"docs_url\": \"https://docs.convexfinance.com/\"\n    }\n  },\n  \"risk_categories\": {\n    \"lending\": \"Borrow/lend protocols - generally lower risk if established\",\n    \"dex\": \"Decentralized exchanges - medium risk due to impermanent loss\",\n    \"liquid_staking\": \"Liquid staking derivatives - low risk for established protocols\",\n    \"yield_aggregator\": \"Yield optimizers - higher complexity, medium risk\"\n  }\n}\n\nFile v3.8.2:config/schema.json\n\n{\n  \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n  \"title\": \"Web3 Investor Skill Configuration\",\n  \"version\": \"2.0.0\",\n  \"description\": \"Configuration schema for Web3 Investor Skill (MCP Client Only). No local services or API keys required.\",\n  \"type\": \"object\",\n  \"properties\": {\n    \"_comment\": {\n      \"type\": \"string\",\n      \"description\": \"Optional comment field for documentation purposes\"\n    },\n    \"mcp\": {\n      \"type\": \"object\",\n      \"description\": \"MCP server configuration\",\n      \"properties\": {\n        \"endpoint\": {\n          \"type\": \"string\",\n          \"format\": \"uri\",\n          \"default\": \"https://mcp-skills.ai.antalpha.com/mcp\",\n          \"description\": \"MCP server endpoint URL\"\n        },\n        \"timeout_seconds\": {\n          \"type\": \"integer\",\n          \"default\": 30,\n          \"minimum\": 5,\n          \"maximum\": 120,\n          \"description\": \"Request timeout for MCP calls\"\n        }\n      }\n    }\n  }\n}\n\nArchive v3.8.1: 11 files, 22887 bytes\n\nFiles: config/config.json (181b), config/protocols.json (4175b), config/schema.json (942b), README.md (12840b), references/mcp-servers.md (1791b), references/protocols.md (2715b), references/risk-framework.md (2677b), scripts/mcp_client.py (16662b), scripts/run.sh (503b), SKILL.md (16313b), _meta.json (132b)\n\nFile v3.8.1:SKILL.md\n\n---\nname: web3-investor\nversion: 3.8.0\ndescription: AI-native DeFi investment intelligence. Discover, analyze, and compare yield opportunities across 2,500+ protocols with intent-aware search, LLM-powered deep analysis, 7-dimension risk scoring, DeFi security scanning, smart money sentiment, and multi-round conversational refinement. All intelligence runs server-side — zero API keys on the client.\nauthor: Antalpha AI Team\nhomepage: https://www.antalpha.com/\nmetadata:\n  openclaw:\n    requires:\n      bins: [\"python3\"]\n    mcp:\n      antalpha-skills:\n        url: https://mcp-skills.ai.antalpha.com/mcp\n        tools:\n          - antalpha-register\n          - investor_discover\n          - investor_analyze\n          - investor_compare\n    security_notes:\n      - All queries are sent to the Antalpha MCP server (mcp-skills.ai.antalpha.com)\n      - Zero API keys required on the client side\n      - All trading is zero-custody — private keys never leave the user's wallet\n      - User investment intent is processed server-side for analysis\n---\n\n# Web3 Investor\n\n> **Your AI-powered DeFi research analyst.** Not a dashboard — a thinker.\n\nWeb3 Investor turns vague investment intent into structured, risk-aware recommendations. It doesn't just fetch APY data — it *understands* what you're looking for, scores every opportunity across 7 risk dimensions, cross-references smart money flows, scans for contract vulnerabilities, and explains its reasoning in plain English.\n\n---\n\n## The Problem It Solves\n\nDeFi yield farming today looks like this:\n\n1. Open DeFiLlama → see 2,500+ pools → overwhelming\n2. Check audits, TVL, APY trend, IL risk — each on a different site\n3. Cross-reference with Twitter sentiment and whale wallets\n4. Try to figure out if the yield is sustainable or just emission bait\n5. **Give up and put money in USDC savings at 4%**\n\nWeb3 Investor collapses this into **one natural-language request**:\n\n```\n\"I want stablecoin yield, conservative risk, on Ethereum\"\n→ 5 personalized recommendations with full risk analysis in 3 seconds\n```\n\n---\n\n## 🧠 How It Works\n\n### The Intelligence Pipeline\n\n```\nUser Intent (natural language)\n  │\n  ├─ 1. Intent Classification (keyword + LLM fusion)\n  │    Extract: asset type, risk level, chain, time horizon,\n  │            position size, liquidity needs, implicit constraints\n  │\n  ├─ 2. Intent Gate (NEEDS_CLARIFICATION or PASS)\n  │    If ambiguous → ask user a focused question\n  │    If clear → proceed with accumulated context (multi-round session)\n  │\n  ├─ 3. Discovery Engine (DeFiLlama + Dune Analytics + CoinGecko)\n  │    Fetch 200+ candidates → filter by chain, TVL, risk threshold\n  │    → deduplicate → rank by risk-adjusted score\n  │\n  ├─ 4. Risk Scoring (7 dimensions, 0-100)\n  │    TVL, audit status, chain maturity, yield sustainability,\n  │    deposit token safety, reward token safety, protocol trust\n  │    → composite risk level: LOW / MEDIUM / HIGH / VERY_HIGH\n  │\n  ├─ 5. DeFi Security Scan\n  │    AI-powered contract scanner → scam detection → critical issue flag\n  │\n  ├─ 6. Smart Money Sentiment (Dune Analytics)\n  │    Track whale/fund flows → inflow/outflow signal\n  │\n  ├─ 7. Recommendation Explanation\n  │    \"Why this product?\" — benchmarked vs bank deposits,\n  │    risk classification (controllable vs uncontrollable),\n  │    honest alternatives if a better option exists\n  │\n  └─ Output: Ranked recommendations with full context\n```\n\n---\n\n## 🛠 Three Tools. Deep Intelligence.\n\n### `investor_discover` — Find Opportunities\n\nThe entry point. Converts natural language into structured intent, discovers opportunities, and returns ranked recommendations.\n\n**What makes it different from a simple DeFiLlama query:**\n\n| Feature | DeFiLlama | investor_discover |\n|---------|-----------|-------------------|\n| Input | Chain + sort | Natural language (\"stablecoin, conservative\") |\n| Intent understanding | None | Keyword + LLM fusion with 95%+ accuracy |\n| Risk filtering | Manual | Automatic 7-dimension scoring + threshold |\n| Multi-round | N/A | Session-based intent accumulation |\n| Clarification | N/A | Asks focused questions when intent is ambiguous |\n| Smart money | N/A | Integrated whale flow signals |\n| DeFi security | N/A | AI contract scanner per pool |\n| Explanation | N/A | \"Why this?\" reasoning per recommendation |\n\n**Multi-round Session Example:**\n```\nRound 1:\n  User: \"Find me good yields\"\n  Agent: \"What's your risk tolerance? [Conservative] [Moderate] [Aggressive]\"\n  → Session stores partial intent\n\nRound 2:\n  User: \"Conservative, stablecoins only\"\n  Agent: (accumulates Round 1 + Round 2 intent)\n  → Returns conservative stablecoin recommendations on Ethereum\n```\n\n**Request:**\n```json\n{\n  \"agent_id\": \"uuid\",\n  \"natural_language\": \"stablecoin yield, conservative risk, Ethereum\",\n  \"structured_preferences\": {\n    \"chain\": \"ethereum\",\n    \"min_apy\": 5,\n    \"asset_type\": \"stablecoin\"\n  },\n  \"limit\": 5\n}\n```\n\n**Response highlights:**\n```json\n{\n  \"gate_status\": \"PASS\",\n  \"recommendations\": [{\n    \"name\": \"Aave V3 USDC\",\n    \"yield\": { \"apy\": 5.2, \"apy_base\": 2.8, \"apy_reward\": 2.4 },\n    \"scale\": { \"tvl_usd\": 1500000000 },\n    \"risk\": {\n      \"risk_level\": \"LOW\",\n      \"risk_score\": 82,\n      \"risk_factors\": { \"tvl_score\": 95, \"audit_score\": 90, ... },\n      \"warnings\": []\n    },\n    \"data_quality\": { \"score\": 95, \"level\": \"HIGH\", \"cross_validated\": true },\n    \"incentive\": { \"score\": \"medium\", \"reward_ratio\": 0.46 },\n    \"smart_money\": { \"flow\": \"inflow\", \"sentiment_score\": 0.72, \"confidence\": \"high\" },\n    \"explanation\": {\n      \"summary\": \"Aave V3 USDC: 5.2% APY, TVL $1.5B\",\n      \"reasons\": { \"for\": [...], \"against\": [...] },\n      \"compared_to\": { \"benchmark\": \"US bank savings (4.0%)\", \"outperformance\": \"1.3x\" },\n      \"risks\": { \"controllable\": [\"随时可赎回\"], \"uncontrollable\": [\"智能合约风险\"] }\n    }\n  }],\n  \"search_stats\": {\n    \"total_candidates\": 247,\n    \"total_after_risk_filter\": 89,\n    \"final_recommendations\": 5,\n    \"filters_applied\": [\"defillama_fetch:ethereum\", \"intent_filter:STABLECOIN\", \"risk_scoring\", \"dust_filter:50000\"]\n  }\n}\n```\n\n---\n\n### `investor_analyze` — Deep Analysis\n\nLLM-powered 5-step reasoning chain for a single product. Goes beyond numbers to provide *understanding*.\n\n**Analysis depths:**\n\n| Depth | What You Get | Use Case |\n|-------|-------------|----------|\n| `basic` | Key metrics + risk score + 1-paragraph summary | Quick check |\n| `detailed` | Full risk breakdown + yield source analysis + sustainability assessment + smart money + historical APY | **Recommended for investment decisions** |\n| `full` | Everything in detailed + peer comparison + protocol profile + governance analysis + LLM narrative | Due diligence |\n\n**The LLM analysis covers:**\n\n```\nStep 1: Yield Source Analysis\n  → Is this APY from trading fees (sustainable) or token emissions (unsustainable)?\n  → APY breakdown: base yield vs reward yield ratio\n\nStep 2: Sustainability Assessment\n  → Historical APY trend (7d / 30d / 90d)\n  → APY volatility (standard deviation)\n  → Revenue coverage (can the protocol afford these rewards?)\n\nStep 3: Risk Narrative\n  → Comprehensive risk story, not just a score\n  → Smart money sentiment overlay\n  → DeFi security scan results (scam flags, critical issues)\n\nStep 4: Competitive Position\n  → How does this compare to peers in the same category?\n  → Protocol profile: governance, longevity, audit history\n\nStep 5: Investor Considerations\n  → Actionable guidance for the specific investor profile\n  → Key risks and key positives\n  → \"If you're conservative, consider X. If aggressive, consider Y.\"\n```\n\n---\n\n### `investor_compare` — Side-by-Side Comparison\n\nCompare 2–5 products with LLM-powered interpretation across customizable dimensions.\n\n**Default comparison dimensions:** APY, risk score, TVL\n\n**Extended dimensions:** fees, lock period, audit count, IL risk, governance type, smart money sentiment, incentive sustainability\n\n**LLM comparison output:**\n```json\n{\n  \"llm_comparison\": {\n    \"narrative\": \"Aave offers superior security with $1.5B TVL and 6 audits, while Compound provides higher raw yield at 6.1% but with smaller TVL...\",\n    \"risk_comparison\": \"Aave's risk score (82) significantly outperforms Compound (68), primarily due to larger TVL and more comprehensive audit coverage\",\n    \"recommendation_with_reasoning\": {\n      \"for_conservative\": \"Choose Aave — battle-tested protocol, deep liquidity, multiple top-tier audits\",\n      \"for_aggressive\": \"Consider Compound — 0.9% higher APY, acceptable risk for short-term positions\",\n      \"key_tradeoff\": \"0.9% yield premium vs significantly lower risk score (82 vs 68)\"\n    }\n  }\n}\n```\n\n---\n\n## 🏗️ Server-Side Architecture\n\n```\n┌─────────────────────┐\n│    AI Agent          │         MCP JSON-RPC         ┌──────────────────────────────────────┐\n│    (OpenClaw)        │ ─────────────────────────────► │  Antalpha MCP Server                 │\n│                      │                                │  mcp-skills.ai.antalpha.com          │\n│  \"Find me yield\"     │                                │                                      │\n│  → 3 tool calls      │ ◄───────────────────────────── │  Intent Classifier (keyword + LLM)   │\n│  → zero API keys     │   structured results           │  Risk Scoring (7 dimensions)         │\n│  → zero custody      │                                │  DeFi Security Scanner               │\n└─────────────────────┘                                │  LLM Analysis (5-step chain)         │\n                                                       │  Smart Money (Dune Analytics)        │\n                                                       │  Market Context (bull/bear/sideways)  │\n                                                       │  Protocol Profiles (DefiLlama)       │\n                                                       │  Data Validation (cross-source)      │\n                                                       │  Explanation Engine (benchmarked)    │\n                                                       │                                      │\n                                                       │  Data Sources:                        │\n                                                       │  ├─ DefiLlama (2,500+ pools)         │\n                                                       │  ├─ Dune Analytics (smart money)     │\n                                                       │  ├─ CoinGecko (market data)          │\n                                                       │  ├─ DeFi Security (contract scan)    │\n                                                       │  └─ Internal LLM (analysis)          │\n                                                       └──────────────────────────────────────┘\n```\n\n---\n\n## 🔐 Risk Intelligence\n\n### 7-Dimension Risk Scoring\n\nEach opportunity is scored 0–100 across seven independent dimensions:\n\n| Dimension | What It Measures | Weight |\n|-----------|-----------------|--------|\n| **TVL Score** | Total Value Locked — protocol maturity indicator | High |\n| **Audit Score** | Number and quality of security audits | High |\n| **Chain Score** | Chain maturity (L1 vs L2 vs new chain) | Medium |\n| **Sustainability** | Yield source analysis (fees vs emissions) | High |\n| **Deposit Token** | Safety tier of the deposit asset (USDC > DAI > random) | Medium |\n| **Reward Token** | Liquidity and safety of reward tokens | Low |\n| **Protocol Trust** | Governance, longevity, track record | Medium |\n\n**Risk Levels:**\n- **LOW** (score ≥ 70): Battle-tested, well-audited, high TVL\n- **MEDIUM** (score 50–69): Established but with some risk factors\n- **HIGH** (score 30–49): Newer or with significant warnings\n- **VERY_HIGH** (score < 30): Experimental or flagged\n\n### DeFi Security Scanning\n\nEvery pool is scanned by an AI-powered contract security engine:\n\n```json\n{\n  \"defi_security\": {\n    \"aiScore\": 87,\n    \"safetyPercentage\": 92,\n    \"isScam\": false,\n    \"criticalIssues\": 0\n  }\n}\n```\n\n### Smart Money Sentiment\n\nReal-time whale and fund wallet activity aggregated from Dune Analytics:\n\n```json\n{\n  \"smart_money\": {\n    \"flow\": \"inflow\",\n    \"sentiment_score\": 0.72,\n    \"confidence\": \"high\",\n    \"buy_volume_usd\": 15000000,\n    \"sell_volume_usd\": 3200000,\n    \"net_flow_usd\": 11800000,\n    \"signal_count\": 23\n  }\n}\n```\n\n### Market Context Awareness\n\nThe engine is aware of the current market cycle (bull/bear/sideways), total DeFi TVL, BTC dominance, and US Treasury rates — providing context-aware recommendations that adjust for macro conditions.\n\n---\n\n## 🚀 Quick Start\n\n### Prerequisites\n\n- Python 3.8+\n- No API keys needed — all intelligence runs server-side\n\n### Registration (one-time)\n\n```bash\n./scripts/run.sh register\n# Returns agent_id — save this for all subsequent calls\n```\n\n### Usage\n\n```bash\n# Discover opportunities\n./scripts/run.sh discover --chain ethereum --min-apy 5 --limit 5\n\n# Discover with natural language\n./scripts/run.sh discover --natural-language \"stablecoin yield, conservative\"\n\n# Deep analysis\n./scripts/run.sh analyze --product-id <id> --depth detailed\n\n# Full due diligence\n./scripts/run.sh analyze --product-id <id> --depth full\n\n# Compare products\n./scripts/run.sh compare --ids <id1> <id2> <id3>\n```\n\n---\n\n## ⚠️ Critical Rules\n\n### Rule 1: Discovery First\n**Never give generic investment advice without real-time data.**\n```\n❌ \"I recommend Aave for stablecoin yield\"\n✅ investor_discover → analyze results → data-backed recommendation\n```\n\n### Rule 2: Explain Your Reasoning\nEvery recommendation should include the `explanation` object — summary, reasons for/against, benchmark comparison, risk classification.\n\n### Rule 3: Risk Is Non-Negotiable\n- APY data may be delayed — always show `data_quality.score` and `last_updated`\n- Never recommend VERY_HIGH risk products without explicit user acknowledgment\n- Investment decisions are the user's own responsibility — always DYOR\n\n### Rule 4: Honest About Limitations\n- If no good options exist for the user's criteria, say so with `generateHonestNoResultExplanation`\n- Show alternatives even if they don't perfectly match — \"This is close but has X tradeoff\"\n\n---\n\n## 🔒 Security\n\n| Layer | Protection |\n|-------|-----------|\n| **Private Keys** | Zero contact — never held, transmitted, or stored |\n| **Data Sources** | Triple-validated (DefiLlama + Dune + CoinGecko) with cross-source checks |\n| **Contract Safety** | AI-powered DeFi security scanner on every pool |\n| **Risk Scoring** | 7 independent dimensions, no single point of failure |\n| **Scam Detection** | Automated flagging via DeFi Security engine (`isScam` check) |\n| **Data Quality** | Freshness tracking, confidence scores, validation issue logging |\n\n---\n\n## 📝 Changelog\n\n### v3.8.0 (2026-04-14)\n- **Full SKILL.md rewrite** — English, feature-focused, comprehensive\n- Documented complete server-side intelligence pipeline\n- Added 7-dimension risk scoring documentation\n- Added DeFi Security scanning documentation\n- Added Smart Money sentiment documentation\n- Added Market Context awareness documentation\n- Added multi-round session intent accumulation flow\n- Added honest \"no result\" explanation behavior\n- Added incentive sustainability scoring documentation\n- Added data quality cross-validation documentation\n\n### v3.7.2 (2026-04-13)\n- Client cleanup: removed deprecated tools (feedback/confirm-intent/get-intent)\n\n---\n\n## 🤝 Contributing\n\nTest donations welcome:\n- **Network**: Base Chain\n- **Address**: `0x1F3A9A450428BbF161C4C33f10bd7AA1b2599a3e`\n\n---\n\n**Maintainer**: Web3 Investor Skill Team\n**Registry**: https://clawhub.com/skills/web3-investor\n**License**: MIT\n\nFile v3.8.1:README.md\n\n# Web3 Investor Skill\n\n> **English** | [中文](#chinese)\n\nAI-friendly DeFi investment intelligence skill. Discover, analyze, and compare yield opportunities across Ethereum, Base, Arbitrum, and Optimism — powered by Antalpha's remote MCP server. No API keys needed.\n\n---\n\n## Installation\n\n```bash\nopenclaw skill install https://github.com/AntalphaAI/web3-investor\n```\n\n### Install via ClawHub\n\n```bash\nclawhub install web3-investor\n```\n\n> Requires [OpenClaw](https://www.antalpha.com/) with Python 3.7+.  \n> No environment variables required — all data is fetched from the remote MCP server.\n\n---\n\n## Features\n\n### 1. Opportunity Discovery (`discover`)\nSearch for DeFi yield opportunities across chains with flexible filters:\n- Filter by chain: `ethereum`, `base`, `arbitrum`, `optimism`\n- Filter by minimum / maximum APY\n- Stablecoin-only mode\n- Natural language query support (e.g. \"I want safe yields on Base\")\n- Session-aware: remembers your preferences across calls\n\n### 2. Deep Analysis (`analyze`)\nGet a detailed breakdown of any single investment product:\n- Basic / detailed / full depth levels\n- Historical performance data\n- LLM-generated insights\n- Optional: skip history for faster response\n\n### 3. Multi-Product Comparison (`compare`)\nSide-by-side comparison of 2 or more products:\n- Unified metrics table\n- Comparative analysis\n- Final recommendation\n\n### 4. Intent Clarification Flow (`confirm-intent` / `get-intent`)\nWhen a query is ambiguous, the server returns a clarification request. The agent:\n1. Presents clarification options to the user\n2. Calls `confirm-intent` to lock in preferences (risk profile, capital nature, liquidity need)\n3. Re-runs discovery with the stored intent\n\n### 5. Feedback Loop (`feedback`)\nSubmit feedback on any recommendation:\n- Outcomes: `helpful`, `not_helpful`, `invested`, `dismissed`\n- Optional free-text reason\n- Feeds back into server-side recommendation quality\n\n---\n\n## Commands & Usage\n\n### discover\n```bash\npython3 scripts/mcp_client.py discover \\\n  --chain <ethereum|base|arbitrum|optimism> \\\n  --min-apy <number> \\\n  [--max-apy <number>] \\\n  [--stablecoin-only] \\\n  [--limit <1-10>] \\\n  [--session-id <id>] \\\n  [--natural-language \"<query>\"]\n```\n\n### analyze\n```bash\npython3 scripts/mcp_client.py analyze \\\n  --product-id <id> \\\n  [--depth basic|detailed|full] \\\n  [--no-history]\n```\n\n### compare\n```bash\npython3 scripts/mcp_client.py compare \\\n  --ids <id1> <id2> [<id3> ...]\n```\n\n### feedback\n```bash\npython3 scripts/mcp_client.py feedback \\\n  --product-id <id> \\\n  --feedback <helpful|not_helpful|invested|dismissed> \\\n  [--reason \"<text>\"]\n```\n\n### confirm-intent\n```bash\npython3 scripts/mcp_client.py confirm-intent \\\n  --session-id <id> \\\n  --type <intent_type> \\\n  --risk <conservative|moderate|aggressive> \\\n  [--capital-nature <nature>] \\\n  [--liquidity-need <need>]\n```\n\n### get-intent\n```bash\npython3 scripts/mcp_client.py get-intent \\\n  --session-id <id>\n```\n\n---\n\n## MCP Tools Reference\n\n| Tool | Purpose | Key Response Fields |\n|------|---------|---------------------|\n| `investor_discover` | Find yield opportunities | `recommendations[]`, `intent{}`, `search_stats` |\n| `investor_analyze` | Deep analysis of one product | `product{}`, `historical_data`, `llm_insights` |\n| `investor_compare` | Compare multiple products | `products[]`, `comparisons[]`, `recommendation` |\n| `investor_feedback` | Submit feedback | `acknowledged` |\n| `investor_confirm_intent` | Lock in user intent | `acknowledged`, `session_id` |\n| `investor_get_stored_intent` | Retrieve stored intent | `found`, `intent{}` |\n\n---\n\n## Example Sessions\n\n**Find and analyze:**\n```\nUser: Find ETH lending on Base with >5% APY\n→ discover --chain base --min-apy 5\n\nUser: Analyze the top result\n→ analyze --product-id aave-eth-base --depth detailed\n```\n\n**Compare two products:**\n```\n→ compare --ids aave-usdc-base compound-usdc-ethereum\n```\n\n**Intent clarification:**\n```\nUser: I want to invest in DeFi\n→ discover --natural-language \"I want to invest in DeFi\"\n  [Server returns NEEDS_CLARIFICATION]\n\nUser: Stablecoin, moderate risk, 1 month horizon\n→ confirm-intent --session-id <id> --type stablecoin --risk moderate\n→ discover --session-id <id>\n```\n\n---\n\n## Architecture\n\n```\nweb3-investor/\n├── scripts/\n│   └── mcp_client.py     # Thin MCP client wrapper\n├── config/\n│   └── config.json       # MCP server endpoint config\n└── SKILL.md              # Agent skill definition\n```\n\n- All business logic runs on the remote MCP server: `https://mcp-skills.ai.antalpha.com/mcp`\n- The local client handles only: MCP session handshake, request routing, SSE response parsing\n- No local API keys, no local data storage\n\n## Security\n\n- All API keys managed server-side\n- No sensitive data stored locally\n- MCP session protocol: `initialize` → `notifications/initialized` → `tools/call` (with `Mcp-Session-Id` header)\n\n---\n\n## Changelog\n\n### v2.0.3 — 2026-04-08\n- Add `homepage` metadata for provenance and ClawHub trust signals\n- No functional changes\n\n### v2.0.2 — 2026-04-08 ⭐ *Recommended baseline*\n- **Fix critical connection bug**: \"No valid session ID provided\" error resolved\n- Add `MCPClient` class with proper session management\n- Implement full MCP 2024-11-05 handshake: `initialize` → `notifications/initialized`\n- Parse `mcp-session-id` from response headers and reuse across calls\n- Add SSE (`text/event-stream`) response parsing\n- Type hints, improved docstrings, singleton pattern\n- Timeouts: initialize 60s, tools 120s\n\n### v2.0.1 — 2026-04-08\n- **Security fix**: Remove all `localhost:3000` signer API references\n- Remove `DUNE_API_KEY` environment variable dependency\n- Strip all trading/execution code and legacy local modules\n- Simplify config to MCP endpoint only\n- Confirm `env: []` — no local API keys required\n\n### v2.0.0 — 2026-04-08 ⚠️ *Breaking change*\n- Full architecture rewrite: local discovery/trading modules → thin MCP client wrapper\n- New commands: `discover`, `analyze`, `compare`, `feedback`, `confirm-intent`, `get-intent`\n- Natural language query support\n- Intent clarification flow\n- Remove all local API key dependencies\n\n### v0.5.x — 2026-03-29 to 2026-03-30\n- Legacy versions with local service architecture (deprecated)\n- Various metadata format fixes for ClawHub compatibility\n\n---\n\n## License\n\nMIT — [Antalpha AI Team](https://www.antalpha.com/)\n\n---\n\n---\n\n<a name=\"chinese\"></a>\n\n# Web3 Investor Skill（中文文档）\n\nAI 驱动的 DeFi 收益发现与分析技能。支持在 Ethereum、Base、Arbitrum、Optimism 四条链上发现、分析和对比投资机会，所有数据通过 Antalpha 远端 MCP 服务器获取，**无需本地 API Key**。\n\n---\n\n## 安装\n\n```bash\nopenclaw skill install https://github.com/AntalphaAI/web3-investor\n```\n\n### 通过 ClawHub 安装\n\n```bash\nclawhub install web3-investor\n```\n\n> 依赖 [OpenClaw](https://www.antalpha.com/)，Python 3.7+。  \n> 无需配置任何环境变量。\n\n---\n\n## 功能介绍\n\n### 1. 机会发现（`discover`）\n在多条链上搜索 DeFi 收益机会，支持灵活过滤：\n- 按链筛选：`ethereum`、`base`、`arbitrum`、`optimism`\n- 按最低 / 最高 APY 筛选\n- 仅限稳定币模式\n- 自然语言查询（如\"帮我找 Base 上安全稳健的收益\"）\n- 会话感知：跨调用记忆你的偏好\n\n### 2. 深度分析（`analyze`）\n对单一投资产品进行详细解析：\n- 支持 basic / detailed / full 三个分析深度\n- 历史表现数据\n- LLM 生成的投资洞察\n- 可跳过历史数据以加速响应\n\n### 3. 多产品对比（`compare`）\n同时对比 2 个及以上投资产品：\n- 统一指标横向对比\n- 综合分析报告\n- 最终推荐建议\n\n### 4. 意图澄清流程（`confirm-intent` / `get-intent`）\n当查询语义不明时，服务端返回澄清问题，Agent 会：\n1. 向用户展示选项\n2. 调用 `confirm-intent` 锁定偏好（风险等级、资金属性、流动性需求）\n3. 携带已存储意图重新执行发现\n\n### 5. 反馈回路（`feedback`）\n对任何推荐结果提交反馈：\n- 结果类型：`helpful`（有帮助）、`not_helpful`（无帮助）、`invested`（已投资）、`dismissed`（忽略）\n- 可附加文字原因\n- 反馈数据用于服务端推荐质量优化\n\n---\n\n## 命令与用法\n\n### discover — 发现机会\n```bash\npython3 scripts/mcp_client.py discover \\\n  --chain <ethereum|base|arbitrum|optimism> \\\n  --min-apy <数字> \\\n  [--max-apy <数字>] \\\n  [--stablecoin-only] \\\n  [--limit <1-10>] \\\n  [--session-id <id>] \\\n  [--natural-language \"<查询语句>\"]\n```\n\n### analyze — 深度分析\n```bash\npython3 scripts/mcp_client.py analyze \\\n  --product-id <产品ID> \\\n  [--depth basic|detailed|full] \\\n  [--no-history]\n```\n\n### compare — 多产品对比\n```bash\npython3 scripts/mcp_client.py compare \\\n  --ids <id1> <id2> [<id3> ...]\n```\n\n### feedback — 提交反馈\n```bash\npython3 scripts/mcp_client.py feedback \\\n  --product-id <产品ID> \\\n  --feedback <helpful|not_helpful|invested|dismissed> \\\n  [--reason \"<原因文字>\"]\n```\n\n### confirm-intent — 确认用户意图\n```bash\npython3 scripts/mcp_client.py confirm-intent \\\n  --session-id <id> \\\n  --type <意图类型> \\\n  --risk <conservative|moderate|aggressive> \\\n  [--capital-nature <属性>] \\\n  [--liquidity-need <需求>]\n```\n\n### get-intent — 获取已存储意图\n```bash\npython3 scripts/mcp_client.py get-intent \\\n  --session-id <id>\n```\n\n---\n\n## MCP 工具一览\n\n| 工具 | 用途 | 关键返回字段 |\n|------|------|-------------|\n| `investor_discover` | 发现收益机会 | `recommendations[]`, `intent{}`, `search_stats` |\n| `investor_analyze` | 单产品深度分析 | `product{}`, `historical_data`, `llm_insights` |\n| `investor_compare` | 多产品横向对比 | `products[]`, `comparisons[]`, `recommendation` |\n| `investor_feedback` | 提交反馈 | `acknowledged` |\n| `investor_confirm_intent` | 锁定用户意图 | `acknowledged`, `session_id` |\n| `investor_get_stored_intent` | 获取已存储意图 | `found`, `intent{}` |\n\n---\n\n## 使用示例\n\n**发现并分析：**\n```\n用户：帮我找 Base 上 APY > 5% 的 ETH 借贷\n→ discover --chain base --min-apy 5\n\n用户：分析排名第一的产品\n→ analyze --product-id aave-eth-base --depth detailed\n```\n\n**对比两个产品：**\n```\n→ compare --ids aave-usdc-base compound-usdc-ethereum\n```\n\n**意图澄清流程：**\n```\n用户：我想投资 DeFi\n→ discover --natural-language \"我想投资 DeFi\"\n  [服务端返回 NEEDS_CLARIFICATION]\n\n用户：稳定币，中等风险，1个月期限\n→ confirm-intent --session-id <id> --type stablecoin --risk moderate\n→ discover --session-id <id>\n```\n\n---\n\n## 架构说明\n\n```\nweb3-investor/\n├── scripts/\n│   └── mcp_client.py     # 轻量 MCP 客户端封装\n├── config/\n│   └── config.json       # MCP 服务端地址配置\n└── SKILL.md              # Agent 技能定义文件\n```\n\n- 所有业务逻辑运行在远端 MCP 服务器：`https://mcp-skills.ai.antalpha.com/mcp`\n- 本地客户端仅负责：MCP 会话握手、请求路由、SSE 响应解析\n- 无本地 API Key，无本地数据存储\n\n## 安全说明\n\n- 所有 API Key 由服务端统一管理\n- 本地不存储任何敏感数据\n- MCP 会话协议：`initialize` → `notifications/initialized` → `tools/call`（携带 `Mcp-Session-Id` header）\n\n---\n\n## 版本更新说明\n\n### v2.0.3 — 2026-04-08\n- 添加 `homepage` 元数据，改善 ClawHub 信任评分\n- 无功能性变更\n\n### v2.0.2 — 2026-04-08 ⭐ *推荐基准版本*\n- **修复关键连接 Bug**：彻底解决 \"No valid session ID provided\" 错误\n- 新增 `MCPClient` 类，实现完整会话管理\n- 实现标准 MCP 2024-11-05 握手流程：`initialize` → `notifications/initialized`\n- 从响应头提取并复用 `mcp-session-id`\n- 新增 SSE（`text/event-stream`）响应解析\n- 完善类型注解、文档字符串，采用单例模式\n- 超时配置：初始化 60s，工具调用 120s\n\n### v2.0.1 — 2026-04-08\n- **安全修复**：移除所有 `localhost:3000` 签名 API 引用\n- 移除 `DUNE_API_KEY` 环境变量依赖\n- 删除所有交易执行代码和历史遗留本地模块\n- 简化 config 仅保留 MCP 端点配置\n- 确认 `env: []`，无需任何本地 API Key\n\n### v2.0.0 — 2026-04-08 ⚠️ *破坏性变更*\n- 架构全量重写：本地发现/交易模块 → 轻量 MCP 客户端封装\n- 新增 6 条命令：`discover`、`analyze`、`compare`、`feedback`、`confirm-intent`、`get-intent`\n- 支持自然语言查询\n- 支持意图澄清流程\n- 移除所有本地 API Key 依赖\n\n### v0.5.x — 2026-03-29 至 2026-03-30\n- 旧版本，采用本地服务架构（已废弃）\n- 多次修复 ClawHub 元数据格式兼容性问题\n\n---\n\n## 开源协议\n\nMIT — [Antalpha AI 团队](https://www.antalpha.com/)\n\nFile v3.8.1:_meta.json\n\n{\n  \"ownerId\": \"kn7fy7jd9vd0x7wvpxgfxye1pn827f50\",\n  \"slug\": \"web3-investor\",\n  \"version\": \"3.8.1\",\n  \"publishedAt\": 1776169879783\n}\n\nFile v3.8.1:references/mcp-servers.md\n\n# MCP Servers for Web3 Data\n\nThis document lists MCP (Model Context Protocol) servers that provide Web3 data.\n\n## What is MCP?\n\nModel Context Protocol is a standardized way for AI models to access external data sources. MCP servers act as bridges between AI agents and blockchain data.\n\n## Recommended MCP Servers\n\n### 1. Ethereum MCP\n- **Repository**: https://github.com/your-org/ethereum-mcp\n- **Capabilities**: Balance queries, transaction simulation, contract reads\n- **Setup**: `npx ethereum-mcp --rpc-url YOUR_RPC_URL`\n- **Free**: Yes (uses your RPC)\n\n### 2. Etherscan MCP\n- **Repository**: https://github.com/your-org/etherscan-mcp\n- **Capabilities**: Transaction history, contract verification, token info\n- **Setup**: `ETHERSCAN_API_KEY=xxx npx etherscan-mcp`\n- **Free**: Yes (free tier available)\n\n### 3. DefiLlama MCP\n- **Repository**: https://github.com/your-org/defillama-mcp\n- **Capabilities**: TVL data, yield rankings, protocol info\n- **Setup**: `npx defillama-mcp`\n- **Free**: Yes (no API key required)\n\n### 4. Dune Analytics MCP\n- **Repository**: https://github.com/your-org/dune-mcp\n- **Capabilities**: Custom SQL queries on blockchain data\n- **Setup**: `DUNE_API_KEY=xxx npx dune-mcp`\n- **Free**: Free tier available (limited queries)\n\n## Integration Pattern\n\n```python\n# Check MCP availability first, fall back to direct API\nasync def get_tvl(protocol: str) -> float:\n    if mcp_available(\"defillama\"):\n        return await mcp_query(\"defillama\", \"get_tvl\", protocol)\n    else:\n        return await defillama_api_get_tvl(protocol)\n```\n\n## Adding New MCP Servers\n\nWhen adding new MCP servers:\n1. Verify the server supports standard MCP protocol\n2. Test with `mcp-inspector` tool\n3. Document required environment variables\n4. Add fallback logic for when MCP is unavailable\n\nFile v3.8.1:references/protocols.md\n\n# Known Protocol Registry\n\nThis document contains metadata for common DeFi protocols on Ethereum mainnet.\n\n## Lending Protocols\n\n### Aave V3\n- **Contract**: 0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2\n- **Category**: Lending\n- **Risk Level**: Low\n- **Audit**: Multiple (OpenZeppelin, Trail of Bits)\n- **TVL**: > $5B (check DefiLlama for current)\n- **Docs**: https://docs.aave.com/\n\n### Compound V3\n- **Contract**: 0xc3d688B66703497DAA19211EEdff47f25384cdc3\n- **Category**: Lending\n- **Risk Level**: Low\n- **Audit**: Multiple (OpenZeppelin)\n- **TVL**: > $2B\n- **Docs**: https://docs.compound.finance/\n\n### MakerDAO (Spark)\n- **Contract**: Various (see docs)\n- **Category**: Lending\n- **Risk Level**: Low\n- **Audit**: Multiple\n- **TVL**: > $8B\n- **Docs**: https://docs.makerdao.com/\n\n## Liquid Staking\n\n### Lido (stETH)\n- **Contract**: 0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84\n- **Category**: Liquid Staking\n- **Risk Level**: Low\n- **Audit**: Multiple (Quantstamp, MixBytes)\n- **TVL**: > $15B\n- **Docs**: https://docs.lido.fi/\n\n### Rocket Pool (rETH)\n- **Contract**: 0xae78736Cd615f374D3085123A210448E74Fc6393\n- **Category**: Liquid Staking\n- **Risk Level**: Low\n- **Audit**: Multiple (Sigma Prime)\n- **TVL**: > $2B\n- **Docs**: https://docs.rocketpool.net/\n\n## DEXs\n\n### Uniswap V3\n- **Factory**: 0x1F98431c8aD98523631AE4a59f267346ea31F984\n- **Category**: DEX\n- **Risk Level**: Low\n- **Audit**: Multiple\n- **TVL**: > $4B\n- **Docs**: https://docs.uniswap.org/\n\n### Curve Finance\n- **Contract**: 0xD533a949740bb3306d119CC777fa900bA034cd52\n- **Category**: DEX (Stablecoins)\n- **Risk Level**: Low\n- **Audit**: Multiple\n- **TVL**: > $2B\n- **Docs**: https://docs.curve.fi/\n\n## Yield Aggregators\n\n### Yearn V3\n- **Registry**: 0x3c91D8ba3C8cB06D9CFe5b8F31c68a746f0f15B6\n- **Category**: Yield Aggregator\n- **Risk Level**: Medium\n- **Audit**: Multiple\n- **TVL**: Variable\n- **Docs**: https://docs.yearn.fi/\n\n## Protocol Metadata Schema\n\n```json\n{\n  \"name\": \"Protocol Name\",\n  \"address\": \"0x...\",\n  \"chain\": \"ethereum\",\n  \"category\": \"lending|dex|staking|aggregator\",\n  \"risk_level\": \"low|medium|high\",\n  \"audit_status\": \"multiple|single|community|none\",\n  \"tvl\": 1000000000,\n  \"maturity_days\": 730,\n  \"has_timelock\": true,\n  \"governance\": \"dao|multisig|admin\",\n  \"docs_url\": \"https://...\",\n  \"icon_url\": \"https://...\"\n}\n```\n\n## Adding New Protocols\n\nTo add a new protocol, create a JSON file in `config/protocols/`:\n\n```json\n{\n  \"name\": \"New Protocol\",\n  \"address\": \"0x...\",\n  \"chain\": \"ethereum\",\n  \"category\": \"lending\",\n  \"risk_level\": \"medium\",\n  \"audit_status\": \"single\",\n  \"docs_url\": \"https://...\"\n}\n```\n\nThen run:\n```bash\npython scripts/discovery/analyze_protocol.py --add-config config/protocols/new-protocol.json\n```\n\nFile v3.8.1:references/risk-framework.md\n\n# Risk Assessment Framework\n\n## Risk Levels\n\n| Level | Score | Description | Typical Characteristics |\n|-------|-------|-------------|------------------------|\n| **Low** | 0-3 | Blue-chip, battle-tested | TVL > $1B, Audited, 2+ years live |\n| **Medium** | 4-6 | Established but some risk | TVL $100M-$1B, Audited, 1+ year live |\n| **High** | 7-10 | Experimental or new | TVL < $100M, No audit, < 1 year live |\n\n## Risk Factors\n\n### 1. Protocol Maturity (0-3 points)\n\n| Criteria | Points |\n|----------|--------|\n| Live > 2 years with no major exploits | 0 |\n| Live 1-2 years | 1 |\n| Live < 1 year | 2 |\n| Live < 3 months | 3 |\n\n### 2. Audit Status (0-3 points)\n\n| Criteria | Points |\n|----------|--------|\n| Multiple audits from top firms (OpenZeppelin, Trail of Bits, etc.) | 0 |\n| Single audit from reputable firm | 1 |\n| Community audit only | 2 |\n| No audit | 3 |\n\n### 3. TVL Size (0-2 points)\n\n| TVL | Points |\n|-----|--------|\n| > $1 billion | 0 |\n| $100M - $1B | 1 |\n| < $100M | 2 |\n\n### 4. Decentralization (0-2 points)\n\n| Criteria | Points |\n|----------|--------|\n| DAO governance, no admin keys or timelocked | 0 |\n| Timelocked admin keys (> 48h) | 1 |\n| Admin keys, no timelock | 2 |\n\n## Risk Calculation\n\n```\nRisk Score = Protocol Maturity + Audit Status + TVL Size + Decentralization\n```\n\n### Examples\n\n| Protocol | Maturity | Audit | TVL | Decentralization | Total | Level |\n|----------|----------|-------|-----|------------------|-------|-------|\n| Aave V3 | 0 | 0 | 0 | 1 | 1 | Low |\n| Compound | 0 | 0 | 0 | 0 | 0 | Low |\n| New Lending Protocol | 3 | 3 | 2 | 2 | 10 | High |\n\n## Risk-Adjusted APY\n\nWhen comparing opportunities, consider risk-adjusted returns:\n\n```\nRisk-Adjusted APY = Nominal APY × (1 - Risk Score / 20)\n```\n\n### Example\n\n| Protocol | APY | Risk Score | Risk-Adjusted APY |\n|----------|-----|------------|-------------------|\n| Aave USDC | 5% | 1 | 4.75% |\n| New Protocol | 20% | 8 | 12% |\n\n## Special Risk Flags\n\nAdditional risk factors that should be noted but not scored:\n\n- ⚠️ **Fork Risk**: Protocol is a fork of another protocol with issues\n- ⚠️ **Oracle Risk**: Uses custom oracle instead of Chainlink\n- ⚠️ **Leverage Risk**: Involves leverage or looping\n- ⚠️ **Illicit Risk**: Protocol in sanctioned jurisdiction\n- ⚠️ **Regulatory Risk**: Under regulatory scrutiny\n\n## Usage in Discovery\n\nWhen running `find_opportunities.py`:\n\n```bash\n# Only show low-risk opportunities\npython scripts/discovery/find_opportunities.py --max-risk low\n\n# Filter by minimum TVL (in USD)\npython scripts/discovery/find_opportunities.py --min-tvl 1000000\n\n# Require audit\npython scripts/discovery/find_opportunities.py --require-audit\n```\n\nFile v3.8.1:config/config.json\n\n{\n  \"_comment\": \"Web3 Investor Skill Configuration - v2.0.0 (MCP Client Only)\",\n  \"mcp\": {\n    \"endpoint\": \"https://mcp-skills.ai.antalpha.com/mcp\",\n    \"timeout_seconds\": 30\n  }\n}\n\nFile v3.8.1:config/protocols.json\n\n{\n  \"version\": \"0.2.0\",\n  \"updated\": \"2026-03-04\",\n  \"description\": \"Static protocol registry for Web3 Investor Skill\",\n  \"protocols\": {\n    \"aave-v3\": {\n      \"name\": \"Aave V3\",\n      \"primary_contract\": \"0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2\",\n      \"chain\": \"ethereum\",\n      \"category\": \"lending\",\n      \"registry_risk\": \"low\",\n      \"docs_url\": \"https://docs.aave.com/\",\n      \"actions\": {\n        \"deposit\": {\n          \"method\": \"supply\",\n          \"signature\": \"supply(address,uint256,address,uint16)\"\n        },\n        \"withdraw\": {\n          \"method\": \"withdraw\",\n          \"signature\": \"withdraw(address,uint256,address)\"\n        }\n      }\n    },\n    \"aave\": {\n      \"name\": \"Aave\",\n      \"primary_contract\": \"0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2\",\n      \"chain\": \"ethereum\",\n      \"category\": \"lending\",\n      \"registry_risk\": \"low\",\n      \"docs_url\": \"https://docs.aave.com/\"\n    },\n    \"compound-v3\": {\n      \"name\": \"Compound V3\",\n      \"primary_contract\": \"0xc3d688B66703497DAA19211EEdff47f25384cdc3\",\n      \"chain\": \"ethereum\",\n      \"category\": \"lending\",\n      \"registry_risk\": \"low\",\n      \"docs_url\": \"https://docs.compound.finance/\",\n      \"actions\": {\n        \"deposit\": {\n          \"method\": \"supply\",\n          \"signature\": \"supply(address,uint256)\"\n        },\n        \"withdraw\": {\n          \"method\": \"withdraw\",\n          \"signature\": \"withdraw(uint256)\"\n        }\n      }\n    },\n    \"compound\": {\n      \"name\": \"Compound\",\n      \"primary_contract\": \"0xc3d688B66703497DAA19211EEdff47f25384cdc3\",\n      \"chain\": \"ethereum\",\n      \"category\": \"lending\",\n      \"registry_risk\": \"low\",\n      \"docs_url\": \"https://docs.compound.finance/\"\n    },\n    \"lido\": {\n      \"name\": \"Lido\",\n      \"primary_contract\": \"0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84\",\n      \"chain\": \"ethereum\",\n      \"category\": \"liquid_staking\",\n      \"registry_risk\": \"low\",\n      \"docs_url\": \"https://docs.lido.fi/\",\n      \"output_token\": {\n        \"symbol\": \"stETH\",\n        \"address\": \"0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84\"\n      }\n    },\n    \"rocket-pool\": {\n      \"name\": \"Rocket Pool\",\n      \"primary_contract\": \"0xae78736Cd615f374D3085123A210448E74Fc6393\",\n      \"chain\": \"ethereum\",\n      \"category\": \"liquid_staking\",\n      \"registry_risk\": \"low\",\n      \"docs_url\": \"https://docs.rocketpool.net/\",\n      \"output_token\": {\n        \"symbol\": \"rETH\",\n        \"address\": \"0xae78736Cd615f374D3085123A210448E74Fc6393\"\n      }\n    },\n    \"uniswap-v3\": {\n      \"name\": \"Uniswap V3\",\n      \"factory\": \"0x1F98431c8aD98523631AE4a59f267346ea31F984\",\n      \"chain\": \"ethereum\",\n      \"category\": \"dex\",\n      \"registry_risk\": \"low\",\n      \"docs_url\": \"https://docs.uniswap.org/\"\n    },\n    \"uniswap-v4\": {\n      \"name\": \"Uniswap V4\",\n      \"chain\": \"ethereum\",\n      \"category\": \"dex\",\n      \"registry_risk\": \"medium\",\n      \"docs_url\": \"https://docs.uniswap.org/\",\n      \"notes\": \"New version, may have undiscovered issues\"\n    },\n    \"curve\": {\n      \"name\": \"Curve Finance\",\n      \"primary_contract\": \"0xD533a949740bb3306d119CC777fa900bA034cd52\",\n      \"chain\": \"ethereum\",\n      \"category\": \"dex\",\n      \"registry_risk\": \"low\",\n      \"docs_url\": \"https://docs.curve.fi/\"\n    },\n    \"yearn\": {\n      \"name\": \"Yearn V3\",\n      \"registry\": \"0x3c91D8ba3C8cB06D9CFe5b8F31c68a746f0f15B6\",\n      \"chain\": \"ethereum\",\n      \"category\": \"yield_aggregator\",\n      \"registry_risk\": \"medium\",\n      \"docs_url\": \"https://docs.yearn.fi/\"\n    },\n    \"makerdao\": {\n      \"name\": \"MakerDAO\",\n      \"chain\": \"ethereum\",\n      \"category\": \"lending\",\n      \"registry_risk\": \"low\",\n      \"docs_url\": \"https://docs.makerdao.com/\"\n    },\n    \"convex\": {\n      \"name\": \"Convex\",\n      \"chain\": \"ethereum\",\n      \"category\": \"yield_aggregator\",\n      \"registry_risk\": \"medium\",\n      \"docs_url\": \"https://docs.convexfinance.com/\"\n    }\n  },\n  \"risk_categories\": {\n    \"lending\": \"Borrow/lend protocols - generally lower risk if established\",\n    \"dex\": \"Decentralized exchanges - medium risk due to impermanent loss\",\n    \"liquid_staking\": \"Liquid staking derivatives - low risk for established protocols\",\n    \"yield_aggregator\": \"Yield optimizers - higher complexity, medium risk\"\n  }\n}\n\nFile v3.8.1:config/schema.json\n\n{\n  \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n  \"title\": \"Web3 Investor Skill Configuration\",\n  \"version\": \"2.0.0\",\n  \"description\": \"Configuration schema for Web3 Investor Skill (MCP Client Only). No local services or API keys required.\",\n  \"type\": \"object\",\n  \"properties\": {\n    \"_comment\": {\n      \"type\": \"string\",\n      \"description\": \"Optional comment field for documentation purposes\"\n    },\n    \"mcp\": {\n      \"type\": \"object\",\n      \"description\": \"MCP server configuration\",\n      \"properties\": {\n        \"endpoint\": {\n          \"type\": \"string\",\n          \"format\": \"uri\",\n          \"default\": \"https://mcp-skills.ai.antalpha.com/mcp\",\n          \"description\": \"MCP server endpoint URL\"\n        },\n        \"timeout_seconds\": {\n          \"type\": \"integer\",\n          \"default\": 30,\n          \"minimum\": 5,\n          \"maximum\": 120,\n          \"description\": \"Request timeout for MCP calls\"\n        }\n      }\n    }\n  }\n}\n\nArchive v3.8.0: 11 files, 22960 bytes\n\nFiles: config/config.json (181b), config/protocols.json (4175b), config/schema.json (942b), README.md (12840b), references/mcp-servers.md (1791b), references/protocols.md (2715b), references/risk-framework.md (2677b), scripts/mcp_client.py (16662b), scripts/run.sh (503b), SKILL.md (16386b), _meta.json (132b)\n\nFile v3.8.0:SKILL.md\n\n---\nname: web3-investor\nversion: 3.8.0\ndescription: AI-native DeFi investment intelligence. Discover, analyze, and compare yield opportunities across 2,500+ protocols with intent-aware search, LLM-powered deep analysis, 7-dimension risk scoring, DeFi security scanning, smart money sentiment, and multi-round conversational refinement. All intelligence runs server-side — zero API keys on the client.\nauthor: Antalpha AI Team\nhomepage: https://www.antalpha.com/\nmetadata:\n  openclaw:\n    requires:\n      bins: [\"python3\"]\n    mcp:\n      antalpha-skills:\n        url: https://mcp-skills.ai.antalpha.com/mcp\n        tools:\n          - antalpha-register\n          - investor_discover\n          - investor_analyze\n          - investor_compare\n    persistence:\n      path: ~/.web3-investor/\n      files:\n        - investments.json: Local investment records\n    security_notes:\n      - WEB3_INVESTOR_API_URL defaults to localhost — only set to endpoints you trust\n      - Transaction requests will be sent to the configured signer endpoint\n      - All trading is zero-custody — private keys never leave the user's wallet\n---\n\n# Web3 Investor\n\n> **Your AI-powered DeFi research analyst.** Not a dashboard — a thinker.\n\nWeb3 Investor turns vague investment intent into structured, risk-aware recommendations. It doesn't just fetch APY data — it *understands* what you're looking for, scores every opportunity across 7 risk dimensions, cross-references smart money flows, scans for contract vulnerabilities, and explains its reasoning in plain English.\n\n---\n\n## The Problem It Solves\n\nDeFi yield farming today looks like this:\n\n1. Open DeFiLlama → see 2,500+ pools → overwhelming\n2. Check audits, TVL, APY trend, IL risk — each on a different site\n3. Cross-reference with Twitter sentiment and whale wallets\n4. Try to figure out if the yield is sustainable or just emission bait\n5. **Give up and put money in USDC savings at 4%**\n\nWeb3 Investor collapses this into **one natural-language request**:\n\n```\n\"I want stablecoin yield, conservative risk, on Ethereum\"\n→ 5 personalized recommendations with full risk analysis in 3 seconds\n```\n\n---\n\n## 🧠 How It Works\n\n### The Intelligence Pipeline\n\n```\nUser Intent (natural language)\n  │\n  ├─ 1. Intent Classification (keyword + LLM fusion)\n  │    Extract: asset type, risk level, chain, time horizon,\n  │            position size, liquidity needs, implicit constraints\n  │\n  ├─ 2. Intent Gate (NEEDS_CLARIFICATION or PASS)\n  │    If ambiguous → ask user a focused question\n  │    If clear → proceed with accumulated context (multi-round session)\n  │\n  ├─ 3. Discovery Engine (DeFiLlama + Dune Analytics + CoinGecko)\n  │    Fetch 200+ candidates → filter by chain, TVL, risk threshold\n  │    → deduplicate → rank by risk-adjusted score\n  │\n  ├─ 4. Risk Scoring (7 dimensions, 0-100)\n  │    TVL, audit status, chain maturity, yield sustainability,\n  │    deposit token safety, reward token safety, protocol trust\n  │    → composite risk level: LOW / MEDIUM / HIGH / VERY_HIGH\n  │\n  ├─ 5. DeFi Security Scan\n  │    AI-powered contract scanner → scam detection → critical issue flag\n  │\n  ├─ 6. Smart Money Sentiment (Dune Analytics)\n  │    Track whale/fund flows → inflow/outflow signal\n  │\n  ├─ 7. Recommendation Explanation\n  │    \"Why this product?\" — benchmarked vs bank deposits,\n  │    risk classification (controllable vs uncontrollable),\n  │    honest alternatives if a better option exists\n  │\n  └─ Output: Ranked recommendations with full context\n```\n\n---\n\n## 🛠 Three Tools. Deep Intelligence.\n\n### `investor_discover` — Find Opportunities\n\nThe entry point. Converts natural language into structured intent, discovers opportunities, and returns ranked recommendations.\n\n**What makes it different from a simple DeFiLlama query:**\n\n| Feature | DeFiLlama | investor_discover |\n|---------|-----------|-------------------|\n| Input | Chain + sort | Natural language (\"stablecoin, conservative\") |\n| Intent understanding | None | Keyword + LLM fusion with 95%+ accuracy |\n| Risk filtering | Manual | Automatic 7-dimension scoring + threshold |\n| Multi-round | N/A | Session-based intent accumulation |\n| Clarification | N/A | Asks focused questions when intent is ambiguous |\n| Smart money | N/A | Integrated whale flow signals |\n| DeFi security | N/A | AI contract scanner per pool |\n| Explanation | N/A | \"Why this?\" reasoning per recommendation |\n\n**Multi-round Session Example:**\n```\nRound 1:\n  User: \"Find me good yields\"\n  Agent: \"What's your risk tolerance? [Conservative] [Moderate] [Aggressive]\"\n  → Session stores partial intent\n\nRound 2:\n  User: \"Conservative, stablecoins only\"\n  Agent: (accumulates Round 1 + Round 2 intent)\n  → Returns conservative stablecoin recommendations on Ethereum\n```\n\n**Request:**\n```json\n{\n  \"agent_id\": \"uuid\",\n  \"natural_language\": \"stablecoin yield, conservative risk, Ethereum\",\n  \"structured_preferences\": {\n    \"chain\": \"ethereum\",\n    \"min_apy\": 5,\n    \"asset_type\": \"stablecoin\"\n  },\n  \"limit\": 5\n}\n```\n\n**Response highlights:**\n```json\n{\n  \"gate_status\": \"PASS\",\n  \"recommendations\": [{\n    \"name\": \"Aave V3 USDC\",\n    \"yield\": { \"apy\": 5.2, \"apy_base\": 2.8, \"apy_reward\": 2.4 },\n    \"scale\": { \"tvl_usd\": 1500000000 },\n    \"risk\": {\n      \"risk_level\": \"LOW\",\n      \"risk_score\": 82,\n      \"risk_factors\": { \"tvl_score\": 95, \"audit_score\": 90, ... },\n      \"warnings\": []\n    },\n    \"data_quality\": { \"score\": 95, \"level\": \"HIGH\", \"cross_validated\": true },\n    \"incentive\": { \"score\": \"medium\", \"reward_ratio\": 0.46 },\n    \"smart_money\": { \"flow\": \"inflow\", \"sentiment_score\": 0.72, \"confidence\": \"high\" },\n    \"explanation\": {\n      \"summary\": \"Aave V3 USDC: 5.2% APY, TVL $1.5B\",\n      \"reasons\": { \"for\": [...], \"against\": [...] },\n      \"compared_to\": { \"benchmark\": \"US bank savings (4.0%)\", \"outperformance\": \"1.3x\" },\n      \"risks\": { \"controllable\": [\"随时可赎回\"], \"uncontrollable\": [\"智能合约风险\"] }\n    }\n  }],\n  \"search_stats\": {\n    \"total_candidates\": 247,\n    \"total_after_risk_filter\": 89,\n    \"final_recommendations\": 5,\n    \"filters_applied\": [\"defillama_fetch:ethereum\", \"intent_filter:STABLECOIN\", \"risk_scoring\", \"dust_filter:50000\"]\n  }\n}\n```\n\n---\n\n### `investor_analyze` — Deep Analysis\n\nLLM-powered 5-step reasoning chain for a single product. Goes beyond numbers to provide *understanding*.\n\n**Analysis depths:**\n\n| Depth | What You Get | Use Case |\n|-------|-------------|----------|\n| `basic` | Key metrics + risk score + 1-paragraph summary | Quick check |\n| `detailed` | Full risk breakdown + yield source analysis + sustainability assessment + smart money + historical APY | **Recommended for investment decisions** |\n| `full` | Everything in detailed + peer comparison + protocol profile + governance analysis + LLM narrative | Due diligence |\n\n**The LLM analysis covers:**\n\n```\nStep 1: Yield Source Analysis\n  → Is this APY from trading fees (sustainable) or token emissions (unsustainable)?\n  → APY breakdown: base yield vs reward yield ratio\n\nStep 2: Sustainability Assessment\n  → Historical APY trend (7d / 30d / 90d)\n  → APY volatility (standard deviation)\n  → Revenue coverage (can the protocol afford these rewards?)\n\nStep 3: Risk Narrative\n  → Comprehensive risk story, not just a score\n  → Smart money sentiment overlay\n  → DeFi security scan results (scam flags, critical issues)\n\nStep 4: Competitive Position\n  → How does this compare to peers in the same category?\n  → Protocol profile: governance, longevity, audit history\n\nStep 5: Investor Considerations\n  → Actionable guidance for the specific investor profile\n  → Key risks and key positives\n  → \"If you're conservative, consider X. If aggressive, consider Y.\"\n```\n\n---\n\n### `investor_compare` — Side-by-Side Comparison\n\nCompare 2–5 products with LLM-powered interpretation across customizable dimensions.\n\n**Default comparison dimensions:** APY, risk score, TVL\n\n**Extended dimensions:** fees, lock period, audit count, IL risk, governance type, smart money sentiment, incentive sustainability\n\n**LLM comparison output:**\n```json\n{\n  \"llm_comparison\": {\n    \"narrative\": \"Aave offers superior security with $1.5B TVL and 6 audits, while Compound provides higher raw yield at 6.1% but with smaller TVL...\",\n    \"risk_comparison\": \"Aave's risk score (82) significantly outperforms Compound (68), primarily due to larger TVL and more comprehensive audit coverage\",\n    \"recommendation_with_reasoning\": {\n      \"for_conservative\": \"Choose Aave — battle-tested protocol, deep liquidity, multiple top-tier audits\",\n      \"for_aggressive\": \"Consider Compound — 0.9% higher APY, acceptable risk for short-term positions\",\n      \"key_tradeoff\": \"0.9% yield premium vs significantly lower risk score (82 vs 68)\"\n    }\n  }\n}\n```\n\n---\n\n## 🏗️ Server-Side Architecture\n\n```\n┌─────────────────────┐\n│    AI Agent          │         MCP JSON-RPC         ┌──────────────────────────────────────┐\n│    (OpenClaw)        │ ─────────────────────────────► │  Antalpha MCP Server                 │\n│                      │                                │  mcp-skills.ai.antalpha.com          │\n│  \"Find me yield\"     │                                │                                      │\n│  → 3 tool calls      │ ◄───────────────────────────── │  Intent Classifier (keyword + LLM)   │\n│  → zero API keys     │   structured results           │  Risk Scoring (7 dimensions)         │\n│  → zero custody      │                                │  DeFi Security Scanner               │\n└─────────────────────┘                                │  LLM Analysis (5-step chain)         │\n                                                       │  Smart Money (Dune Analytics)        │\n                                                       │  Market Context (bull/bear/sideways)  │\n                                                       │  Protocol Profiles (DefiLlama)       │\n                                                       │  Data Validation (cross-source)      │\n                                                       │  Explanation Engine (benchmarked)    │\n                                                       │                                      │\n                                                       │  Data Sources:                        │\n                                                       │  ├─ DefiLlama (2,500+ pools)         │\n                                                       │  ├─ Dune Analytics (smart money)     │\n                                                       │  ├─ CoinGecko (market data)          │\n                                                       │  ├─ DeFi Security (contract scan)    │\n                                                       │  └─ Internal LLM (analysis)          │\n                                                       └──────────────────────────────────────┘\n```\n\n---\n\n## 🔐 Risk Intelligence\n\n### 7-Dimension Risk Scoring\n\nEach opportunity is scored 0–100 across seven independent dimensions:\n\n| Dimension | What It Measures | Weight |\n|-----------|-----------------|--------|\n| **TVL Score** | Total Value Locked — protocol maturity indicator | High |\n| **Audit Score** | Number and quality of security audits | High |\n| **Chain Score** | Chain maturity (L1 vs L2 vs new chain) | Medium |\n| **Sustainability** | Yield source analysis (fees vs emissions) | High |\n| **Deposit Token** | Safety tier of the deposit asset (USDC > DAI > random) | Medium |\n| **Reward Token** | Liquidity and safety of reward tokens | Low |\n| **Protocol Trust** | Governance, longevity, track record | Medium |\n\n**Risk Levels:**\n- **LOW** (score ≥ 70): Battle-tested, well-audited, high TVL\n- **MEDIUM** (score 50–69): Established but with some risk factors\n- **HIGH** (score 30–49): Newer or with significant warnings\n- **VERY_HIGH** (score < 30): Experimental or flagged\n\n### DeFi Security Scanning\n\nEvery pool is scanned by an AI-powered contract security engine:\n\n```json\n{\n  \"defi_security\": {\n    \"aiScore\": 87,\n    \"safetyPercentage\": 92,\n    \"isScam\": false,\n    \"criticalIssues\": 0\n  }\n}\n```\n\n### Smart Money Sentiment\n\nReal-time whale and fund wallet activity aggregated from Dune Analytics:\n\n```json\n{\n  \"smart_money\": {\n    \"flow\": \"inflow\",\n    \"sentiment_score\": 0.72,\n    \"confidence\": \"high\",\n    \"buy_volume_usd\": 15000000,\n    \"sell_volume_usd\": 3200000,\n    \"net_flow_usd\": 11800000,\n    \"signal_count\": 23\n  }\n}\n```\n\n### Market Context Awareness\n\nThe engine is aware of the current market cycle (bull/bear/sideways), total DeFi TVL, BTC dominance, and US Treasury rates — providing context-aware recommendations that adjust for macro conditions.\n\n---\n\n## 🚀 Quick Start\n\n### Prerequisites\n\n- Python 3.8+\n- No API keys needed — all intelligence runs server-side\n\n### Registration (one-time)\n\n```bash\n./scripts/run.sh register\n# Returns agent_id — save this for all subsequent calls\n```\n\n### Usage\n\n```bash\n# Discover opportunities\n./scripts/run.sh discover --chain ethereum --min-apy 5 --limit 5\n\n# Discover with natural language\n./scripts/run.sh discover --natural-language \"stablecoin yield, conservative\"\n\n# Deep analysis\n./scripts/run.sh analyze --product-id <id> --depth detailed\n\n# Full due diligence\n./scripts/run.sh analyze --product-id <id> --depth full\n\n# Compare products\n./scripts/run.sh compare --ids <id1> <id2> <id3>\n```\n\n---\n\n## ⚠️ Critical Rules\n\n### Rule 1: Discovery First\n**Never give generic investment advice without real-time data.**\n```\n❌ \"I recommend Aave for stablecoin yield\"\n✅ investor_discover → analyze results → data-backed recommendation\n```\n\n### Rule 2: Explain Your Reasoning\nEvery recommendation should include the `explanation` object — summary, reasons for/against, benchmark comparison, risk classification.\n\n### Rule 3: Risk Is Non-Negotiable\n- APY data may be delayed — always show `data_quality.score` and `last_updated`\n- Never recommend VERY_HIGH risk products without explicit user acknowledgment\n- Investment decisions are the user's own responsibility — always DYOR\n\n### Rule 4: Honest About Limitations\n- If no good options exist for the user's criteria, say so with `generateHonestNoResultExplanation`\n- Show alternatives even if they don't perfectly match — \"This is close but has X tradeoff\"\n\n---\n\n## 🔒 Security\n\n| Layer | Protection |\n|-------|-----------|\n| **Private Keys** | Zero contact — never held, transmitted, or stored |\n| **Data Sources** | Triple-validated (DefiLlama + Dune + CoinGecko) with cross-source checks |\n| **Contract Safety** | AI-powered DeFi security scanner on every pool |\n| **Risk Scoring** | 7 independent dimensions, no single point of failure |\n| **Scam Detection** | Automated flagging via DeFi Security engine (`isScam` check) |\n| **Data Quality** | Freshness tracking, confidence scores, validation issue logging |\n\n---\n\n## 📝 Changelog\n\n### v3.8.0 (2026-04-14)\n- **Full SKILL.md rewrite** — English, feature-focused, comprehensive\n- Documented complete server-side intelligence pipeline\n- Added 7-dimension risk scoring documentation\n- Added DeFi Security scanning documentation\n- Added Smart Money sentiment documentation\n- Added Market Context awareness documentation\n- Added multi-round session intent accumulation flow\n- Added honest \"no result\" explanation behavior\n- Added incentive sustainability scoring documentation\n- Added data quality cross-validation documentation\n\n### v3.7.2 (2026-04-13)\n- Client cleanup: removed deprecated tools (feedback/confirm-intent/get-intent)\n\n---\n\n## 🤝 Contributing\n\nTest donations welcome:\n- **Network**: Base Chain\n- **Address**: `0x1F3A9A450428BbF161C4C33f10bd7AA1b2599a3e`\n\n---\n\n**Maintainer**: Web3 Investor Skill Team\n**Registry**: https://clawhub.com/skills/web3-investor\n**License**: MIT\n\nFile v3.8.0:README.md\n\n# Web3 Investor Skill\n\n> **English** | [中文](#chinese)\n\nAI-friendly DeFi investment intelligence skill. Discover, analyze, and compare yield opportunities across Ethereum, Base, Arbitrum, and Optimism — powered by Antalpha's remote MCP server. No API keys needed.\n\n---\n\n## Installation\n\n```bash\nopenclaw skill install https://github.com/AntalphaAI/web3-investor\n```\n\n### Install via ClawHub\n\n```bash\nclawhub install web3-investor\n```\n\n> Requires [OpenClaw](https://www.antalpha.com/) with Python 3.7+.  \n> No environment variables required — all data is fetched from the remote MCP server.\n\n---\n\n## Features\n\n### 1. Opportunity Discovery (`discover`)\nSearch for DeFi yield opportunities across chains with flexible filters:\n- Filter by chain: `ethereum`, `base`, `arbitrum`, `optimism`\n- Filter by minimum / maximum APY\n- Stablecoin-only mode\n- Natural language query support (e.g. \"I want safe yields on Base\")\n- Session-aware: remembers your preferences across calls\n\n### 2. Deep Analysis (`analyze`)\nGet a detailed breakdown of any single investment product:\n- Basic / detailed / full depth levels\n- Historical performance data\n- LLM-generated insights\n- Optional: skip history for faster response\n\n### 3. Multi-Product Comparison (`compare`)\nSide-by-side comparison of 2 or more products:\n- Unified metrics table\n- Comparative analysis\n- Final recommendation\n\n### 4. Intent Clarification Flow (`confirm-intent` / `get-intent`)\nWhen a query is ambiguous, the server returns a clarification request. The agent:\n1. Presents clarification options to the user\n2. Calls `confirm-intent` to lock in preferences (risk profile, capital nature, liquidity need)\n3. Re-runs discovery with the stored intent\n\n### 5. Feedback Loop (`feedback`)\nSubmit feedback on any recommendation:\n- Outcomes: `helpful`, `not_helpful`, `invested`, `dismissed`\n- Optional free-text reason\n- Feeds back into server-side recommendation quality\n\n---\n\n## Commands & Usage\n\n### discover\n```bash\npython3 scripts/mcp_client.py discover \\\n  --chain <ethereum|base|arbitrum|optimism> \\\n  --min-apy <number> \\\n  [--max-apy <number>] \\\n  [--stablecoin-only] \\\n  [--limit <1-10>] \\\n  [--session-id <id>] \\\n  [--natural-language \"<query>\"]\n```\n\n### analyze\n```bash\npython3 scripts/mcp_client.py analyze \\\n  --product-id <id> \\\n  [--depth basic|detailed|full] \\\n  [--no-history]\n```\n\n### compare\n```bash\npython3 scripts/mcp_client.py compare \\\n  --ids <id1> <id2> [<id3> ...]\n```\n\n### feedback\n```bash\npython3 scripts/mcp_client.py feedback \\\n  --product-id <id> \\\n  --feedback <helpful|not_helpful|invested|dismissed> \\\n  [--reason \"<text>\"]\n```\n\n### confirm-intent\n```bash\npython3 scripts/mcp_client.py confirm-intent \\\n  --session-id <id> \\\n  --type <intent_type> \\\n  --risk <conservative|moderate|aggressive> \\\n  [--capital-nature <nature>] \\\n  [--liquidity-need <need>]\n```\n\n### get-intent\n```bash\npython3 scripts/mcp_client.py get-intent \\\n  --session-id <id>\n```\n\n---\n\n## MCP Tools Reference\n\n| Tool | Purpose | Key Response Fields |\n|------|---------|---------------------|\n| `investor_discover` | Find yield opportunities | `recommendations[]`, `intent{}`, `search_stats` |\n| `investor_analyze` | Deep analysis of one product | `product{}`, `historical_data`, `llm_insights` |\n| `investor_compare` | Compare multiple products | `products[]`, `comparisons[]`, `recommendation` |\n| `investor_feedback` | Submit feedback | `acknowledged` |\n| `investor_confirm_intent` | Lock in user intent | `acknowledged`, `session_id` |\n| `investor_get_stored_intent` | Retrieve stored intent | `found`, `intent{}` |\n\n---\n\n## Example Sessions\n\n**Find and analyze:**\n```\nUser: Find ETH lending on Base with >5% APY\n→ discover --chain base --min-apy 5\n\nUser: Analyze the top result\n→ analyze --product-id aave-eth-base --depth detailed\n```\n\n**Compare two products:**\n```\n→ compare --ids aave-usdc-base compound-usdc-ethereum\n```\n\n**Intent clarification:**\n```\nUser: I want to invest in DeFi\n→ discover --natural-language \"I want to invest in DeFi\"\n  [Server returns NEEDS_CLARIFICATION]\n\nUser: Stablecoin, moderate risk, 1 month horizon\n→ confirm-intent --session-id <id> --type stablecoin --risk moderate\n→ discover --session-id <id>\n```\n\n---\n\n## Architecture\n\n```\nweb3-investor/\n├── scripts/\n│   └── mcp_client.py     # Thin MCP client wrapper\n├── config/\n│   └── config.json       # MCP server endpoint config\n└── SKILL.md              # Agent skill definition\n```\n\n- All business logic runs on the remote MCP server: `https://mcp-skills.ai.antalpha.com/mcp`\n- The local client handles only: MCP session handshake, request routing, SSE response parsing\n- No local API keys, no local data storage\n\n## Security\n\n- All API keys managed server-side\n- No sensitive data stored locally\n- MCP session protocol: `initialize` → `notifications/initialized` → `tools/call` (with `Mcp-Session-Id` header)\n\n---\n\n## Changelog\n\n### v2.0.3 — 2026-04-08\n- Add `homepage` metadata for provenance and ClawHub trust signals\n- No functional changes\n\n### v2.0.2 — 2026-04-08 ⭐ *Recommended baseline*\n- **Fix critical connection bug**: \"No valid session ID provided\" error resolved\n- Add `MCPClient` class with proper session management\n- Implement full MCP 2024-11-05 handshake: `initialize` → `notifications/initialized`\n- Parse `mcp-session-id` from response headers and reuse across calls\n- Add SSE (`text/event-stream`) response parsing\n- Type hints, improved docstrings, singleton pattern\n- Timeouts: initialize 60s, tools 120s\n\n### v2.0.1 — 2026-04-08\n- **Security fix**: Remove all `localhost:3000` signer API references\n- Remove `DUNE_API_KEY` environment variable dependency\n- Strip all trading/execution code and legacy local modules\n- Simplify config to MCP endpoint only\n- Confirm `env: []` — no local API keys required\n\n### v2.0.0 — 2026-04-08 ⚠️ *Breaking change*\n- Full architecture rewrite: local discovery/trading modules → thin MCP client wrapper\n- New commands: `discover`, `analyze`, `compare`, `feedback`, `confirm-intent`, `get-intent`\n- Natural language query support\n- Intent clarification flow\n- Remove all local API key dependencies\n\n### v0.5.x — 2026-03-29 to 2026-03-30\n- Legacy versions with local service architecture (deprecated)\n- Various metadata format fixes for ClawHub compatibility\n\n---\n\n## License\n\nMIT — [Antalpha AI Team](https://www.antalpha.com/)\n\n---\n\n---\n\n<a name=\"chinese\"></a>\n\n# Web3 Investor Skill（中文文档）\n\nAI 驱动的 DeFi 收益发现与分析技能。支持在 Ethereum、Base、Arbitrum、Optimism 四条链上发现、分析和对比投资机会，所有数据通过 Antalpha 远端 MCP 服务器获取，**无需本地 API Key**。\n\n---\n\n## 安装\n\n```bash\nopenclaw skill install https://github.com/AntalphaAI/web3-investor\n```\n\n### 通过 ClawHub 安装\n\n```bash\nclawhub install web3-investor\n```\n\n> 依赖 [OpenClaw](https://www.antalpha.com/)，Python 3.7+。  \n> 无需配置任何环境变量。\n\n---\n\n## 功能介绍\n\n### 1. 机会发现（`discover`）\n在多条链上搜索 DeFi 收益机会，支持灵活过滤：\n- 按链筛选：`ethereum`、`base`、`arbitrum`、`optimism`\n- 按最低 / 最高 APY 筛选\n- 仅限稳定币模式\n- 自然语言查询（如\"帮我找 Base 上安全稳健的收益\"）\n- 会话感知：跨调用记忆你的偏好\n\n### 2. 深度分析（`analyze`）\n对单一投资产品进行详细解析：\n- 支持 basic / detailed / full 三个分析深度\n- 历史表现数据\n- LLM 生成的投资洞察\n- 可跳过历史数据以加速响应\n\n### 3. 多产品对比（`compare`）\n同时对比 2 个及以上投资产品：\n- 统一指标横向对比\n- 综合分析报告\n- 最终推荐建议\n\n### 4. 意图澄清流程（`confirm-intent` / `get-intent`）\n当查询语义不明时，服务端返回澄清问题，Agent 会：\n1. 向用户展示选项\n2. 调用 `confirm-intent` 锁定偏好（风险等级、资金属性、流动性需求）\n3. 携带已存储意图重新执行发现\n\n### 5. 反馈回路（`feedback`）\n对任何推荐结果提交反馈：\n- 结果类型：`helpful`（有帮助）、`not_helpful`（无帮助）、`invested`（已投资）、`dismissed`（忽略）\n- 可附加文字原因\n- 反馈数据用于服务端推荐质量优化\n\n---\n\n## 命令与用法\n\n### discover — 发现机会\n```bash\npython3 scripts/mcp_client.py discover \\\n  --chain <ethereum|base|arbitrum|optimism> \\\n  --min-apy <数字> \\\n  [--max-apy <数字>] \\\n  [--stablecoin-only] \\\n  [--limit <1-10>] \\\n  [--session-id <id>] \\\n  [--natural-language \"<查询语句>\"]\n```\n\n### analyze — 深度分析\n```bash\npython3 scripts/mcp_client.py analyze \\\n  --product-id <产品ID> \\\n  [--depth basic|detailed|full] \\\n  [--no-history]\n```\n\n### compare — 多产品对比\n```bash\npython3 scripts/mcp_client.py compare \\\n  --ids <id1> <id2> [<id3> ...]\n```\n\n### feedback — 提交反馈\n```bash\npython3 scripts/mcp_client.py feedback \\\n  --product-id <产品ID> \\\n  --feedback <helpful|not_helpful|invested|dismissed> \\\n  [--reason \"<原因文字>\"]\n```\n\n### confirm-intent — 确认用户意图\n```bash\npython3 scripts/mcp_client.py confirm-intent \\\n  --session-id <id> \\\n  --type <意图类型> \\\n  --risk <conservative|moderate|aggressive> \\\n  [--capital-nature <属性>] \\\n  [--liquidity-need <需求>]\n```\n\n### get-intent — 获取已存储意图\n```bash\npython3 scripts/mcp_client.py get-intent \\\n  --session-id <id>\n```\n\n---\n\n## MCP 工具一览\n\n| 工具 | 用途 | 关键返回字段 |\n|------|------|-------------|\n| `investor_discover` | 发现收益机会 | `recommendations[]`, `intent{}`, `search_stats` |\n| `investor_analyze` | 单产品深度分析 | `product{}`, `historical_data`, `llm_insights` |\n| `investor_compare` | 多产品横向对比 | `products[]`, `comparisons[]`, `recommendation` |\n| `investor_feedback` | 提交反馈 | `acknowledged` |\n| `investor_confirm_intent` | 锁定用户意图 | `acknowledged`, `session_id` |\n| `investor_get_stored_intent` | 获取已存储意图 | `found`, `intent{}` |\n\n---\n\n## 使用示例\n\n**发现并分析：**\n```\n用户：帮我找 Base 上 APY > 5% 的 ETH 借贷\n→ discover --chain base --min-apy 5\n\n用户：分析排名第一的产品\n→ analyze --product-id aave-eth-base --depth detailed\n```\n\n**对比两个产品：**\n```\n→ compare --ids aave-usdc-base compound-usdc-ethereum\n```\n\n**意图澄清流程：**\n```\n用户：我想投资 DeFi\n→ discover --natural-language \"我想投资 DeFi\"\n  [服务端返回 NEEDS_CLARIFICATION]\n\n用户：稳定币，中等风险，1个月期限\n→ confirm-intent --session-id <id> --type stablecoin --risk moderate\n→ discover --session-id <id>\n```\n\n---\n\n## 架构说明\n\n```\nweb3-investor/\n├── scripts/\n│   └── mcp_client.py     # 轻量 MCP 客户端封装\n├── config/\n│   └── config.json       # MCP 服务端地址配置\n└── SKILL.md              # Agent 技能定义文件\n```\n\n- 所有业务逻辑运行在远端 MCP 服务器：`https://mcp-skills.ai.antalpha.com/mcp`\n- 本地客户端仅负责：MCP 会话握手、请求路由、SSE 响应解析\n- 无本地 API Key，无本地数据存储\n\n## 安全说明\n\n- 所有 API Key 由服务端统一管理\n- 本地不存储任何敏感数据\n- MCP 会话协议：`initialize` → `notifications/initialized` → `tools/call`（携带 `Mcp-Session-Id` header）\n\n---\n\n## 版本更新说明\n\n### v2.0.3 — 2026-04-08\n- 添加 `homepage` 元数据，改善 ClawHub 信任评分\n- 无功能性变更\n\n### v2.0.2 — 2026-04-08 ⭐ *推荐基准版本*\n- **修复关键连接 Bug**：彻底解决 \"No valid session ID provided\" 错误\n- 新增 `MCPClient` 类，实现完整会话管理\n- 实现标准 MCP 2024-11-05 握手流程：`initialize` → `notifications/initialized`\n- 从响应头提取并复用 `mcp-session-id`\n- 新增 SSE（`text/event-stream`）响应解析\n- 完善类型注解、文档字符串，采用单例模式\n- 超时配置：初始化 60s，工具调用 120s\n\n### v2.0.1 — 2026-04-08\n- **安全修复**：移除所有 `localhost:3000` 签名 API 引用\n- 移除 `DUNE_API_KEY` 环境变量依赖\n- 删除所有交易执行代码和历史遗留本地模块\n- 简化 config 仅保留 MCP 端点配置\n- 确认 `env: []`，无需任何本地 API Key\n\n### v2.0.0 — 2026-04-08 ⚠️ *破坏性变更*\n- 架构全量重写：本地发现/交易模块 → 轻量 MCP 客户端封装\n- 新增 6 条命令：`discover`、`analyze`、`compare`、`feedback`、`confirm-intent`、`get-intent`\n- 支持自然语言查询\n- 支持意图澄清流程\n- 移除所有本地 API Key 依赖\n\n### v0.5.x — 2026-03-29 至 2026-03-30\n- 旧版本，采用本地服务架构（已废弃）\n- 多次修复 ClawHub 元数据格式兼容性问题\n\n---\n\n## 开源协议\n\nMIT — [Antalpha AI 团队](https://www.antalpha.com/)\n\nFile v3.8.0:_meta.json\n\n{\n  \"ownerId\": \"kn7fy7jd9vd0x7wvpxgfxye1pn827f50\",\n  \"slug\": \"web3-investor\",\n  \"version\": \"3.8.0\",\n  \"publishedAt\": 1776168756756\n}\n\nFile v3.8.0:references/mcp-servers.md\n\n# MCP Servers for Web3 Data\n\nThis document lists MCP (Model Context Protocol) servers that provide Web3 data.\n\n## What is MCP?\n\nModel Context Protocol is a standardized way for AI models to access external data sources. MCP servers act as bridges between AI agents and blockchain data.\n\n## Recommended MCP Servers\n\n### 1. Ethereum MCP\n- **Repository**: https://github.com/your-org/ethereum-mcp\n- **Capabilities**: Balance queries, transaction simulation, contract reads\n- **Setup**: `npx ethereum-mcp --rpc-url YOUR_RPC_URL`\n- **Free**: Yes (uses your RPC)\n\n### 2. Etherscan MCP\n- **Repository**: https://github.com/your-org/etherscan-mcp\n- **Capabilities**: Transaction history, contract verification, token info\n- **Setup**: `ETHERSCAN_API_KEY=xxx npx etherscan-mcp`\n- **Free**: Yes (free tier available)\n\n### 3. DefiLlama MCP\n- **Repository**: https://github.com/your-org/defillama-mcp\n- **Capabilities**: TVL data, yield rankings, protocol info\n- **Setup**: `npx defillama-mcp`\n- **Free**: Yes (no API key required)\n\n### 4. Dune Analytics MCP\n- **Repository**: https://github.com/your-org/dune-mcp\n- **Capabilities**: Custom SQL queries on blockchain data\n- **Setup**: `DUNE_API_KEY=xxx npx dune-mcp`\n- **Free**: Free tier available (limited queries)\n\n## Integration Pattern\n\n```python\n# Check MCP availability first, fall back to direct API\nasync def get_tvl(protocol: str) -> float:\n    if mcp_available(\"defillama\"):\n        return await mcp_query(\"defillama\", \"get_tvl\", protocol)\n    else:\n        return await defillama_api_get_tvl(protocol)\n```\n\n## Adding New MCP Servers\n\nWhen adding new MCP servers:\n1. Verify the server supports standard MCP protocol\n2. Test with `mcp-inspector` tool\n3. Document required environment variables\n4. Add fallback logic for when MCP is unavailable\n\nFile v3.8.0:references/protocols.md\n\n# Known Protocol Registry\n\nThis document contains metadata for common DeFi protocols on Ethereum mainnet.\n\n## Lending Protocols\n\n### Aave V3\n- **Contract**: 0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2\n- **Category**: Lending\n- **Risk Level**: Low\n- **Audit**: Multiple (OpenZeppelin, Trail of Bits)\n- **TVL**: > $5B (check DefiLlama for current)\n- **Docs**: https://docs.aave.com/\n\n### Compound V3\n- **Contract**: 0xc3d688B66703497DAA19211EEdff47f25384cdc3\n- **Category**: Lending\n- **Risk Level**: Low\n- **Audit**: Multiple (OpenZeppelin)\n- **TVL**: > $2B\n- **Docs**: https://docs.compound.finance/\n\n### MakerDAO (Spark)\n- **Contract**: Various (see docs)\n- **Category**: Lending\n- **Risk Level**: Low\n- **Audit**: Multiple\n- **TVL**: > $8B\n- **Docs**: https://docs.makerdao.com/\n\n## Liquid Staking\n\n### Lido (stETH)\n- **Contract**: 0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84\n- **Category**: Liquid Staking\n- **Risk Level**: Low\n- **Audit**: Multiple (Quantstamp, MixBytes)\n- **TVL**: > $15B\n- **Docs**: https://docs.lido.fi/\n\n### Rocket Pool (rETH)\n- **Contract**: 0xae78736Cd615f374D3085123A210448E74Fc6393\n- **Category**: Liquid Staking\n- **Risk Level**: Low\n- **Audit**: Multiple (Sigma Prime)\n- **TVL**: > $2B\n- **Docs**: https://docs.rocketpool.net/\n\n## DEXs\n\n### Uniswap V3\n- **Factory**: 0x1F98431c8aD98523631AE4a59f267346ea31F984\n- **Category**: DEX\n- **Risk Level**: Low\n- **Audit**: Multiple\n- **TVL**: > $4B\n- **Docs**: https://docs.uniswap.org/\n\n### Curve Finance\n- **Contract**: 0xD533a949740bb3306d119CC777fa900bA034cd52\n- **Category**: DEX (Stablecoins)\n- **Risk Level**: Low\n- **Audit**: Multiple\n- **TVL**: > $2B\n- **Docs**: https://docs.curve.fi/\n\n## Yield Aggregators\n\n### Yearn V3\n- **Registry**: 0x3c91D8ba3C8cB06D9CFe5b8F31c68a746f0f15B6\n- **Category**: Yield Aggregator\n- **Risk Level**: Medium\n- **Audit**: Multiple\n- **TVL**: Variable\n- **Docs**: https://docs.yearn.fi/\n\n## Protocol Metadata Schema\n\n```json\n{\n  \"name\": \"Protocol Name\",\n  \"address\": \"0x...\",\n  \"chain\": \"ethereum\",\n  \"category\": \"lending|dex|staking|aggregator\",\n  \"risk_level\": \"low|medium|high\",\n  \"audit_status\": \"multiple|single|community|none\",\n  \"tvl\": 1000000000,\n  \"maturity_days\": 730,\n  \"has_timelock\": true,\n  \"governance\": \"dao|multisig|admin\",\n  \"docs_url\": \"https://...\",\n  \"icon_url\": \"https://...\"\n}\n```\n\n## Adding New Protocols\n\nTo add a new protocol, create a JSON file in `config/protocols/`:\n\n```json\n{\n  \"name\": \"New Protocol\",\n  \"address\": \"0x...\",\n  \"chain\": \"ethereum\",\n  \"category\": \"lending\",\n  \"risk_level\": \"medium\",\n  \"audit_status\": \"single\",\n  \"docs_url\": \"https://...\"\n}\n```\n\nThen run:\n```bash\npython scripts/discovery/analyze_protocol.py --add-config config/protocols/new-protocol.json\n```\n\nFile v3.8.0:references/risk-framework.md\n\n# Risk Assessment Framework\n\n## Risk Levels\n\n| Level | Score | Description | Typical Characteristics |\n|-------|-------|-------------|------------------------|\n| **Low** | 0-3 | Blue-chip, battle-tested | TVL > $1B, Audited, 2+ years live |\n| **Medium** | 4-6 | Established but some risk | TVL $100M-$1B, Audited, 1+ year live |\n| **High** | 7-10 | Experimental or new | TVL < $100M, No audit, < 1 year live |\n\n## Risk Factors\n\n### 1. Protocol Maturity (0-3 points)\n\n| Criteria | Points |\n|----------|--------|\n| Live > 2 years with no major exploits | 0 |\n| Live 1-2 years | 1 |\n| Live < 1 year | 2 |\n| Live < 3 months | 3 |\n\n### 2. Audit Status (0-3 points)\n\n| Criteria | Points |\n|----------|--------|\n| Multiple audits from top firms (OpenZeppelin, Trail of Bits, etc.) | 0 |\n| Single audit from reputable firm | 1 |\n| Community audit only | 2 |\n| No audit | 3 |\n\n### 3. TVL Size (0-2 points)\n\n| TVL | Points |\n|-----|--------|\n| > $1 billion | 0 |\n| $100M - $1B | 1 |\n| < $100M | 2 |\n\n### 4. Decentralization (0-2 points)\n\n| Criteria | Points |\n|----------|--------|\n| DAO governance, no admin keys or timelocked | 0 |\n| Timelocked admin keys (> 48h) | 1 |\n| Admin keys, no timelock | 2 |\n\n## Risk Calculation\n\n```\nRisk Score = Protocol Maturity + Audit Status + TVL Size + Decentralization\n```\n\n### Examples\n\n| Protocol | Maturity | Audit | TVL | Decentralization | Total | Level |\n|----------|----------|-------|-----|------------------|-------|-------|\n| Aave V3 | 0 | 0 | 0 | 1 | 1 | Low |\n| Compound | 0 | 0 | 0 | 0 | 0 | Low |\n| New Lending Protocol | 3 | 3 | 2 | 2 | 10 | High |\n\n## Risk-Adjusted APY\n\nWhen comparing opportunities, consider risk-adjusted returns:\n\n```\nRisk-Adjusted APY = Nominal APY × (1 - Risk Score / 20)\n```\n\n### Example\n\n| Protocol | APY | Risk Score | Risk-Adjusted APY |\n|----------|-----|------------|-------------------|\n| Aave USDC | 5% | 1 | 4.75% |\n| New Protocol | 20% | 8 | 12% |\n\n## Special Risk Flags\n\nAdditional risk factors that should be noted but not scored:\n\n- ⚠️ **Fork Risk**: Protocol is a fork of another protocol with issues\n- ⚠️ **Oracle Risk**: Uses custom oracle instead of Chainlink\n- ⚠️ **Leverage Risk**: Involves leverage or looping\n- ⚠️ **Illicit Risk**: Protocol in sanctioned jurisdiction\n- ⚠️ **Regulatory Risk**: Under regulatory scrutiny\n\n## Usage in Discovery\n\nWhen running `find_opportunities.py`:\n\n```bash\n# Only show low-risk opportunities\npython scripts/discovery/find_opportunities.py --max-risk low\n\n# Filter by minimum TVL (in USD)\npython scripts/discovery/find_opportunities.py --min-tvl 1000000\n\n# Require audit\npython scripts/discovery/find_opportunities.py --require-audit\n```\n\nFile v3.8.0:config/config.json\n\n{\n  \"_comment\": \"Web3 Investor Skill Configuration - v2.0.0 (MCP Client Only)\",\n  \"mcp\": {\n    \"endpoint\": \"https://mcp-skills.ai.antalpha.com/mcp\",\n    \"timeout_seconds\": 30\n  }\n}\n\nFile v3.8.0:config/protocols.json\n\n{\n  \"version\": \"0.2.0\",\n  \"updated\": \"2026-03-04\",\n  \"description\": \"Static protocol registry for Web3 Investor Skill\",\n  \"protocols\": {\n    \"aave-v3\": {\n      \"name\": \"Aave V3\",\n      \"primary_contract\": \"0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2\",\n      \"chain\": \"ethereum\",\n      \"category\": \"lending\",\n      \"registry_risk\": \"low\",\n      \"docs_url\": \"https://docs.aave.com/\",\n      \"actions\": {\n        \"deposit\": {\n          \"method\": \"supply\",\n          \"signature\": \"supply(address,uint256,address,uint16)\"\n        },\n        \"withdraw\": {\n          \"method\": \"withdraw\",\n          \"signature\": \"withdraw(address,uint256,address)\"\n        }\n      }\n    },\n    \"aave\": {\n      \"name\": \"Aave\",\n      \"primary_contract\": \"0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2\",\n      \"chain\": \"ethereum\",\n      \"category\": \"lending\",\n      \"registry_risk\": \"low\",\n      \"docs_url\": \"https://docs.aave.com/\"\n    },\n    \"compound-v3\": {\n      \"name\": \"Compound V3\",\n      \"primary_contract\": \"0xc3d688B66703497DAA19211EEdff47f25384cdc3\",\n      \"chain\": \"ethereum\",\n      \"category\": \"lending\",\n      \"registry_risk\": \"low\",\n      \"docs_url\": \"https://docs.compound.finance/\",\n      \"actions\": {\n        \"deposit\": {\n          \"method\": \"supply\",\n          \"signature\": \"supply(address,uint256)\"\n        },\n        \"withdraw\": {\n          \"method\": \"withdraw\",\n          \"signature\": \"withdraw(uint256)\"\n        }\n      }\n    },\n    \"compound\": {\n      \"name\": \"Compound\",\n      \"primary_contract\": \"0xc3d688B66703497DAA19211EEdff47f25384cdc3\",\n      \"chain\": \"ethereum\",\n      \"category\": \"lending\",\n      \"registry_risk\": \"low\",\n      \"docs_url\": \"https://docs.compound.finance/\"\n    },\n    \"lido\": {\n      \"name\": \"Lido\",\n      \"primary_contract\": \"0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84\",\n      \"chain\": \"ethereum\",\n      \"category\": \"liquid_staking\",\n      \"registry_risk\": \"low\",\n      \"docs_url\": \"https://docs.lido.fi/\",\n      \"output_token\": {\n        \"symbol\": \"stETH\",\n        \"address\": \"0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84\"\n      }\n    },\n    \"rocket-pool\": {\n      \"name\": \"Rocket Pool\",\n      \"primary_contract\": \"0xae78736Cd615f374D3085123A210448E74Fc6393\",\n      \"chain\": \"ethereum\",\n      \"category\": \"liquid_staking\",\n      \"registry_risk\": \"low\",\n      \"docs_url\": \"https://docs.rocketpool.net/\",\n      \"output_token\": {\n        \"symbol\": \"rETH\",\n        \"address\": \"0xae78736Cd615f374D3085123A210448E74Fc6393\"\n      }\n    },\n    \"uniswap-v3\": {\n      \"name\": \"Uniswap V3\",\n      \"factory\": \"0x1F98431c8aD98523631AE4a59f267346ea31F984\",\n      \"chain\": \"ethereum\",\n      \"category\": \"dex\",\n      \"registry_risk\": \"low\",\n      \"docs_url\": \"https://docs.uniswap.org/\"\n    },\n    \"uniswap-v4\": {\n      \"name\": \"Uniswap V4\",\n      \"chain\": \"ethereum\",\n      \"category\": \"dex\",\n      \"registry_risk\": \"medium\",\n      \"docs_url\": \"https://docs.uniswap.org/\",\n      \"notes\": \"New version, may have undiscovered issues\"\n    },\n    \"curve\": {\n      \"name\": \"Curve Finance\",\n      \"primary_contract\": \"0xD533a949740bb3306d119CC777fa900bA034cd52\",\n      \"chain\": \"ethereum\",\n      \"category\": \"dex\",\n      \"registry_risk\": \"low\",\n      \"docs_url\": \"https://docs.curve.fi/\"\n    },\n    \"yearn\": {\n      \"name\": \"Yearn V3\",\n      \"registry\": \"0x3c91D8ba3C8cB06D9CFe5b8F31c68a746f0f15B6\",\n      \"chain\": \"ethereum\",\n      \"category\": \"yield_aggregator\",\n      \"registry_risk\": \"medium\",\n      \"docs_url\": \"https://docs.yearn.fi/\"\n    },\n    \"makerdao\": {\n      \"name\": \"MakerDAO\",\n      \"chain\": \"ethereum\",\n      \"category\": \"lending\",\n      \"registry_risk\": \"low\",\n      \"docs_url\": \"https://docs.makerdao.com/\"\n    },\n    \"convex\": {\n      \"name\": \"Convex\",\n      \"chain\": \"ethereum\",\n      \"category\": \"yield_aggregator\",\n      \"registry_risk\": \"medium\",\n      \"docs_url\": \"https://docs.convexfinance.com/\"\n    }\n  },\n  \"risk_categories\": {\n    \"lending\": \"Borrow/lend protocols - generally lower risk if established\",\n    \"dex\": \"Decentralized exchanges - medium risk due to impermanent loss\",\n    \"liquid_staking\": \"Liquid staking derivatives - low risk for established protocols\",\n    \"yield_aggregator\": \"Yield optimizers - higher complexity, medium risk\"\n  }\n}\n\nFile v3.8.0:config/schema.json\n\n{\n  \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n  \"title\": \"Web3 Investor Skill Configuration\",\n  \"version\": \"2.0.0\",\n  \"description\": \"Configuration schema for Web3 Investor Skill (MCP Client Only). No local services or API keys required.\",\n  \"type\": \"object\",\n  \"properties\": {\n    \"_comment\": {\n      \"type\": \"string\",\n      \"description\": \"Optional comment field for documentation purposes\"\n    },\n    \"mcp\": {\n      \"type\": \"object\",\n      \"description\": \"MCP server configuration\",\n      \"properties\": {\n        \"endpoint\": {\n          \"type\": \"string\",\n          \"format\": \"uri\",\n          \"default\": \"https://mcp-skills.ai.antalpha.com/mcp\",\n          \"description\": \"MCP server endpoint URL\"\n        },\n        \"timeout_seconds\": {\n          \"type\": \"integer\",\n          \"default\": 30,\n          \"minimum\": 5,\n          \"maximum\": 120,\n          \"description\": \"Request timeout for MCP calls\"\n        }\n      }\n    }\n  }\n}\n\nArchive v3.7.2: 11 files, 18655 bytes\n\nFiles: config/config.json (181b), config/protocols.json (4175b), config/schema.json (942b), README.md (12840b), references/mcp-servers.md (1791b), references/protocols.md (2715b), references/risk-framework.md (2677b), scripts/mcp_client.py (16662b), scripts/run.sh (503b), SKILL.md (4853b), _meta.json (132b)\n\nFile v3.7.2:SKILL.md\n\n---\nname: web3-investor\nversion: 3.7.2\ndescription: AI-friendly Web3 investment infrastructure for discovering and analyzing DeFi yield opportunities via MCP. Use when users want to discover investment opportunities, analyze products, compare options, or get personalized recommendations. All logic runs on remote MCP server - no local API keys needed.\nauthor: Antalpha AI Team\nhomepage: https://www.antalpha.com/\n---\n\n# Web3-Investor\n\n> DeFi investment intelligence — discover, analyze, compare, and recommend yield opportunities.\n> **Version**: 3.7.2 — 客户端清理：移除已下线工具（feedback/confirm-intent/get-intent）\n\n---\n\n## 🛠 Tools (3)\n\n| Tool | Responsibility |\n|------|---------------|\n| `investor_discover` | Sole entry: discovery + intent recognition + multi-round accumulation |\n| `investor_analyze` | Deep analysis: LLM 5-step reasoning |\n| `investor_compare` | Comparative analysis: horizontal comparison + risk-based recommendation |\n\n---\n\n## ⚡ 30秒快速开始\n\n```bash\ncd /path/to/skills/web3-investor\n\n# 1. Discover opportunities\n./scripts/run.sh discover --chain ethereum --min-apy 5 --limit 5\n\n# 2. Deep analysis\n./scripts/run.sh analyze --product-id <id> --depth detailed\n\n# 3. Compare products\n./scripts/run.sh compare --ids <id1> <id2>\n```\n\n---\n\n## 🎯 Scenario → Command Decision Tree\n\n```\nWhat does the user want?\n│\n├─ \"Find investment opportunities\" ──→ ./scripts/run.sh discover\n│   ├─ Stablecoin preference → discover --chain ethereum --stablecoin-only\n│   ├─ Minimum yield → discover --min-apy 5\n│   └─ NEEDS_CLARIFICATION → show options to user, re-discover with refined intent + session-id\n│\n├─ \"Deep dive into product X\" ──→ ./scripts/run.sh analyze --product-id <id>\n│   └─ More comprehensive → analyze --depth full\n│\n└─ \"Compare A vs B\" ──→ ./scripts/run.sh compare --ids <id1> <id2> [<id3> <id4>]\n```\n\n---\n\n## 🔧 Command Reference\n\n### discover — Discover Investment Opportunities\n\nFind on-chain yield opportunities. Supports natural language intent recognition with automatic risk preference matching. Multi-round session auto-accumulates intent.\n\n**Input**:\n```bash\n./scripts/run.sh discover \\\n  --chain <ethereum|base|arbitrum|optimism> \\\n  [--min-apy 5] [--max-apy 50] \\\n  [--stablecoin-only] \\\n  [--limit 5] \\\n  [--natural-language \"stablecoin yield, conservative\"] \\\n  [--session-id <id>]\n```\n\n**Typical Response** (PASS):\n```json\n{\n  \"gate_status\": \"PASS\",\n  \"recommendations\": [\n    { \"id\": \"...\", \"name\": \"Aave V3 USDC\", \"apy\": 5.2, \"tvl_usd\": 1500000000, \"risk_score\": 25 }\n  ],\n  \"suggested_next_actions\": [\n    { \"action\": \"ask_user_to_select_product\", \"priority\": 1 },\n    { \"action\": \"call_investor_analyze_for_details\", \"priority\": 2 }\n  ]\n}\n```\n\n**Needs Clarification** (NEEDS_CLARIFICATION):\n- Show `clarification.question` to user\n- Show `clarification.structured_options[]` for selection\n- After user selects, re-call `discover` with refined intent + same `--session-id`\n- The session automatically accumulates intent across rounds — no separate confirm step needed\n\n### analyze — Deep Analysis\n\nLLM-powered deep analysis of a single product (5-step reasoning chain).\n\n**Input**:\n```bash\n./scripts/run.sh analyze --product-id <id> [--depth basic|detailed|full]\n```\n\n**Typical Response**:\n```json\n{\n  \"product\": { \"name\": \"Aave V3 USDC\", \"yield\": { \"apy\": 5.2 } },\n  \"llm_insights\": { \"yield_source\": \"lending_spread\", \"sustainability\": \"sustainable\" },\n  \"analysis_meta\": {\n    \"llm_used\": true,\n    \"fallback_applied\": false,\n    \"confidence_note\": \"Deep analysis by LLM. Insights are based on protocol data and AI reasoning.\"\n  }\n}\n```\n\n### compare — Compare Products\n\nSide-by-side comparison with LLM-powered interpretation and risk-based recommendations.\n\n**Input**:\n```bash\n./scripts/run.sh compare --ids <id1> <id2> [<id3> <id4>]\n```\n\n**Typical Response**:\n```json\n{\n  \"products\": [...],\n  \"comparisons\": [\n    { \"dimension\": \"apy\", \"values\": {...}, \"best_performer\": \"...\" }\n  ],\n  \"llm_comparison\": {\n    \"narrative\": \"A offers higher security, while B provides better yield...\",\n    \"risk_comparison\": \"...\",\n    \"recommendation_with_reasoning\": {\n      \"for_conservative\": \"Choose A because...\",\n      \"for_aggressive\": \"Choose B because...\",\n      \"key_tradeoff\": \"Security vs yield\"\n    }\n  }\n}\n```\n\n---\n\n## ⚠️ FAQ\n\n| Issue | Cause | Solution |\n|-------|-------|----------|\n| NEEDS_CLARIFICATION | Intent unclear | Show options to user, re-discover with refined input + session-id |\n| \"Product not found\" | Invalid product_id | Use real id from discover results |\n| analysis_meta.fallback_applied=true | LLM timeout/unavailable | Result is rule-based only, for reference |\n| Network timeout | External service slow | Retry — all APIs have auto-retry with exponential backoff |\n\nFile v3.7.2:README.md\n\n# Web3 Investor Skill\n\n> **English** | [中文](#chinese)\n\nAI-friendly DeFi investment intelligence skill. Discover, analyze, and compare yield opportunities across Ethereum, Base, Arbitrum, and Optimism — powered by Antalpha's remote MCP server. No API keys needed.\n\n---\n\n## Installation\n\n```bash\nopenclaw skill install https://github.com/AntalphaAI/web3-investor\n```\n\n### Install via ClawHub\n\n```bash\nclawhub install web3-investor\n```\n\n> Requires [OpenClaw](https://www.antalpha.com/) with Python 3.7+.  \n> No environment variables required — all data is fetched from the remote MCP server.\n\n---\n\n## Features\n\n### 1. Opportunity Discovery (`discover`)\nSearch for DeFi yield opportunities across chains with flexible filters:\n- Filter by chain: `ethereum`, `base`, `arbitrum`, `optimism`\n- Filter by minimum / maximum APY\n- Stablecoin-only mode\n- Natural language query support (e.g. \"I want safe yields on Base\")\n- Session-aware: remembers your preferences across calls\n\n### 2. Deep Analysis (`analyze`)\nGet a detailed breakdown of any single investment product:\n- Basic / detailed / full depth levels\n- Historical performance data\n- LLM-generated insights\n- Optional: skip history for faster response\n\n### 3. Multi-Product Comparison (`compare`)\nSide-by-side comparison of 2 or more products:\n- Unified metrics table\n- Comparative analysis\n- Final recommendation\n\n### 4. Intent Clarification Flow (`confirm-intent` / `get-intent`)\nWhen a query is ambiguous, the server returns a clarification request. The agent:\n1. Presents clarification options to the user\n2. Calls `confirm-intent` to lock in preferences (risk profile, capital nature, liquidity need)\n3. Re-runs discovery with the stored intent\n\n### 5. Feedback Loop (`feedback`)\nSubmit feedback on any recommendation:\n- Outcomes: `helpful`, `not_helpful`, `invested`, `dismissed`\n- Optional free-text reason\n- Feeds back into server-side recommendation quality\n\n---\n\n## Commands & Usage\n\n### discover\n```bash\npython3 scripts/mcp_client.py discover \\\n  --chain <ethereum|base|arbitrum|optimism> \\\n  --min-apy <number> \\\n  [--max-apy <number>] \\\n  [--stablecoin-only] \\\n  [--limit <1-10>] \\\n  [--session-id <id>] \\\n  [--natural-language \"<query>\"]\n```\n\n### analyze\n```bash\npython3 scripts/mcp_client.py analyze \\\n  --product-id <id> \\\n  [--depth basic|detailed|full] \\\n  [--no-history]\n```\n\n### compare\n```bash\npython3 scripts/mcp_client.py compare \\\n  --ids <id1> <id2> [<id3> ...]\n```\n\n### feedback\n```bash\npython3 scripts/mcp_client.py feedback \\\n  --product-id <id> \\\n  --feedback <helpful|not_helpful|invested|dismissed> \\\n  [--reason \"<text>\"]\n```\n\n### confirm-intent\n```bash\npython3 scripts/mcp_client.py confirm-intent \\\n  --session-id <id> \\\n  --type <intent_type> \\\n  --risk <conservative|moderate|aggressive> \\\n  [--capital-nature <nature>] \\\n  [--liquidity-need <need>]\n```\n\n### get-intent\n```bash\npython3 scripts/mcp_client.py get-intent \\\n  --session-id <id>\n```\n\n---\n\n## MCP Tools Reference\n\n| Tool | Purpose | Key Response Fields |\n|------|---------|---------------------|\n| `investor_discover` | Find yield opportunities | `recommendations[]`, `intent{}`, `search_stats` |\n| `investor_analyze` | Deep analysis of one product | `product{}`, `historical_data`, `llm_insights` |\n| `investor_compare` | Compare multiple products | `products[]`, `comparisons[]`, `recommendation` |\n| `investor_feedback` | Submit feedback | `acknowledged` |\n| `investor_confirm_intent` | Lock in user intent | `acknowledged`, `session_id` |\n| `investor_get_stored_intent` | Retrieve stored intent | `found`, `intent{}` |\n\n---\n\n## Example Sessions\n\n**Find and analyze:**\n```\nUser: Find ETH lending on Base with >5% APY\n→ discover --chain base --min-apy 5\n\nUser: Analyze the top result\n→ analyze --product-id aave-eth-base --depth detailed\n```\n\n**Compare two products:**\n```\n→ compare --ids aave-usdc-base compound-usdc-ethereum\n```\n\n**Intent clarification:**\n```\nUser: I want to invest in DeFi\n→ discover --natural-language \"I want to invest in DeFi\"\n  [Server returns NEEDS_CLARIFICATION]\n\nUser: Stablecoin, moderate risk, 1 month horizon\n→ confirm-intent --session-id <id> --type stablecoin --risk moderate\n→ discover --session-id <id>\n```\n\n---\n\n## Architecture\n\n```\nweb3-investor/\n├── scripts/\n│   └── mcp_client.py     # Thin MCP client wrapper\n├── config/\n│   └── config.json       # MCP server endpoint config\n└── SKILL.md              # Agent skill definition\n```\n\n- All business logic runs on the remote MCP server: `https://mcp-skills.ai.antalpha.com/mcp`\n- The local client handles only: MCP session handshake, request routing, SSE response parsing\n- No local API keys, no local data storage\n\n## Security\n\n- All API keys managed server-side\n- No sensitive data stored locally\n- MCP session protocol: `initialize` → `notifications/initialized` → `tools/call` (with `Mcp-Session-Id` header)\n\n---\n\n## Changelog\n\n### v2.0.3 — 2026-04-08\n- Add `homepage` metadata for provenance and ClawHub trust signals\n- No functional changes\n\n### v2.0.2 — 2026-04-08 ⭐ *Recommended baseline*\n- **Fix critical connection bug**: \"No valid session ID provided\" error resolved\n- Add `MCPClient` class with proper session management\n- Implement full MCP 2024-11-05 handshake: `initialize` → `notifications/initialized`\n- Parse `mcp-session-id` from response headers and reuse across calls\n- Add SSE (`text/event-stream`) response parsing\n- Type hints, improved docstrings, singleton pattern\n- Timeouts: initialize 60s, tools 120s\n\n### v2.0.1 — 2026-04-08\n- **Security fix**: Remove all `localhost:3000` signer API references\n- Remove `DUNE_API_KEY` environment variable dependency\n- Strip all trading/execution code and legacy local modules\n- Simplify config to MCP endpoint only\n- Confirm `env: []` — no local API keys required\n\n### v2.0.0 — 2026-04-08 ⚠️ *Breaking change*\n- Full architecture rewrite: local discovery/trading modules → thin MCP client wrapper\n- New commands: `discover`, `analyze`, `compare`, `feedback`, `confirm-intent`, `get-intent`\n- Natural language query support\n- Intent clarification flow\n- Remove all local API key dependencies\n\n### v0.5.x — 2026-03-29 to 2026-03-30\n- Legacy versions with local service architecture (deprecated)\n- Various metadata format fixes for ClawHub compatibility\n\n---\n\n## License\n\nMIT — [Antalpha AI Team](https://www.antalpha.com/)\n\n---\n\n---\n\n<a name=\"chinese\"></a>\n\n# Web3 Investor Skill（中文文档）\n\nAI 驱动的 DeFi 收益发现与分析技能。支持在 Ethereum、Base、Arbitrum、Optimism 四条链上发现、分析和对比投资机会，所有数据通过 Antalpha 远端 MCP 服务器获取，**无需本地 API Key**。\n\n---\n\n## 安装\n\n```bash\nopenclaw skill install https://github.com/AntalphaAI/web3-investor\n```\n\n### 通过 ClawHub 安装\n\n```bash\nclawhub install web3-investor\n```\n\n> 依赖 [OpenClaw](https://www.antalpha.com/)，Python 3.7+。  \n> 无需配置任何环境变量。\n\n---\n\n## 功能介绍\n\n### 1. 机会发现（`discover`）\n在多条链上搜索 DeFi 收益机会，支持灵活过滤：\n- 按链筛选：`ethereum`、`base`、`arbitrum`、`optimism`\n- 按最低 / 最高 APY 筛选\n- 仅限稳定币模式\n- 自然语言查询（如\"帮我找 Base 上安全稳健的收益\"）\n- 会话感知：跨调用记忆你的偏好\n\n### 2. 深度分析（`analyze`）\n对单一投资产品进行详细解析：\n- 支持 basic / detailed / full 三个分析深度\n- 历史表现数据\n- LLM 生成的投资洞察\n- 可跳过历史数据以加速响应\n\n### 3. 多产品对比（`compare`）\n同时对比 2 个及以上投资产品：\n- 统一指标横向对比\n- 综合分析报告\n- 最终推荐建议\n\n### 4. 意图澄清流程（`confirm-intent` / `get-intent`）\n当查询语义不明时，服务端返回澄清问题，Agent 会：\n1. 向用户展示选项\n2. 调用 `confirm-intent` 锁定偏好（风险等级、资金属性、流动性需求）\n3. 携带已存储意图重新执行发现\n\n### 5. 反馈回路（`feedback`）\n对任何推荐结果提交反馈：\n- 结果类型：`helpful`（有帮助）、`not_helpful`（无帮助）、`invested`（已投资）、`dismissed`（忽略）\n- 可附加文字原因\n- 反馈数据用于服务端推荐质量优化\n\n---\n\n## 命令与用法\n\n### discover — 发现机会\n```bash\npython3 scripts/mcp_client.py discover \\\n  --chain <ethereum|base|arbitrum|optimism> \\\n  --min-apy <数字> \\\n  [--max-apy <数字>] \\\n  [--stablecoin-only] \\\n  [--limit <1-10>] \\\n  [--session-id <id>] \\\n  [--natural-language \"<查询语句>\"]\n```\n\n### analyze — 深度分析\n```bash\npython3 scripts/mcp_client.py analyze \\\n  --product-id <产品ID> \\\n  [--depth basic|detailed|full] \\\n  [--no-history]\n```\n\n### compare — 多产品对比\n```bash\npython3 scripts/mcp_client.py compare \\\n  --ids <id1> <id2> [<id3> ...]\n```\n\n### feedback — 提交反馈\n```bash\npython3 scripts/mcp_client.py feedback \\\n  --product-id <产品ID> \\\n  --feedback <helpful|not_helpful|invested|dismissed> \\\n  [--reason \"<原因文字>\"]\n```\n\n### confirm-intent — 确认用户意图\n```bash\npython3 scripts/mcp_client.py confirm-intent \\\n  --session-id <id> \\\n  --type <意图类型> \\\n  --risk <conservative|moderate|aggressive> \\\n  [--capital-nature <属性>] \\\n  [--liquidity-need <需求>]\n```\n\n### get-intent — 获取已存储意图\n```bash\npython3 scripts/mcp_client.py get-intent \\\n  --session-id <id>\n```\n\n---\n\n## MCP 工具一览\n\n| 工具 | 用途 | 关键返回字段 |\n|------|------|-------------|\n| `investor_discover` | 发现收益机会 | `recommendations[]`, `intent{}`, `search_stats` |\n| `investor_analyze` | 单产品深度分析 | `product{}`, `historical_data`, `llm_insights` |\n| `investor_compare` | 多产品横向对比 | `products[]`, `comparisons[]`, `recommendation` |\n| `investor_feedback` | 提交反馈 | `acknowledged` |\n| `investor_confirm_intent` | 锁定用户意图 | `acknowledged`, `session_id` |\n| `investor_get_stored_intent` | 获取已存储意图 | `found`, `intent{}` |\n\n---\n\n## 使用示例\n\n**发现并分析：**\n```\n用户：帮我找 Base 上 APY > 5% 的 ETH 借贷\n→ discover --chain base --min-apy 5\n\n用户：分析排名第一的产品\n→ analyze --product-id aave-eth-base --depth detailed\n```\n\n**对比两个产品：**\n```\n→ compare --ids aave-usdc-base compound-usdc-ethereum\n```\n\n**意图澄清流程：**\n```\n用户：我想投资 DeFi\n→ discover --natural-language \"我想投资 DeFi\"\n  [服务端返回 NEEDS_CLARIFICATION]\n\n用户：稳定币，中等风险，1个月期限\n→ confirm-intent --session-id <id> --type stablecoin --risk moderate\n→ discover --session-id <id>\n```\n\n---\n\n## 架构说明\n\n```\nweb3-investor/\n├── scripts/\n│   └── mcp_client.py     # 轻量 MCP 客户端封装\n├── config/\n│   └── config.json       # MCP 服务端地址配置\n└── SKILL.md              # Agent 技能定义文件\n```\n\n- 所有业务逻辑运行在远端 MCP 服务器：`https://mcp-skills.ai.antalpha.com/mcp`\n- 本地客户端仅负责：MCP 会话握手、请求路由、SSE 响应解析\n- 无本地 API Key，无本地数据存储\n\n## 安全说明\n\n- 所有 API Key 由服务端统一管理\n- 本地不存储任何敏感数据\n- MCP 会话协议：`initialize` → `notifications/initialized` → `tools/call`（携带 `Mcp-Session-Id` header）\n\n---\n\n## 版本更新说明\n\n### v2.0.3 — 2026-04-08\n- 添加 `homepage` 元数据，改善 ClawHub 信任评分\n- 无功能性变更\n\n### v2.0.2 — 2026-04-08 ⭐ *推荐基准版本*\n- **修复关键连接 Bug**：彻底解决 \"No valid session ID provided\" 错误\n- 新增 `MCPClient` 类，实现完整会话管理\n- 实现标准 MCP 2024-11-05 握手流程：`initialize` → `notifications/initialized`\n- 从响应头提取并复用 `mcp-session-id`\n- 新增 SSE（`text/event-stream`）响应解析\n- 完善类型注解、文档字符串，采用单例模式\n- 超时配置：初始化 60s，工具调用 120s\n\n### v2.0.1 — 2026-04-08\n- **安全修复**：移除所有 `localhost:3000` 签名 API 引用\n- 移除 `DUNE_API_KEY` 环境变量依赖\n- 删除所有交易执行代码和历史遗留本地模块\n- 简化 config 仅保留 MCP 端点配置\n- 确认 `env: []`，无需任何本地 API Key\n\n### v2.0.0 — 2026-04-08 ⚠️ *破坏性变更*\n- 架构全量重写：本地发现/交易模块 → 轻量 MCP 客户端封装\n- 新增 6 条命令：`discover`、`analyze`、`compare`、`feedback`、`confirm-intent`、`get-intent`\n- 支持自然语言查询\n- 支持意图澄清流程\n- 移除所有本地 API Key 依赖\n\n### v0.5.x — 2026-03-29 至 2026-03-30\n- 旧版本，采用本地服务架构（已废弃）\n- 多次修复 ClawHub 元数据格式兼容性问题\n\n---\n\n## 开源协议\n\nMIT — [Antalpha AI 团队](https://www.antalpha.com/)\n\nFile v3.7.2:_meta.json\n\n{\n  \"ownerId\": \"kn7fy7jd9vd0x7wvpxgfxye1pn827f50\",\n  \"slug\": \"web3-investor\",\n  \"version\": \"3.7.2\",\n  \"publishedAt\": 1776048683783\n}\n\nFile v3.7.2:references/mcp-servers.md\n\n# MCP Servers for Web3 Data\n\nThis document lists MCP (Model Context Protocol) servers that provide Web3 data.\n\n## What is MCP?\n\nModel Context Protocol is a standardized way for AI models to access external data sources. MCP servers act as bridges between AI agents and blockchain data.\n\n## Recommended MCP Servers\n\n### 1. Ethereum MCP\n- **Repository**: https://github.com/your-org/ethereum-mcp\n- **Capabilities**: Balance queries, transaction simulation, contract reads\n- **Setup**: `npx ethereum-mcp --rpc-url YOUR_RPC_URL`\n- **Free**: Yes (uses your RPC)\n\n### 2. Etherscan MCP\n- **Repository**: https://github.com/your-org/etherscan-mcp\n- **Capabilities**: Transaction history, contract verification, token info\n- **Setup**: `ETHERSCAN_API_KEY=xxx npx etherscan-mcp`\n- **Free**: Yes (free tier available)\n\n### 3. DefiLlama MCP\n- **Repository**: https://github.com/your-org/defillama-mcp\n- **Capabilities**: TVL data, yield rankings, protocol info\n- **Setup**: `npx defillama-mcp`\n- **Free**: Yes (no API key required)\n\n### 4. Dune Analytics MCP\n- **Repository**: https://github.com/your-org/dune-mcp\n- **Capabilities**: Custom SQL queries on blockchain data\n- **Setup**: `DUNE_API_KEY=xxx npx dune-mcp`\n- **Free**: Free tier available (limited queries)\n\n## Integration Pattern\n\n```python\n# Check MCP availability first, fall back to direct API\nasync def get_tvl(protocol: str) -> float:\n    if mcp_available(\"defillama\"):\n        return await mcp_query(\"defillama\", \"get_tvl\", protocol)\n    else:\n        return await defillama_api_get_tvl(protocol)\n```\n\n## Adding New MCP Servers\n\nWhen adding new MCP servers:\n1. Verify the server supports standard MCP protocol\n2. Test with `mcp-inspector` tool\n3. Document required environment variables\n4. Add fallback logic for when MCP is unavailable\n\nFile v3.7.2:references/protocols.md\n\n# Known Protocol Registry\n\nThis document contains metadata for common DeFi protocols on Ethereum mainnet.\n\n## Lending Protocols\n\n### Aave V3\n- **Contract**: 0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2\n- **Category**: Lending\n- **Risk Level**: Low\n- **Audit**: Multiple (OpenZeppelin, Trail of Bits)\n- **TVL**: > $5B (check DefiLlama for current)\n- **Docs**: https://docs.aave.com/\n\n### Compound V3\n- **Contract**: 0xc3d688B66703497DAA19211EEdff47f25384cdc3\n- **Category**: Lending\n- **Risk Level**: Low\n- **Audit**: Multiple (OpenZeppelin)\n- **TVL**: > $2B\n- **Docs**: https://docs.compound.finance/\n\n### MakerDAO (Spark)\n- **Contract**: Various (see docs)\n- **Category**: Lending\n- **Risk Level**: Low\n- **Audit**: Multiple\n- **TVL**: > $8B\n- **Docs**: https://docs.makerdao.com/\n\n## Liquid Staking\n\n### Lido (stETH)\n- **Contract**: 0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84\n- **Category**: Liquid Staking\n- **Risk Level**: Low\n- **Audit**: Multiple (Quantstamp, MixBytes)\n- **TVL**: > $15B\n- **Docs**: https://docs.lido.fi/\n\n### Rocket Pool (rETH)\n- **Contract**: 0xae78736Cd615f374D3085123A210448E74Fc6393\n- **Category**: Liquid Staking\n- **Risk Level**: Low\n- **Audit**: Multiple (Sigma Prime)\n- **TVL**: > $2B\n- **Docs**: https://docs.rocketpool.net/\n\n## DEXs\n\n### Uniswap V3\n- **Factory**: 0x1F98431c8aD98523631AE4a59f267346ea31F984\n- **Category**: DEX\n- **Risk Level**: Low\n- **Audit**: Multiple\n- **TVL**: > $4B\n- **Docs**: https://docs.uniswap.org/\n\n### Curve Finance\n- **Contract**: 0xD533a949740bb3306d119CC777fa900bA034cd52\n- **Category**: DEX (Stablecoins)\n- **Risk Level**: Low\n- **Audit**: Multiple\n- **TVL**: > $2B\n- **Docs**: https://docs.curve.fi/\n\n## Yield Aggregators\n\n### Yearn V3\n- **Registry**: 0x3c91D8ba3C8cB06D9CFe5b8F31c68a746f0f15B6\n- **Category**: Yield Aggregator\n- **Risk Level**: Medium\n- **Audit**: Multiple\n- **TVL**: Variable\n- **Docs**: https://docs.yearn.fi/\n\n## Protocol Metadata Schema\n\n```json\n{\n  \"name\": \"Protocol Name\",\n  \"address\": \"0x...\",\n  \"chain\": \"ethereum\",\n  \"category\": \"lending|dex|staking|aggregator\",\n  \"risk_level\": \"low|medium|high\",\n  \"audit_status\": \"multiple|single|community|none\",\n  \"tvl\": 1000000000,\n  \"maturity_days\": 730,\n  \"has_timelock\": true,\n  \"governance\": \"dao|multisig|admin\",\n  \"docs_url\": \"https://...\",\n  \"icon_url\": \"https://...\"\n}\n```\n\n## Adding New Protocols\n\nTo add a new protocol, create a JSON file in `config/protocols/`:\n\n```json\n{\n  \"name\": \"New Protocol\",\n  \"address\": \"0x...\",\n  \"chain\": \"ethereum\",\n  \"category\": \"lending\",\n  \"risk_level\": \"medium\",\n  \"audit_status\": \"single\",\n  \"docs_url\": \"https://...\"\n}\n```\n\nThen run:\n```bash\npython scripts/discovery/analyze_protocol.py --add-config config/protocols/new-protocol.json\n```\n\nFile v3.7.2:references/risk-framework.md\n\n# Risk Assessment Framework\n\n## Risk Levels\n\n| Level | Score | Description | Typical Characteristics |\n|-------|-------|-------------|------------------------|\n| **Low** | 0-3 | Blue-chip, battle-tested | TVL > $1B, Audited, 2+ years\n\nArchive v2.0.3: 9 files, 11716 bytes\n\nFiles: config/config.json (181b), config/protocols.json (4175b), config/schema.json (942b), references/mcp-servers.md (1791b), references/protocols.md (2715b), references/risk-framework.md (2677b), scripts/mcp_client.py (13143b), SKILL.md (5971b), _meta.json (132b)\n\nArchive v2.0.2: 9 files, 11700 bytes\n\nFiles: config/config.json (181b), config/protocols.json (4175b), config/schema.json (942b), references/mcp-servers.md (1791b), references/protocols.md (2715b), references/risk-framework.md (2677b), scripts/mcp_client.py (13143b), SKILL.md (5935b), _meta.json (132b)\n\nArchive v2.0.1: 9 files, 10795 bytes\n\nFiles: config/config.json (181b), config/protocols.json (4175b), config/schema.json (942b), references/mcp-servers.md (1791b), references/protocols.md (2715b), references/risk-framework.md (2677b), scripts/mcp_client.py (9255b), SKILL.md (5935b), _meta.json (132b)\n\nArchive v2.0.0: 18 files, 33701 bytes\n\nFiles: assets/templates/opportunity-report.md (2538b), assets/templates/portfolio-report.md (2784b), config/config.json (1643b), config/protocols.json (4175b), config/schema.json (11704b), references/mcp-servers.md (1791b), references/protocols.md (2715b), references/risk-framework.md (2677b), scripts/mcp_client.py (9255b), scripts/schemas/__init__.py (0b), scripts/schemas/output_schema.py (11794b), scripts/utils/__init__.py (0b), scripts/utils/preflight.py (22874b), scripts/utils/rpc_manager.py (13859b), SKILL.md (5935b), tests/run_tests.py (10835b), tests/test_find_opportunities.py (14991b), _meta.json (132b)\n\nArchive v0.5.11: 38 files, 108211 bytes\n\nFiles: assets/templates/opportunity-report.md (2538b), assets/templates/portfolio-report.md (2784b), CHANGELOG.md (11569b), config/config.json (1643b), config/protocols.json (4175b), config/schema.json (11704b), references/discovery.md (2972b), references/investment-profile.md (2687b), references/mcp-servers.md (1791b), references/portfolio-indexer.md (1380b), references/protocols.md (2715b), references/risk-framework.md (2677b), references/safe-vault-spec.md (8762b), references/trade-executor.md (6143b), scripts/discovery/analyze_protocol.py (14610b), scripts/discovery/dune_mcp.py (9860b), scripts/discovery/find_opportunities.py (30307b), scripts/discovery/investment_profile.py (13979b), scripts/discovery/unified_search.py (15156b), scripts/portfolio/indexer.py (10780b), scripts/schemas/__init__.py (0b), scripts/schemas/output_schema.py (11794b), scripts/trading/eip681_payment.py (10215b), scripts/trading/preflight.py (7835b), scripts/trading/safe_vault.py (23494b), scripts/trading/simulate_tx.py (1300b), scripts/trading/trade_executor.py (42395b), scripts/trading/whitelist.py (4583b), scripts/utils/__init__.py (0b), scripts/utils/preflight.py (22874b), scripts/utils/rpc_manager.py (13859b), SETUP.md (5051b), SIGNER_API_SPEC.md (9305b), SKILL.md (12425b), tests/run_tests.py (10835b), tests/test_find_opportunities.py (14991b), TODO.md (4657b), _meta.json (133b)\n\nArchive v0.5.10: 38 files, 108209 bytes\n\nFiles: assets/templates/opportunity-report.md (2538b), assets/templates/portfolio-report.md (2784b), CHANGELOG.md (11569b), config/config.json (1643b), config/protocols.json (4175b), config/schema.json (11704b), references/discovery.md (2972b), references/investment-profile.md (2687b), references/mcp-servers.md (1791b), references/portfolio-indexer.md (1380b), references/protocols.md (2715b), references/risk-framework.md (2677b), references/safe-vault-spec.md (8762b), references/trade-executor.md (6143b), scripts/discovery/analyze_protocol.py (14610b), scripts/discovery/dune_mcp.py (9860b), scripts/discovery/find_opportunities.py (30307b), scripts/discovery/investment_profile.py (13979b), scripts/discovery/unified_search.py (15156b), scripts/portfolio/indexer.py (10780b), scripts/schemas/__init__.py (0b), scripts/schemas/output_schema.py (11794b), scripts/trading/eip681_payment.py (10215b), scripts/trading/preflight.py (7835b), scripts/trading/safe_vault.py (23494b), scripts/trading/simulate_tx.py (1300b), scripts/trading/trade_executor.py (42395b), scripts/trading/whitelist.py (4583b), scripts/utils/__init__.py (0b), scripts/utils/preflight.py (22874b), scripts/utils/rpc_manager.py (13859b), SETUP.md (5051b), SIGNER_API_SPEC.md (9305b), SKILL.md (12425b), tests/run_tests.py (10835b), tests/test_find_opportunities.py (14991b), TODO.md (4657b), _meta.json (133b)","readmeExcerpt":"Skill: Web3 Investor Owner: bevanding Summary: AI-native DeFi investment intelligence. Discover, analyze, and compare yield opportunities across 2,500+ protocols with intent-aware search, LLM-powered deep... Tags: latest:3.8.2 Version history: v3.8.2 | 2026-04-14T12:31:39.943Z | auto No changes detected in this version. - Version number updated to 3.8.2. - No code or documentation changes present. v3.8.1 | 2026-04-14","codeSnippets":[],"executableExamples":[{"language":"text","snippet":"\"I want stablecoin yield, conservative risk, on Ethereum\"\n→ 5 personalized recommendations with full risk analysis in 3 seconds"},{"language":"text","snippet":"User Intent (natural language)\n  │\n  ├─ 1. Intent Classification (keyword + LLM fusion)\n  │    Extract: asset type, risk level, chain, time horizon,\n  │            position size, liquidity needs, implicit constraints\n  │\n  ├─ 2. Intent Gate (NEEDS_CLARIFICATION or PASS)\n  │    If ambiguous → ask user a focused question\n  │    If clear → proceed with accumulated context (multi-round session)\n  │\n  ├─ 3. Discovery Engine (DeFiLlama + Dune Analytics + CoinGecko)\n  │    Fetch 200+ candidates → filter by chain, TVL, risk threshold\n  │    → deduplicate → rank by risk-adjusted score\n  │\n  ├─ 4. Risk Scoring (7 dimensions, 0-100)\n  │    TVL, audit status, chain maturity, yield sustainability,\n  │    deposit token safety, reward token safety, protocol trust\n  │    → composite risk level: LOW / MEDIUM / HIGH / VERY_HIGH\n  │\n  ├─ 5. DeFi Security Scan\n  │    AI-powered contract scanner → scam detection → critical issue flag\n  │\n  ├─ 6. Smart Money Sentiment (Dune Analytics)\n  │    Track whale/fund flows → inflow/outflow signal\n  │\n  ├─ 7. Recommendation Explanation\n  │    \"Why this product?\" — benchmarked vs bank deposits,\n  │    risk classification (controllable vs uncontrollable),\n  │    honest alternatives if a better option exists\n  │\n  └─ Output: Ranked recommendations with full context"},{"language":"text","snippet":"Round 1:\n  User: \"Find me good yields\"\n  Agent: \"What's your risk tolerance? [Conservative] [Moderate] [Aggressive]\"\n  → Session stores partial intent\n\nRound 2:\n  User: \"Conservative, stablecoins only\"\n  Agent: (accumulates Round 1 + Round 2 intent)\n  → Returns conservative stablecoin recommendations on Ethereum"},{"language":"json","snippet":"{\n  \"agent_id\": \"uuid\",\n  \"natural_language\": \"stablecoin yield, conservative risk, Ethereum\",\n  \"structured_preferences\": {\n    \"chain\": \"ethereum\",\n    \"min_apy\": 5,\n    \"asset_type\": \"stablecoin\"\n  },\n  \"limit\": 5\n}"},{"language":"json","snippet":"{\n  \"gate_status\": \"PASS\",\n  \"recommendations\": [{\n    \"name\": \"Aave V3 USDC\",\n    \"yield\": { \"apy\": 5.2, \"apy_base\": 2.8, \"apy_reward\": 2.4 },\n    \"scale\": { \"tvl_usd\": 1500000000 },\n    \"risk\": {\n      \"risk_level\": \"LOW\",\n      \"risk_score\": 82,\n      \"risk_factors\": { \"tvl_score\": 95, \"audit_score\": 90, ... },\n      \"warnings\": []\n    },\n    \"data_quality\": { \"score\": 95, \"level\": \"HIGH\", \"cross_validated\": true },\n    \"incentive\": { \"score\": \"medium\", \"reward_ratio\": 0.46 },\n    \"smart_money\": { \"flow\": \"inflow\", \"sentiment_score\": 0.72, \"confidence\": \"high\" },\n    \"explanation\": {\n      \"summary\": \"Aave V3 USDC: 5.2% APY, TVL $1.5B\",\n      \"reasons\": { \"for\": [...], \"against\": [...] },\n      \"compared_to\": { \"benchmark\": \"US bank savings (4.0%)\", \"outperformance\": \"1.3x\" },\n      \"risks\": { \"controllable\": [\"随时可赎回\"], \"uncontrollable\": [\"智能合约风险\"] }\n    }\n  }],\n  \"search_stats\": {\n    \"total_candidates\": 247,\n    \"total_after_risk_filter\": 89,\n    \"final_recommendations\": 5,\n    \"filters_applied\": [\"defillama_fetch:ethereum\", \"intent_filter:STABLECOIN\", \"risk_scoring\", \"dust_filter:50000\"]\n  }\n}"},{"language":"text","snippet":"Step 1: Yield Source Analysis\n  → Is this APY from trading fees (sustainable) or token emissions (unsustainable)?\n  → APY breakdown: base yield vs reward yield ratio\n\nStep 2: Sustainability Assessment\n  → Historical APY trend (7d / 30d / 90d)\n  → APY volatility (standard deviation)\n  → Revenue coverage (can the protocol afford these rewards?)\n\nStep 3: Risk Narrative\n  → Comprehensive risk story, not just a score\n  → Smart money sentiment overlay\n  → DeFi security scan results (scam flags, critical issues)\n\nStep 4: Competitive Position\n  → How does this compare to peers in the same category?\n  → Protocol profile: governance, longevity, audit history\n\nStep 5: Investor Considerations\n  → Actionable guidance for the specific investor profile\n  → Key risks and key positives\n  → \"If you're conservative, consider X. If aggressive, consider Y.\""}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: web3-investor\nversion: 3.8.0\ndescription: AI-native DeFi investment intelligence. Discover, analyze, and compare yield opportunities across 2,500+ protocols with intent-aware search, LLM-powered deep analysis, 7-dimension risk scoring, DeFi security scanning, smart money sentiment, and multi-round conversational refinement. All intelligence runs server-side — zero API keys on the client.\nauthor: Antalpha AI Team\nhomepage: https://www.antalpha.com/\nmetadata:\n  openclaw:\n    requires:\n      bins: [\"python3\"]\n    mcp:\n      antalpha-skills:\n        url: https://mcp-skills.ai.antalpha.com/mcp\n        tools:\n          - antalpha-register\n          - investor_discover\n          - investor_analyze\n          - investor_compare\n    security_notes:\n      - All queries are sent to the Antalpha MCP server (mcp-skills.ai.antalpha.com)\n      - Zero API keys required on the client side\n      - All trading is zero-custody — private keys never leave the user's wallet\n      - User investment intent is processed server-side for analysis\n---\n\n# Web3 Investor\n\n> **Your AI-powered DeFi research analyst.** Not a dashboard — a thinker.\n\nWeb3 Investor turns vague investment intent into structured, risk-aware recommendations. It doesn't just fetch APY data — it *understands* what you're looking for, scores every opportunity across 7 risk dimensions, cross-references smart money flows, scans for contract vulnerabilities, and explains its reasoning in plain English.\n\n---\n\n## The Problem It Solves\n\nDeFi yield farming today looks like this:\n\n1. Open DeFiLlama → see 2,500+ pools → overwhelming\n2. Check audits, TVL, APY trend, IL risk — each on a different site\n3. Cross-reference with Twitter sentiment and whale wallets\n4. Try to figure out if the yield is sustainable or just emission bait\n5. **Give up and put money in USDC savings at 4%**\n\nWeb3 Investor collapses this into **one natural-language request**:\n\n```\n\"I want stablecoin yield, conservative risk, on Ethereum\"\n→ 5 personalized recommendations with full risk analysis in 3 seconds\n```\n\n---\n\n## 🧠 How It Works\n\n### The Intelligence Pipeline\n\n```\nUser Intent (natural language)\n  │\n  ├─ 1. Intent Classification (keyword + LLM fusion)\n  │    Extract: asset type, risk level, chain, time horizon,\n  │            position size, liquidity needs, implicit constraints\n  │\n  ├─ 2. Intent Gate (NEEDS_CLARIFICATION or PASS)\n  │    If ambiguous → ask user a focused question\n  │    If clear → proceed with accumulated context (multi-round session)\n  │\n  ├─ 3. Discovery Engine (DeFiLlama + Dune Analytics + CoinGecko)\n  │    Fetch 200+ candidates → filter by chain, TVL, risk threshold\n  │    → deduplicate → rank by risk-adjusted score\n  │\n  ├─ 4. Risk Scoring (7 dimensions, 0-100)\n  │    TVL, audit status, chain maturity, yield sustainability,\n  │    deposit token safety, reward token safety, protocol trust\n  │    → composite risk level: LOW / MEDIUM / HIGH / VERY_HIGH\n  │\n  ├─ 5. DeFi Security Scan\n  │    AI-powered contract sca"},{"path":"README.md","content":"# Web3 Investor Skill\n\n> **English** | [中文](#chinese)\n\nAI-friendly DeFi investment intelligence skill. Discover, analyze, and compare yield opportunities across Ethereum, Base, Arbitrum, and Optimism — powered by Antalpha's remote MCP server. No API keys needed.\n\n---\n\n## Installation\n\n```bash\nopenclaw skill install https://github.com/AntalphaAI/web3-investor\n```\n\n### Install via ClawHub\n\n```bash\nclawhub install web3-investor\n```\n\n> Requires [OpenClaw](https://www.antalpha.com/) with Python 3.7+.  \n> No environment variables required — all data is fetched from the remote MCP server.\n\n---\n\n## Features\n\n### 1. Opportunity Discovery (`discover`)\nSearch for DeFi yield opportunities across chains with flexible filters:\n- Filter by chain: `ethereum`, `base`, `arbitrum`, `optimism`\n- Filter by minimum / maximum APY\n- Stablecoin-only mode\n- Natural language query support (e.g. \"I want safe yields on Base\")\n- Session-aware: remembers your preferences across calls\n\n### 2. Deep Analysis (`analyze`)\nGet a detailed breakdown of any single investment product:\n- Basic / detailed / full depth levels\n- Historical performance data\n- LLM-generated insights\n- Optional: skip history for faster response\n\n### 3. Multi-Product Comparison (`compare`)\nSide-by-side comparison of 2 or more products:\n- Unified metrics table\n- Comparative analysis\n- Final recommendation\n\n### 4. Intent Clarification Flow (`confirm-intent` / `get-intent`)\nWhen a query is ambiguous, the server returns a clarification request. The agent:\n1. Presents clarification options to the user\n2. Calls `confirm-intent` to lock in preferences (risk profile, capital nature, liquidity need)\n3. Re-runs discovery with the stored intent\n\n### 5. Feedback Loop (`feedback`)\nSubmit feedback on any recommendation:\n- Outcomes: `helpful`, `not_helpful`, `invested`, `dismissed`\n- Optional free-text reason\n- Feeds back into server-side recommendation quality\n\n---\n\n## Commands & Usage\n\n### discover\n```bash\npython3 scripts/mcp_client.py discover \\\n  --chain <ethereum|base|arbitrum|optimism> \\\n  --min-apy <number> \\\n  [--max-apy <number>] \\\n  [--stablecoin-only] \\\n  [--limit <1-10>] \\\n  [--session-id <id>] \\\n  [--natural-language \"<query>\"]\n```\n\n### analyze\n```bash\npython3 scripts/mcp_client.py analyze \\\n  --product-id <id> \\\n  [--depth basic|detailed|full] \\\n  [--no-history]\n```\n\n### compare\n```bash\npython3 scripts/mcp_client.py compare \\\n  --ids <id1> <id2> [<id3> ...]\n```\n\n### feedback\n```bash\npython3 scripts/mcp_client.py feedback \\\n  --product-id <id> \\\n  --feedback <helpful|not_helpful|invested|dismissed> \\\n  [--reason \"<text>\"]\n```\n\n### confirm-intent\n```bash\npython3 scripts/mcp_client.py confirm-intent \\\n  --session-id <id> \\\n  --type <intent_type> \\\n  --risk <conservative|moderate|aggressive> \\\n  [--capital-nature <nature>] \\\n  [--liquidity-need <need>]\n```\n\n### get-intent\n```bash\npython3 scripts/mcp_client.py get-intent \\\n  --session-id <id>\n```\n\n---\n\n## MCP Tools Reference\n\n| Tool | Purpose | Key Response Fields |\n"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7fy7jd9vd0x7wvpxgfxye1pn827f50\",\n  \"slug\": \"web3-investor\",\n  \"version\": \"3.8.2\",\n  \"publishedAt\": 1776169899943\n}"},{"path":"references/mcp-servers.md","content":"# MCP Servers for Web3 Data\n\nThis document lists MCP (Model Context Protocol) servers that provide Web3 data.\n\n## What is MCP?\n\nModel Context Protocol is a standardized way for AI models to access external data sources. MCP servers act as bridges between AI agents and blockchain data.\n\n## Recommended MCP Servers\n\n### 1. Ethereum MCP\n- **Repository**: https://github.com/your-org/ethereum-mcp\n- **Capabilities**: Balance queries, transaction simulation, contract reads\n- **Setup**: `npx ethereum-mcp --rpc-url YOUR_RPC_URL`\n- **Free**: Yes (uses your RPC)\n\n### 2. Etherscan MCP\n- **Repository**: https://github.com/your-org/etherscan-mcp\n- **Capabilities**: Transaction history, contract verification, token info\n- **Setup**: `ETHERSCAN_API_KEY=xxx npx etherscan-mcp`\n- **Free**: Yes (free tier available)\n\n### 3. DefiLlama MCP\n- **Repository**: https://github.com/your-org/defillama-mcp\n- **Capabilities**: TVL data, yield rankings, protocol info\n- **Setup**: `npx defillama-mcp`\n- **Free**: Yes (no API key required)\n\n### 4. Dune Analytics MCP\n- **Repository**: https://github.com/your-org/dune-mcp\n- **Capabilities**: Custom SQL queries on blockchain data\n- **Setup**: `DUNE_API_KEY=xxx npx dune-mcp`\n- **Free**: Free tier available (limited queries)\n\n## Integration Pattern\n\n```python\n# Check MCP availability first, fall back to direct API\nasync def get_tvl(protocol: str) -> float:\n    if mcp_available(\"defillama\"):\n        return await mcp_query(\"defillama\", \"get_tvl\", protocol)\n    else:\n        return await defillama_api_get_tvl(protocol)\n```\n\n## Adding New MCP Servers\n\nWhen adding new MCP servers:\n1. Verify the server supports standard MCP protocol\n2. Test with `mcp-inspector` tool\n3. Document required environment variables\n4. Add fallback logic for when MCP is unavailable"},{"path":"references/protocols.md","content":"# Known Protocol Registry\n\nThis document contains metadata for common DeFi protocols on Ethereum mainnet.\n\n## Lending Protocols\n\n### Aave V3\n- **Contract**: 0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2\n- **Category**: Lending\n- **Risk Level**: Low\n- **Audit**: Multiple (OpenZeppelin, Trail of Bits)\n- **TVL**: > $5B (check DefiLlama for current)\n- **Docs**: https://docs.aave.com/\n\n### Compound V3\n- **Contract**: 0xc3d688B66703497DAA19211EEdff47f25384cdc3\n- **Category**: Lending\n- **Risk Level**: Low\n- **Audit**: Multiple (OpenZeppelin)\n- **TVL**: > $2B\n- **Docs**: https://docs.compound.finance/\n\n### MakerDAO (Spark)\n- **Contract**: Various (see docs)\n- **Category**: Lending\n- **Risk Level**: Low\n- **Audit**: Multiple\n- **TVL**: > $8B\n- **Docs**: https://docs.makerdao.com/\n\n## Liquid Staking\n\n### Lido (stETH)\n- **Contract**: 0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84\n- **Category**: Liquid Staking\n- **Risk Level**: Low\n- **Audit**: Multiple (Quantstamp, MixBytes)\n- **TVL**: > $15B\n- **Docs**: https://docs.lido.fi/\n\n### Rocket Pool (rETH)\n- **Contract**: 0xae78736Cd615f374D3085123A210448E74Fc6393\n- **Category**: Liquid Staking\n- **Risk Level**: Low\n- **Audit**: Multiple (Sigma Prime)\n- **TVL**: > $2B\n- **Docs**: https://docs.rocketpool.net/\n\n## DEXs\n\n### Uniswap V3\n- **Factory**: 0x1F98431c8aD98523631AE4a59f267346ea31F984\n- **Category**: DEX\n- **Risk Level**: Low\n- **Audit**: Multiple\n- **TVL**: > $4B\n- **Docs**: https://docs.uniswap.org/\n\n### Curve Finance\n- **Contract**: 0xD533a949740bb3306d119CC777fa900bA034cd52\n- **Category**: DEX (Stablecoins)\n- **Risk Level**: Low\n- **Audit**: Multiple\n- **TVL**: > $2B\n- **Docs**: https://docs.curve.fi/\n\n## Yield Aggregators\n\n### Yearn V3\n- **Registry**: 0x3c91D8ba3C8cB06D9CFe5b8F31c68a746f0f15B6\n- **Category**: Yield Aggregator\n- **Risk Level**: Medium\n- **Audit**: Multiple\n- **TVL**: Variable\n- **Docs**: https://docs.yearn.fi/\n\n## Protocol Metadata Schema\n\n```json\n{\n  \"name\": \"Protocol Name\",\n  \"address\": \"0x...\",\n  \"chain\": \"ethereum\",\n  \"category\": \"lending|dex|staking|aggregator\",\n  \"risk_level\": \"low|medium|high\",\n  \"audit_status\": \"multiple|single|community|none\",\n  \"tvl\": 1000000000,\n  \"maturity_days\": 730,\n  \"has_timelock\": true,\n  \"governance\": \"dao|multisig|admin\",\n  \"docs_url\": \"https://...\",\n  \"icon_url\": \"https://...\"\n}\n```\n\n## Adding New Protocols\n\nTo add a new protocol, create a JSON file in `config/protocols/`:\n\n```json\n{\n  \"name\": \"New Protocol\",\n  \"address\": \"0x...\",\n  \"chain\": \"ethereum\",\n  \"category\": \"lending\",\n  \"risk_level\": \"medium\",\n  \"audit_status\": \"single\",\n  \"docs_url\": \"https://...\"\n}\n```\n\nThen run:\n```bash\npython scripts/discovery/analyze_protocol.py --add-config config/protocols/new-protocol.json\n```"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":"AI-native DeFi investment intelligence. Discover, analyze, and compare yield opportunities across 2,500+ protocols with intent-aware search, LLM-powered deep... Skill: Web3 Investor Owner: bevanding Summary: AI-native DeFi investment intelligence. Discover, analyze, and compare yield opportunities across 2,500+ protocols with intent-aware search, LLM-powered deep... Tags: latest:3.8.2 Version history: v3.8.2 | 2026-04-14T12:31:39.943Z | auto No changes detected in this version. - Version number updated to 3.8.2. - No code or documentation changes present. v3.8.1 | 2026-04-14","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":1238,"uniquenessScore":50,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-10T04:26:24.322Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-10T04:26:24.322Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-10T08:09:34.589Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}