AI-native DeFi investment intelligence. Discover, analyze, and compare yield opportunities across 2,500+ protocols with intent-aware search, LLM-powered deep...
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install web3-investor或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install web3-investor⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/web3-investor/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: web3-investor description: AI-friendly Web3 investment infrastructure for autonomous agents. Use when (1) discovering and analyzing DeFi/NFT investment opportunities, (2) executing secure transactions via local keystore signer REST API with preview-approve-execute state machine, (3) managing portfolio with dashboards and expiry alerts. Supports base and ethereum chains, configurable security constraints including whitelist protection, transaction limits, and mandatory simulation before execution. ---
> Purpose: Enable AI agents to safely discover, analyze, and execute DeFi investments. > > Core Philosophy: Data-driven decisions. No generic advice without real-time discovery.
---
When user asks for investment advice:
❌ WRONG: Give generic advice immediately (e.g., "I recommend Aave")
✅ CORRECT:
1. Collect investment preferences (chain, token, risk tolerance)
2. Run discovery to get real-time data
3. Analyze data
4. Provide data-backed recommendations
Before attempting any transaction, the agent MUST check signer availability:
❌ WRONG: Directly call preview/execute without checking API
✅ CORRECT:
1. Check if signer API is reachable (call balances endpoint)
2. If unreachable → inform user: "Signer service unavailable, please check SETUP.md"
3. Never proceed with preview if signer is unavailable
Health Check Command:
python3 scripts/trading/trade_executor.py balances --network base
# If success → signer is available
# If error E010 → signer unavailable, stop and inform user
Before asking user for transaction details, ALWAYS check execution readiness:
❌ WRONG: Ask "How much do you want to invest?" without checking payment capability
✅ CORRECT:
1. Run: python3 scripts/trading/preflight.py check --network <chain>
2. Inform user of available payment methods
3. Then ask for transaction details
Preflight Check Output:
{
"recommended": "eip681_payment_link",
"methods": [
{"method": "keystore_signer", "status": "unavailable"},
{"method": "eip681_payment_link", "status": "available"}
],
"message": "⚠️ No local signer. Use EIP-681 payment link."
}
Payment Method Flow: | Recommended Method | Action | |-------------------|--------| | keystore_signer | Use preview → approve → execute flow | | eip681_payment_link | Generate EIP-681 link with eip681_payment.py |
---
Before running discovery, ask the user:
| Preference | Key | Options | Why It Matters | |------------|-----|---------|----------------| | Chain | chain | ethereum, base, arbitrum, optimism | Determines which blockchain to search | | Capital Token | capital_token | USDC, USDT, ETH, WBTC, etc. | The token they want to invest | | Reward Preference | reward_preference | single / multi / any | Single token rewards vs multiple tokens | | Accept IL | accept_il | true / false / any | Impermanent loss tolerance | | Underlying Type | underlying_preference | rwa / onchain / mixed / any | Real-world assets vs on-chain |
# Basic search
python3 scripts/discovery/find_opportunities.py \
--chain ethereum \
--min-apy 5 \
--limit 20
# With LLM-ready output
python3 scripts/discovery/find_opportunities.py \
--chain ethereum \
--llm-ready \
--output json
from scripts.discovery.investment_profile import InvestmentProfile
profile = InvestmentProfile()
profile.set_preferences(
chain="ethereum",
capital_token="USDC",
accept_il=False,
reward_preference="single"
)
filtered = profile.filter_opportunities(opportunities)
# Preview → Approve → Execute
python3 scripts/trading/trade_executor.py preview \
--type deposit --protocol aave --asset USDC --amount 1000 --network base
python3 scripts/trading/trade_executor.py approve --preview-id <uuid>
python3 scripts/trading/trade_executor.py execute --approval-id <uuid>
python3 scripts/trading/eip681_payment.py generate \
--token USDC --to 0x... --amount 10 --network base \
--qr-output /tmp/payment_qr.png
---
web3-investor/
├── scripts/
│ ├── discovery/ # Opportunity discovery tools
│ ├── trading/ # Transaction execution modules
│ └── portfolio/ # Balance queries
├── config/
│ ├── config.json # Execution model & security settings
│ └── protocols.json # Protocol registry
├── references/ # Detailed module documentation
│ ├── discovery.md
│ ├── investment-profile.md
│ ├── trade-executor.md
│ ├── portfolio-indexer.md
│ ├── protocols.md
│ └── risk-framework.md
└── SKILL.md
---
| Module | Purpose | Details | |--------|---------|---------| | Discovery | Search DeFi yield opportunities | See references/discovery.md | | Investment Profile | Preference collection & filtering | See references/investment-profile.md | | Trade Executor | Transaction execution REST API | See references/trade-executor.md | | Portfolio Indexer | On-chain balance queries | See references/portfolio-indexer.md |
---
| Source | Type | Use Case | |--------|------|----------| | MCP (AntAlpha) | Real-time yields | Primary source for DeFi opportunities | | DefiLlama | Protocol TVL/Yields | Fallback and cross-validation | | Dune | On-chain analytics | Custom queries, advanced analysis |
Dune provides powerful on-chain analytics through MCP (Model Context Protocol). Use Dune for:
Configuration (config/config.json):
{
"discovery": {
"data_sources": ["mcp", "dune", "defillama"],
"dune": {
"mcp_endpoint": "https://api.dune.com/mcp/v1",
"auth": {
"header": { "name": "x-dune-api-key", "env_var": "DUNE_API_KEY" },
"query_param": { "name": "api_key", "env_var": "DUNE_API_KEY" }
}
}
}
}
Environment Setup:
# Required for Dune integration
export DUNE_API_KEY="your_dune_api_key"
Authentication Methods:
x-dune-api-key: ?api_key=Usage Example:
# Query Dune for protocol analytics
curl -H "x-dune-api-key: $DUNE_API_KEY" \
"https://api.dune.com/mcp/v1/query/<query_id>/results"
---
# Optional: Alchemy for better RPC
ALCHEMY_API_KEY=your_key_here
# Optional: Debank for portfolio tracking
WEB3_INVESTOR_DEBANK_API_KEY=your_key_here
# Trade Executor: Local API endpoint
WEB3_INVESTOR_API_URL=http://localhost:3000/api
config/config.json)...
安装 Web3 Investor 后,可以对 AI 说这些话来触发它
Help me get started with Web3 Investor
Explains what Web3 Investor does, walks through the setup, and runs a quick demo based on your current project
Use Web3 Investor to aI-native DeFi investment intelligence
Invokes Web3 Investor with the right parameters and returns the result directly in the conversation
What can I do with Web3 Investor in my finance & investment workflow?
Lists the top use cases for Web3 Investor, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/web3-investor/ 目录(个人级,所有项目可用),或 .claude/skills/web3-investor/(项目级)。重启 AI 客户端后,用 /web3-investor 主动调用,或让 AI 根据上下文自动发现并使用。
Web3 Investor 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Web3 Investor 可免费安装使用。请查阅仓库了解许可证信息。
AI-native DeFi investment intelligence. Discover, analyze, and compare yield opportunities across 2,500+ protocols with intent-aware search, LLM-powered deep...
Web3 Investor 属于「Finance & Investment」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my finance & investment tasks using Web3 Investor
Identifies repetitive steps in your workflow and sets up Web3 Investor to handle them automatically