defillama-research
Skill178 starsChanged 4 months agoMITView on GitHub
Research DeFi protocols and market opportunities using DefiLlama data. Use when a user says "show me TVL data", "which protocols are growing", "DeFi market research", "what should I build in DeFi", "find DeFi opportunities", "analyze protocol TVL", or "which chains are trending". Uses TVL as a trust metric to suggest protocols worth building on or integrating with.
- Sends data out
In this repository34 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- animation-reverse-engineeringSkill
- brand-designSkill
- build-data-pipelineSkill
- build-defi-protocolSkill
- build-mobileSkill
- build-with-claudeSkill
- csoSkill
- debug-programSkill
- design-tasteSkill
- frontend-design-guidelinesSkill
- launch-tokenSkill
- navigate-skillsSkill
- number-formattingSkill
- page-load-animationsSkill
- product-reviewSkill
- review-and-iterateSkill
- roast-my-productSkill
- scaffold-projectSkill
- verify-humanity-pohSkill
- virtual-solana-incubatorSkill
- colosseum-copilotSkill
- competitive-landscapeSkill
- find-next-crypto-ideaSkill
- learnSkill
- solana-beginnerSkill
- validate-ideaSkill
- apply-grantSkill
- create-pitch-deckSkill
- deploy-to-mainnetSkill
- marketing-videoSkill
- submit-to-hackathonSkill
- video-craftSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 8 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 26
If TEL_PROMPTED is no: Before starting the skill workflow, ask the user about telemetry.
- Distinctive: line 36
If A: run this bash:
- Distinctive: line 43
If B: run this bash:
- Distinctive: line 63
Read references/defillama-api-guide.md for the available endpoints and how to query them.
- Distinctive: line 64
Read references/tvl-as-trust-metric.md to understand how to interpret TVL data.
- Distinctive: line 65
Read references/defi-opportunity-framework.md for spotting opportunities from the data.
- Distinctive: line 77
Always use real-time DefiLlama data, not stale numbers.
- Distinctive: line 79
When recommending protocols to build on, check if they have an SDK, open API, or composable contracts.
- Distinctive: line 81
Always filter for Solana data when the user is building on Solana, unless they ask for cross-chain.
- Very specific: line 89
After research, write/update .superstack/idea-context.md (create if missing) with a defi_research field containing:
- Very specific: line 135
After the skill workflow completes (success, error, or abort), log the telemetry event.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Preamble (run first)
_TEL_TIER=$(cat ~/.superstack/config.json 2>/dev/null | grep -o '"telemetryTier": *"[^"]*"' | head -1 | sed 's/.*"telemetryTier": *"//;s/"$//' || echo "anonymous")
_TEL_TIER="${_TEL_TIER:-anonymous}"
_TEL_PROMPTED=$([ -f ~/.superstack/.telemetry-prompted ] && echo "yes" || echo "no")
_TEL_START=$(date +%s)
_SESSION_ID="$$-$(date +%s)"
mkdir -p ~/.superstack
echo "TELEMETRY: $_TEL_TIER"
echo "TEL_PROMPTED: $_TEL_PROMPTED"
if [ "$_TEL_TIER" != "off" ]; then
_TEL_EVENT='{"skill":"defillama-research","phase":"idea","event":"started","ts":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"}'
echo "$_TEL_EVENT" >> ~/.superstack/telemetry.jsonl 2>/dev/null || true
_CONVEX_URL=$(cat ~/.superstack/config.json 2>/dev/null | grep -o '"convexUrl":"[^"]*"' | head -1 | cut -d'"' -f4 || echo "")
[ -n "$_CONVEX_URL" ] && curl -s -X POST "$_CONVEX_URL/api/mutation" -H "Content-Type: application/json" -d '{"path":"telemetry:track","args":{"skill":"defillama-research","phase":"idea","status":"success","version":"0.2.0","platform":"'$(uname -s)-$(uname -m)'","timestamp":'$(date +%s)000'}}' >/dev/null 2>&1 &
true
fiIf TEL_PROMPTED is no: Before starting the skill workflow, ask the user about telemetry.
Use AskUserQuestion:
Help superstack get better! We track which skills get used and how long they take — no code, no file paths, no PII. Change anytime in
~/.superstack/config.json.
Options:
- A) Sure, help superstack improve (anonymous)
- B) No thanks
If A: run this bash:
echo '{"telemetryTier":"anonymous"}' > ~/.superstack/config.json
_TEL_TIER="anonymous"
touch ~/.superstack/.telemetry-promptedIf B: run this bash:
echo '{"telemetryTier":"off"}' > ~/.superstack/config.json
_TEL_TIER="off"
touch ~/.superstack/.telemetry-promptedThis only happens once. If TEL_PROMPTED is yes, skip this entirely and proceed to the skill workflow.
Wrong skill? See SKILL_ROUTER.md for all available skills.
DefiLlama Research
Overview
Use DefiLlama's API to research the DeFi landscape on Solana and across chains. TVL (Total Value Locked) is the primary trust metric — protocols with real TVL have real users with real money at stake. Use this data to identify what's working, what's growing, and where the gaps are.
Workflow
- Understand the user's goal: exploring DeFi broadly, validating a specific niche, or picking protocols to integrate with.
- Read references/defillama-api-guide.md for the available endpoints and how to query them.
- Read references/tvl-as-trust-metric.md to understand how to interpret TVL data.
- Read references/defi-opportunity-framework.md for spotting opportunities from the data.
- Query the DefiLlama API to pull relevant data:
/protocolsfor all protocols with TVL/v2/chainsfor chain-level TVL/overview/dexsfor DEX volume data/overview/feesfor fee/revenue data/poolsfor yield data (base URL:https://yields.llama.fi)/stablecoinsfor stablecoin flow data (base URL:https://stablecoins.llama.fi)
- Analyze and present findings with concrete recommendations.
Non-Negotiables
- Always use real-time DefiLlama data, not stale numbers. The API is free and fast.
- TVL alone is not enough. Cross-reference with fees/revenue, user count, and growth trends.
- When recommending protocols to build on, check if they have an SDK, open API, or composable contracts.
- Distinguish between "high TVL = trusted" and "high TVL = opportunity". A $10B protocol is trusted but hard to compete with. A $10M protocol growing 50% monthly is the opportunity.
- Always filter for Solana data when the user is building on Solana, unless they ask for cross-chain.
- Flag protocols with declining TVL — they may be losing trust or users.
- Present data in tables with clear rankings.
Phase Handoff
This skill is Phase 1 (Idea) in the Idea → Build → Launch journey.
After research, write/update .superstack/idea-context.md (create if missing) with a defi_research field containing:
top_protocols: array of { name, tvl, tvl_change_7d, category, chain }opportunities: array of identified gaps or underserved nichesrecommended_integrations: protocols with SDKs/APIs worth building onmarket_snapshot: { total_solana_tvl, top_category, fastest_growing_category }
See ../../../data/specs/phase-handoff.md for the full JSON contract.
Resources
references/
- references/defillama-api-guide.md
- references/tvl-as-trust-metric.md
- references/defi-opportunity-framework.md
Quick Start
# Ask for DeFi data:
# "Show me DeFi opportunities on Solana"
# "Which Solana protocols are growing fastest?"
# "Find underserved DeFi niches on Solana"
# Key DefiLlama API endpoints:
# GET https://api.llama.fi/v2/chains — All chains TVL
# GET https://api.llama.fi/protocols — All protocols
# GET https://api.llama.fi/overview/dexs/solana — Solana DEX volume
# GET https://api.llama.fi/overview/fees/solana — Solana fee revenue
# GET https://yields.llama.fi/pools — All yield pools
# GET https://stablecoins.llama.fi/stablecoins — All stablecoins
# GET https://stablecoins.llama.fi/stablecoincharts/Solana — Solana stablecoin flowsDecision Points
- Which DeFi category to build in? AMM, lending, perps, staking, yield — pick based on TVL gaps and growth trends.
- TVL growing but revenue flat? Protocol likely has unsustainable incentives — not a good model to copy.
- Small TVL + fast growth? Best opportunity zone. Build the protocol or build tools for it.
datasets/
../../../data/defi/defillama-api.json— Full OpenAPI 3.1 spec for DefiLlama API (69 endpoints)
Telemetry (run last)
After the skill workflow completes (success, error, or abort), log the telemetry event.
Determine the outcome from the workflow result: success if completed normally, error
if it failed, abort if the user interrupted.
Run this bash:
_TEL_END=$(date +%s)
_TEL_DUR=$(( _TEL_END - ${_TEL_START:-$_TEL_END} ))
_TEL_TIER=$(cat ~/.superstack/config.json 2>/dev/null | grep -o '"telemetryTier": *"[^"]*"' | head -1 | sed 's/.*"telemetryTier": *"//;s/"$//' || echo "anonymous")
if [ "$_TEL_TIER" != "off" ]; then
echo '{"skill":"defillama-research","phase":"idea","event":"completed","outcome":"OUTCOME","duration_s":"'"$_TEL_DUR"'","session":"'"$_SESSION_ID"'","ts":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'","platform":"'$(uname -s)-$(uname -m)'"}' >> ~/.superstack/telemetry.jsonl 2>/dev/null || true
true
fiReplace OUTCOME with success/error/abort based on the workflow result.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

