Agent skill

Optimizing Defi Yields

by jeremylongshore in jeremylongshore/tons-of-skills-marketplace

Find and compare DeFi yield opportunities across protocols with APY calculations, risk assessment, and optimization recommendations.

MITAuto-check passedBusiness, Finance & HR

Install Optimizing Defi Yields

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill optimizing-defi-yields -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace optimizing-defi-yields --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/optimizing-defi-yields .claude/skills/optimizing-defi-yields && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
optimizing-defi-yields
GitHub stars
2.8k
Token cost
~1.4k tokens
SKILL.md length
227 words
Files
12 (incl. scripts, references)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Find and compare DeFi yield opportunities across protocols with APY calculations, risk assessment, and optimization recommendations.

  • Works in 5 steps: Search for yield opportunities across… → Filter by criteria -- minimum TVL (for… → Apply risk filters -- show only audited… → …
  • Searching for yield farming opportunities
  • SKILL.md covers Overview, Prerequisites, Instructions and Output, plus 4 more sections
  • Runs Python scripts from its folder; calls python

What it does

Optimizing Defi Yields is an agent skill from jeremylongshore/tons-of-skills-marketplace. Find and compare DeFi yield opportunities across protocols with APY calculations, risk assessment, and optimization recommendations. Use when searching for yield farming opportunities, comparing DeFi protocols, or analyzing APY/APR rates. Trigger with phrases like "find DeFi yields", "compare APY", "best yield farming", "optimize DeFi returns", "stablecoin yields", or "liquidity pool rates".

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 14 other files, including scripts and reference files (for example `ARD.md`, `PRD.md` and `config/settings.yaml`). Compatibility notes: Designed for Claude Code

It sits in Business, Finance & HR, covering Crypto and DeFi analysis. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • Searching for yield farming opportunities
  • Comparing DeFi protocols
  • Analyzing APY/APR rates
  • With phrases like find DeFi yields

Example prompts

  • “find DeFi yields”
  • “compare APY”
  • “best yield farming”
  • “/optimizing-defi-yields”

Requirements

  • Python 3
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Write, Bash(crypto:yield-*)

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Search for yield opportunities across all chains or filter by a specific chain
  2. Filter by criteria -- minimum TVL (for safety), asset type, or protocol
  3. Apply risk filters -- show only audited protocols or filter by risk level (--risk low, --risk medium, --risk high)
  4. Analyze specific opportunities -- get detailed pool breakdown or compare protocols
  5. Export results to JSON or CSV for further analysis

What it can do on your machine

Read from SKILL.md and the folder at commit cfae287. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Bash(crypto:yield-*)

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 5 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • defillama.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Optimizing Defi Yields loads about 1.4k tokens when it runs, and up to ~5.8k if it reads all its reference files. Until then it costs about 104 tokens; SKILL.md has 227 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~104
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit cfae287, republished under its MIT licence (© jeremylongshore). 227 words, ~1,428 tokens.

Download SKILL.mdSave it as .claude/skills/optimizing-defi-yields/SKILL.md (or your agent's skills folder). This skill also uses 11 other files; get the full folder from GitHub.
name
optimizing-defi-yields
description
Find and compare DeFi yield opportunities across protocols with APY calculations, risk assessment, and optimization recommendations. Use when searching for yield farming opportunities, comparing DeFi protocols, or analyzing APY/APR rates. Trigger with phrases like "find DeFi yields", "compare APY", "best yield farming", "optimize DeFi returns", "stablecoin yields", or "liquidity pool rates".
allowed-tools
Read, Write, Bash(crypto:yield-*)
compatibility
Designed for Claude Code
version
1.28.0
author
Jeremy Longshore <jeremy@intentsolutions.io>
license
MIT
tags
crypto, optimizing-defi

Optimizing DeFi Yields

Overview

Find and compare DeFi yield opportunities across protocols. Aggregates data from DeFiLlama and other sources to provide APY/APR comparisons, risk assessments, and optimization recommendations for yield farming strategies.

Prerequisites

Before using this skill, ensure you have:

  • Python 3.8+ installed
  • Internet access for API queries
  • Understanding of DeFi concepts (APY, APR, TVL, impermanent loss)

Instructions

  1. Search for yield opportunities across all chains or filter by a specific chain:

    bash
    python ${CLAUDE_SKILL_DIR}/scripts/yield_optimizer.py --top 20
    python ${CLAUDE_SKILL_DIR}/scripts/yield_optimizer.py --chain ethereum --top 10
  2. Filter by criteria -- minimum TVL (for safety), asset type, or protocol:

    bash
    python ${CLAUDE_SKILL_DIR}/scripts/yield_optimizer.py --min-tvl 10000000 --top 15  # 10000000 = 10M limit
    python ${CLAUDE_SKILL_DIR}/scripts/yield_optimizer.py --asset USDC --chain ethereum
    python ${CLAUDE_SKILL_DIR}/scripts/yield_optimizer.py --protocol aave,compound,curve
  3. Apply risk filters -- show only audited protocols or filter by risk level (--risk low, --risk medium, --risk high):

    bash
    python ${CLAUDE_SKILL_DIR}/scripts/yield_optimizer.py --audited-only --min-tvl 1000000  # 1000000 = 1M limit
    python ${CLAUDE_SKILL_DIR}/scripts/yield_optimizer.py --risk low --min-apy 3
  4. Analyze specific opportunities -- get detailed pool breakdown or compare protocols:

    bash
    python ${CLAUDE_SKILL_DIR}/scripts/yield_optimizer.py --pool "aave-v3-usdc-ethereum" --detailed
    python ${CLAUDE_SKILL_DIR}/scripts/yield_optimizer.py --compare aave,compound,spark --asset USDC
  5. Export results to JSON or CSV for further analysis:

    bash
    python ${CLAUDE_SKILL_DIR}/scripts/yield_optimizer.py --top 50 --format json --output yields.json
    python ${CLAUDE_SKILL_DIR}/scripts/yield_optimizer.py --chain ethereum --format csv --output eth_yields.csv

Output

Yield Summary Table
==============================================================================
  DEFI YIELD OPTIMIZER                              2026-01-15 15:30 UTC  # 2026 year
==============================================================================

  TOP YIELD OPPORTUNITIES
------------------------------------------------------------------------------
  Protocol       Pool          Chain      TVL        APY    Risk    Score
  Convex        cvxCRV        Ethereum   $450M    12.5%    Low     9.2
  Aave v3       USDC          Ethereum   $2.1B     4.2%    Low     9.8
  Curve         3pool         Ethereum   $890M     3.8%    Low     9.5
  Compound v3   USDC          Ethereum   $1.5B     3.2%    Low     9.6
  Yearn         yvUSDC        Ethereum   $120M     5.1%    Medium  7.8
------------------------------------------------------------------------------

  APY BREAKDOWN (Top Result)
------------------------------------------------------------------------------
  Base APY:     4.5%
  Reward APY:   8.0% (CRV + CVX)
  Total APY:    12.5%
  IL Risk:      None (single-sided)
==============================================================================
Risk Assessment
  RISK ANALYSIS: Convex cvxCRV
------------------------------------------------------------------------------
  Audit Status:    ✓ Audited (Trail of Bits, OpenZeppelin)
  Protocol Age:    3+ years
  TVL:             $450M (stable)
  TVL Trend:       +5% (30d)
  Risk Score:      9.2/10 (Low Risk)

  Risk Factors:
  • Smart contract dependency on Curve
  • CRV/CVX reward token volatility
  • Vote-lock mechanics
==============================================================================

Error Handling

See ${CLAUDE_SKILL_DIR}/references/errors.md for comprehensive error handling.

Common issues:

  • API timeout: Uses cached data with staleness warning
  • No pools found: Broaden search criteria
  • Invalid protocol: Check supported protocols list

Examples

See ${CLAUDE_SKILL_DIR}/references/examples.md for detailed usage examples.

Quick Examples

Find stablecoin yields:

bash
python yield_optimizer.py --asset USDC,USDT,DAI --min-tvl 10000000  # 10000000 = 10M limit

Low-risk opportunities:

bash
python yield_optimizer.py --risk low --audited-only --min-apy 2

Multi-chain search:

bash
python yield_optimizer.py --chain ethereum,arbitrum,polygon --top 20

Export top yields:

bash
python yield_optimizer.py --top 100 --format json --output all_yields.json

Configuration

Settings in ${CLAUDE_SKILL_DIR}/config/settings.yaml:

  • Default chain: Primary chain to search
  • Cache TTL: How long to cache API responses
  • Risk weights: Customize risk scoring factors
  • Min TVL default: Default minimum TVL filter

Resources

  • DeFiLlama: https://defillama.com/yields - Yield data source
  • DeFi Safety: - Protocol security scores
  • Impermanent Loss Calculator: Understand LP risks

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 11 other files (scripts, references) in skills/.curated/optimizing-defi-yields of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • ARD.md
  • PRD.md
  • config/settings.yaml
  • references/errors.md
  • references/examples.md
  • references/implementation.md
  • scripts/formatters.py
  • scripts/protocol_fetcher.py
  • scripts/risk_assessor.py
  • scripts/yield_calculator.py
  • scripts/yield_optimizer.py

Open the folder on GitHubat commit cfae287

Compare with similar skills

Optimizing Defi Yields next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Optimizing Defi Yields compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Optimizing Defi Yields this skilljeremylongshore/tons-of-skills-marketplace2.8k—~1.4kAutomated safety check: PassMIT
Technical Analysttradermonty/claude-trading-skills3k4 repos~4.6kAutomated safety check: PassMIT
Polyclawchainstacklabs/polyclaw3591 repos~2kAutomated safety check: PassApache-2.0
Longbridge Researchhelsome/folio2713 repos~2.1kAutomated safety check: PassMIT
Stock Analysis24mlight/StockClaw1012 repos~2kAutomated safety check: NotesMIT
Swapper Depositswapperfinance/swapper-toolkit852—~1.8kAutomated safety check: PassMIT

Similar skills

  • Technical Analyst

    tradermonty/claude-trading-skills

    This skill should be used when analyzing weekly price charts for stocks, stock indices, cryptocurrencies, or forex pairs.

    3k GitHub starsUsed in 4 repos~4.6k tokens
    Business, Finance & HRAuto-check passed
  • Polyclaw

    chainstacklabs/polyclaw

    Trade on Polymarket via split + CLOB execution. An agent skill from chainstacklabs/polyclaw.

    359 GitHub starsUsed in 1 repo~2k tokens
    Business, Finance & HRAuto-check passed
  • Longbridge Research

    helsome/folio

    Institution ratings, consensus price targets, EPS/revenue forecasts, finance calendar, shareholder data, fund holders, insider trades (SEC Form 4), short interest, industry rankings, peer group…

    271 GitHub starsUsed in 3 repos~2.1k tokens
    Business, Finance & HRAuto-check passed
  • Stock Analysis

    24mlight/StockClaw

    Analyze stocks and cryptocurrencies using Yahoo Finance data.

    101 GitHub starsUsed in 2 repos~2k tokens
    Business, Finance & HRAuto-check: notes
  • Swapper Deposit

    swapperfinance/swapper-toolkit

    Deposit and bridge funds into a wallet or protocol using Swapper Finance.

    852 GitHub stars~1.8k tokensUpdated 6 mo ago
    Business, Finance & HRAuto-check passed
  • Okx Cex Earn

    okx/agent-skills

    Manages OKX Simple Earn (flexible savings/lending), Flash Earn, On-chain Earn (staking/DeFi), Dual Investment (DCD/双币赢), and AutoEarn (自动赚币) via the okx CLI.

    187 GitHub starsUsed in 2 repos~3.3k tokens
    Business, Finance & HRAuto-check passed

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Agent Context Loader

    jeremylongshore/tons-of-skills-marketplace

    Execute proactive auto-loading: automatically detects and loads agents.md files.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Aggregating Performance Metrics

    jeremylongshore/tons-of-skills-marketplace

    Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.

    2.8k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Analyzing Capacity Planning

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.

    2.8k GitHub stars~947 tokensUpdated today
    Auto-check passed
  • Analyzing Database Indexes

    jeremylongshore/tons-of-skills-marketplace

    Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2k tokensUpdated today
    Auto-check passed

Questions about Optimizing Defi Yields

What does Optimizing Defi Yields do?

Find and compare DeFi yield opportunities across protocols with APY calculations, risk assessment, and optimization recommendations. Optimizing Defi Yields is an agent skill from jeremylongshore/tons-of-skills-marketplace. Find and compare DeFi yield opportunities across protocols with APY calculations, risk assessment, and optimization recommendations.

When should I use Optimizing Defi Yields?

Optimizing Defi Yields fits situations like: searching for yield farming opportunities; comparing DeFi protocols; analyzing APY/APR rates; with phrases like find DeFi yields.

How do I install Optimizing Defi Yields in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill optimizing-defi-yields -a claude-code`. Or copy the skill folder (skills/.curated/optimizing-defi-yields in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/optimizing-defi-yields in your project. Claude Code loads it when a task matches its description.

How do I install Optimizing Defi Yields in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill optimizing-defi-yields -a codex`. Or copy the skill folder (skills/.curated/optimizing-defi-yields in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/optimizing-defi-yields in your project. Codex loads it when a task matches its description.

Can I use Optimizing Defi Yields in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill optimizing-defi-yields -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/optimizing-defi-yields, .gemini/skills/optimizing-defi-yields, .github/skills/optimizing-defi-yields and .opencode/skills/optimizing-defi-yields in your project.

What does Optimizing Defi Yields need to run?

Going by SKILL.md and its folder, Optimizing Defi Yields needs Python for the scripts in its folder and the command-line tools its instructions call (python). Our summary lists: Python 3. Its frontmatter pre-approves these tools: Read, Write, Bash(crypto:yield-*). Compatibility (from SKILL.md): Designed for Claude Code.

Does Optimizing Defi Yields access the network?

SKILL.md names 1 domain. As links in the text: defillama.com. This is read from the text; nothing was executed.

Is Optimizing Defi Yields safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Optimizing Defi Yields use?

Optimizing Defi Yields is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Optimizing Defi Yields use?

About 1.4k tokens (SKILL.md is roughly 5.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 4.3k tokens, read only when the agent opens those files.

What are the alternatives to Optimizing Defi Yields?

Skills that share tags, products or a category with Optimizing Defi Yields: Technical Analyst (tradermonty/claude-trading-skills, 3k stars), Polyclaw (chainstacklabs/polyclaw, 359 stars), Longbridge Research (helsome/folio, 271 stars) and Stock Analysis (24mlight/StockClaw, 101 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Optimizing Defi Yields?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,827 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 10, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.