defillama — Claude Code skill: DeFi analytics via API
Hands your agent DefiLlama data: protocol TVL, stablecoin yields, fees, DEX and bridge volume. Useful for comparing protocols or tracking where capital moves.
npx skills add Starchild-ai-agent/official-skills --skill defillama -a claude-codeWhat defillama does
This is a script-mode skill. It does not register as Anthropic tools; instead everything lives in one exports.py. The agent reads SKILL.md, runs python inside bash, and imports what it needs after sys.path.insert(0, "/data/workspace/skills/defillama").
Inside are wrappers over the DefiLlama API: protocols, chains, protocol_tvl, yield_pools, dex_overview, fees_overview, revenue_overview, stablecoins, bridges, treasury. Free endpoints sit on https://api.llama.fi and need no key. Pro endpoints, such as yields and emissions, want DEFILLAMA_API_KEY placed in the URL path rather than an HTTP header.
With a fake key, calls have to pass through sc-proxy so the key can be swapped upstream. PROXY_HOST and PROXY_PORT point the session at that proxy; skip them and a direct request returns a key error. The pro half simply will not answer.
What it helps with
- rank protocols by current TVL
- screen stablecoin pools for a workable APY
- compare DEX volume across chains
- pull daily TVL history for one chain
- check bridge volume and chain flows
Example prompts for the agent
- Show the top 10 protocols by TVL right now
- Find USDC pools with a decent APY
- Compare DEX volume on Arbitrum and Ethereum over the last 30 days
How to install defillama
1Skills CLI (Vercel)
npx skills add Starchild-ai-agent/official-skills --skill defillama -a claude-code2Manually: put the files in place
~/.claude/skills/defillama/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/defillama/
1Skills CLI (Vercel)
npx skills add Starchild-ai-agent/official-skills --skill defillama -a codex2Manually: put the files in place
.agents/skills/defillama/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add Starchild-ai-agent/official-skills --skill defillama -a cursor2Manually: put the files in place
.cursor/skills/defillama/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install Starchild-ai-agent/official-skills defillama2Manually: put the files in place
.github/skills/defillama/SKILL.md1Skills CLI (Vercel)
npx skills add Starchild-ai-agent/official-skills --skill defillama -a gemini-cli2Platform CLI
gemini skills install https://github.com/Starchild-ai-agent/official-skills --path defillamaManually: put the files in place
.devin/skills/defillama/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add Starchild-ai-agent/official-skills --skill defillama -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about defillama
How do I install defillama in Claude Code?
Run npx skills add Starchild-ai-agent/official-skills --skill defillama -a claude-code, then check ~/.claude/skills/defillama/SKILL.md.
What does defillama do?
It pulls DefiLlama data: TVL for protocols and chains, pool yields, fees, DEX and bridge volume, stablecoins. The agent calls functions from exports.py inside a bash block.
Does defillama need an API key?
Free endpoints on https://api.llama.fi need none. Pro endpoints require DEFILLAMA_API_KEY in the URL path, and with a fake key requests must go through sc-proxy using PROXY_HOST and PROXY_PORT.