用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Demerzels-lab/elsamultiskillagent --skill solana-defi-agent命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
The philosophical layer for AI agents.
Agents can sign plugins, rotate credentials without losing identity, and publicly attest to behavior.
A relaxing resource-gathering RPG where AI agents collect resources, trade with NPCs, and manage and build their world at their own pace.
正在显示 SKILL.md
基于 SOC 职业分类
| name | solana-defi-agent |
| description | DeFi toolkit for AI agents on Solana — swaps, lending, staking via Solana Actions/Blinks |
DeFi toolkit for AI agents on Solana — swaps, lending, staking, and more
New here? → Start with QUICKSTART.md for a 10-minute setup guide.
Solana Blinks (Blockchain Links) let you execute DeFi operations—swaps, deposits, staking—through simple URLs. This skill gives you:
blinks execute <url> --amount=100# Example: Deposit USDC to Kamino yield vault
blinks execute "https://kamino.dial.to/api/v0/lend/usdc-prime/deposit" --amount=100
# .env file
SOLANA_RPC_URL=https://api.mainnet-beta.solana.com
SOLANA_WALLET_PATH=~/.config/solana/my-wallet.json
.env and .gitignore| Protocol | Actions | Endpoint |
|---|---|---|
| Jupiter | Swap any tokens | worker.jup.ag |
| Raydium | Swap, LP | share.raydium.io |
| Kamino | Deposit, withdraw, borrow, repay | kamino.dial.to |
| Jito | Stake SOL | jito.network, jito.dial.to |
| Tensor | Buy floor, bid on NFTs | tensor.dial.to |
| Drift | Vault deposit/withdraw | app.drift.trade |
| Protocol | Get Key | Notes |
|---|---|---|
| Lulo | dev.lulo.fi | 24hr withdrawal cooldown |
| Protocol | Issue | Workaround |
|---|---|---|
| Orca | No public blink API | Use Jupiter or Raydium |
| Sanctum | Cloudflare blocks server IPs | Use their web UI |
| Some dial.to | Rate limiting | Try self-hosted endpoints |
MarginFi, Meteora, Helius, Magic Eden - endpoints exist but need verification.
Always preview what a blink does:
blinks inspect <url>
Shows metadata, available actions, and trust status.
# Dry run first (simulates without sending)
blinks execute <url> --amount=100 --dry-run
# Execute for real
blinks execute <url> --amount=100
# Kamino
blinks kamino deposit --vault=usdc-prime --amount=100
blinks kamino withdraw --vault=usdc-prime --amount=50
# Jito
blinks jito stake --amount=1
# Generic (any blink URL)
blinks execute "https://..." --amount=X
import {
ActionsClient,
BlinksExecutor,
Wallet,
getConnection,
isHostTrusted,
} from '@openclaw/solana-defi-agent-skill';
// Initialize
const connection = getConnection();
const wallet = Wallet.fromEnv();
const actions = new ActionsClient();
const executor = new BlinksExecutor(connection);
// 1. Check if host is trusted
const trusted = await isHostTrusted('https://kamino.dial.to');
if (!trusted) throw new Error('Untrusted host!');
// 2. Get action metadata
const metadata = await actions.getAction(
'https://kamino.dial.to/api/v0/lend/usdc-prime/deposit'
);
console.log('Available actions:', metadata.links.actions);
// 3. Get transaction
const tx = await actions.postAction(
'https://kamino.dial.to/api/v0/lend/usdc-prime/deposit?amount=100',
wallet.address
);
// 4. Simulate first
const sim = await executor.(tx);
(!sim.) {
();
}
signature = executor.(tx, wallet.());
.(, );
User → GET blink URL → Protocol returns actions
User → POST with wallet → Protocol returns transaction
User → Sign & submit → Transaction confirmed
The skill handles all of this. You just provide the URL and amount.
| Error | Cause | Fix |
|---|---|---|
422 Unprocessable Entity | Missing required tokens | Check token balance before deposit |
403 Forbidden | Cloudflare blocking | Try protocol's self-hosted endpoint |
Transaction simulation failed | Insufficient SOL or stale tx | Check balance, retry quickly |
Rate limit exceeded | Public RPC overloaded | Use Helius/QuickNode free tier |
Untrusted host warning | Host not in Dialect registry | Verify URL is correct |
The CLI accepts multiple formats:
# Direct URL (recommended)
blinks inspect "https://kamino.dial.to/api/v0/lend/usdc/deposit"
# Solana Action protocol
blinks inspect "solana-action:https://kamino.dial.to/..."
# dial.to interstitial
blinks inspect "https://dial.to/?action=solana-action:https://..."
| Provider | Free Tier | Link |
|---|---|---|
| Helius | 100k req/day | helius.dev |
| QuickNode | 10M credits | quicknode.com |
| Alchemy | 300M CU | alchemy.com |
| Public | Rate limited | api.mainnet-beta.solana.com |
Public works for testing but will hit rate limits in production.
solana-defi-agent-skill/
├── SKILL.md # This file
├── QUICKSTART.md # Beginner setup guide
├── README.md # Package readme
├── .env.example # Environment template
├── src/ # Source code
├── dist/ # Built CLI + SDK
├── docs/ # Protocol status, specs
└── tests/ # Protocol endpoint tests