Agent skill

Yield Optimization

by moonpay in moonpay/skills

Multi-chain yield optimization via yield.xyz (StakeKit). An agent skill from moonpay/skills.

MITAuto-check passedDevelopment

Install Yield Optimization

skills CLI
$ npx skills add moonpay/skills --skill yield-optimization -a claude-code

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

GitHub CLI
$ gh skill install moonpay/skills yield-optimization --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/moonpay/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/yield-optimization .claude/skills/yield-optimization && 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
yield-optimization
GitHub stars
113
Token cost
~1.6k tokens
SKILL.md length
315 words
Files
1
Skills in repo
39
Repo updated
First seen
Licence
MIT

At a glance

Multi-chain yield optimization via yield.xyz (StakeKit). An agent skill from moonpay/skills.

  • Works in 7 steps: Discover Yields → Inspect a Yield → Enter a Position → …
  • The user wants to earn yield
  • SKILL.md covers Overview, Prerequisites, Installation and Commands, plus 7 more sections
  • Calls npx, npm and git; reaches github.com and dashboard.yield.xyz; needs YIELDS_API_KEY

What it does

Yield Optimization is an agent skill from moonpay/skills. Multi-chain yield optimization via yield.xyz (StakeKit). Discover 2,988+ yield opportunities across 75+ blockchains, build deposit/withdrawal transactions with shell scripts, and sign them with a MoonPay wallet. Use when the user wants to earn yield, find the best lending or staking rate, enter/exit a position, or check portfolio balances.

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Shell scripting and Banking and insurance. The repository describes itself as: Skills for AI agents to move money — on-ramps, swaps, wallets, deposits, and more via the MoonPay CLI. The licence is MIT.

When your agent uses it

  • The user wants to earn yield
  • Find the best lending
  • Enter/exit a position
  • Check portfolio balances

Example prompts

  • “/yield-optimization”

Requirements

  • Node.js
  • A credential in YIELDS_API_KEY

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Discover Yields
  2. Inspect a Yield
  3. Enter a Position
  4. Sign with MoonPay
  5. Monitor Portfolio
  6. Exit a Position
  7. Manage Rewards

What it can do on your machine

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

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npx
    • npm
    • git

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

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • github.com
    • dashboard.yield.xyz

    Also links to:

    • docs.yield.xyz
    • npmjs.com

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

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • YIELDS_API_KEY

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

Context cost

Yield Optimization loads about 1.6k tokens when it runs. Until then it costs about 90 tokens; SKILL.md has 315 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~90
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k

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); files beside SKILL.md are not scanned.

SKILL.md

The full file from moonpay/skills at commit aa672ab, republished under its MIT licence (© moonpay). 315 words, ~1,607 tokens.

Download SKILL.mdSave it as .claude/skills/yield-optimization/SKILL.md (or your agent's skills folder).
name
yield-optimization
description
Multi-chain yield optimization via yield.xyz (StakeKit). Discover 2,988+ yield opportunities across 75+ blockchains, build deposit/withdrawal transactions with shell scripts, and sign them with a MoonPay wallet. Use when the user wants to earn yield, find the best lending or staking rate, enter/exit a position, or check portfolio balances.
tags
yield, defi, lending, staking, multi-chain

yield.xyz — Multi-Chain Yield Optimization

Overview

yield.xyz (powered by StakeKit) aggregates 2,988+ yield opportunities across 75+ blockchains — lending, staking, vaults, restaking, and liquidity pools. The agent skill uses shell scripts to discover yields, build unsigned transactions, and sign them with your MoonPay wallet.

find-yields.sh    → discover opportunities by chain + token
enter-position.sh → build unsigned deposit transaction
mp transaction send → sign and broadcast with MoonPay wallet
check-portfolio.sh → monitor balances and pending rewards
exit-position.sh  → build unsigned withdrawal transaction

Prerequisites

bash
# curl and jq (required)
which curl jq

# MoonPay CLI for wallet + signing
npm install -g @moonpay/cli
mp login

export YIELDS_API_KEY="..."   # optional: get one at https://dashboard.yield.xyz

Installation

bash
npx clawhub@latest install yield-agent

Or manually:

bash
git clone https://github.com/stakekit/yield-agent.git ~/.openclaw/skills/yield-agent
chmod +x ~/.openclaw/skills/yield-agent/scripts/*.sh

Commands

ScriptDescription
find-yields.sh [chain] [token]Discover yields by network and token
get-yield-info.sh [yield-id]Retrieve yield schema and validator info
list-validators.sh [yield-id]List validators for staking positions
enter-position.sh [yield-id] [address] [params]Build unsigned deposit transaction
exit-position.sh [yield-id] [address]Build unsigned withdrawal transaction
manage-position.sh [yield-id] [action]Claim rewards, restake, redelegate
check-portfolio.sh [yield-id] [address]View balances and pending actions

Core Workflow

1. Discover Yields
bash
# Find USDC yields on Base
./scripts/find-yields.sh base USDC

# Find ETH staking on Ethereum
./scripts/find-yields.sh ethereum ETH
2. Inspect a Yield
bash
# Get schema and requirements before entering
./scripts/get-yield-info.sh base-usdc-aave-v3-lending

Always fetch the yield schema before executing — it specifies required params and multi-step order.

3. Enter a Position
bash
# Build unsigned deposit transaction (amounts are human-readable — "100" = 100 USDC)
./scripts/enter-position.sh base-usdc-aave-v3-lending 0xYOUR_ADDRESS '{"amount":"100"}'
# → returns unsignedTransaction JSON
4. Sign with MoonPay
bash
# Step 1: Sign the unsigned transaction
mp transaction sign \
  --wallet "yield-agent" \
  --chain base \
  --transaction '<unsignedTransaction from step 3>'
# → returns signedTransaction JSON

# Step 2: Broadcast the signed transaction
mp transaction send \
  --chain base \
  --transaction '<signedTransaction from step 1>'

For multi-step transactions, execute in stepIndex order. Sign each step exactly as returned — never modify unsignedTransaction.

5. Monitor Portfolio
bash
./scripts/check-portfolio.sh base-usdc-aave-v3-lending 0xYOUR_ADDRESS
6. Exit a Position
bash
./scripts/exit-position.sh base-usdc-aave-v3-lending 0xYOUR_ADDRESS
# → sign result with mp transaction send
7. Manage Rewards
bash
./scripts/manage-position.sh base-usdc-aave-v3-lending claim
./scripts/manage-position.sh ethereum-eth-lido-staking redelegate

Wallet Setup with MoonPay

bash
# Create a dedicated yield wallet
mp wallet create --name "yield-agent"
mp wallet retrieve --wallet "yield-agent"  # note addresses per chain

Funding Your Wallet

Buy with Fiat
bash
mp buy --token usdc_base --amount 500 --wallet <base-address> --email <email>
mp buy --token usdc_ethereum --amount 1000 --wallet <eth-address> --email <email>
mp buy --token eth_ethereum --amount 0.05 --wallet <eth-address> --email <email>
Bridge Cross-Chain
bash
# USDC on Ethereum → Base (chase higher yield)
mp token bridge \
  --from-wallet yield-agent --from-chain ethereum \
  --from-token 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 \
  --from-amount 500 \
  --to-chain base \
  --to-token 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
Bank Transfer (Large Capital)
bash
mp virtual-account create && mp virtual-account kyc submit
mp virtual-account bank-account add
mp virtual-account onramp create \
  --name "yield-onramp" --fiat usd --stablecoin usdc --chain ethereum --wallet <eth-address>
Check Balances / Withdraw
bash
mp token balance list --wallet <eth-address> --chain ethereum
mp virtual-account offramp create --amount 2000 --chain ethereum --wallet <eth-address>

Security

yield.xyz only builds unsigned transactions — your MoonPay wallet handles all signing. Keys are AES-256-GCM encrypted locally and never leave the machine. For large positions use a hardware wallet:

bash
mp wallet hardware add --name "yield-ledger"

End-to-End Workflow

  1. npx clawhub@latest install yield-agent
  2. mp wallet create --name "yield-agent"
  3. mp buy --token usdc_base --amount 500 --wallet <address> --email <email>
  4. ./scripts/find-yields.sh base USDC
  5. ./scripts/get-yield-info.sh <yield-id>
  6. ./scripts/enter-position.sh <yield-id> <address> '{"amount":"500"}'
  7. mp transaction sign --wallet "yield-agent" --chain base --transaction <unsignedTx> then mp transaction send --chain base --transaction <signedTx>
  8. ./scripts/check-portfolio.sh <yield-id> <address>
  9. mp virtual-account offramp create to withdraw earned yield

Resources

  • moonpay-check-wallet — Verify balances before depositing
  • moonpay-swap-tokens — Swap tokens to what a yield pool requires
  • moonpay-virtual-account — Bank transfer for large capital inflows
  • moonpay-trading-automation — Automate rebalancing on a schedule

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

Files

Just SKILL.md in skills/yield-optimization of moonpay/skills.

Open the folder on GitHubat commit aa672ab

Compare with similar skills

Yield Optimization 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.

Yield Optimization compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Yield Optimization this skillmoonpay/skills113—~1.6kAutomated safety check: PassMIT
Mole Bug Patternstw93/Mole69k—~2kAutomated safety check: PassGPL-3.0
CLI DeveloperJeffallan/claude-skills12k1 repos~1.2kAutomated safety check: PassMIT
JSON Processing with jqcharmbracelet/crush29k—~746Automated safety check: PassCustom licence
Crush Shell Builtinscharmbracelet/crush29k—~790Automated safety check: PassCustom licence
Shellm Architecture Referencelaude-institute/headlong1.2k—~2kAutomated safety check: NotesApache-2.0

Similar skills

  • A catalog of recurring bug shapes in the Mole Mac cleaner, used to review safety-sensitive diffs for deletion safety, unbounded commands, shell traps and weak tests.

    69k GitHub stars~2k tokensUpdated today
    DevelopmentAuto-check passed
  • CLI Developer

    Jeffallan/claude-skills

    Walks through designing, building and polishing a command-line tool: user workflow and command hierarchy, implementation in commander, click, typer or cobra, completions and cross-platform testing.

    12k GitHub starsUsed in 1 repo~1.2k tokens
    DevelopmentAuto-check passed
  • JSON Processing with jq

    charmbracelet/crush

    Explains the jq command built into Crush for querying, filtering and reshaping JSON, including its supported flags and where it differs from standard jq.

    29k GitHub stars~746 tokensUpdated today
    DevelopmentAuto-check passed
  • Crush Shell Builtins

    charmbracelet/crush

    Explains how to add a new in-process builtin command to Crush's embedded POSIX shell, so it is intercepted before reaching the OS, with context polling and exit-status rules.

    29k GitHub stars~790 tokensUpdated today
    DevelopmentAuto-check passed
  • Shellm Architecture Reference

    laude-institute/headlong

    Explains how shellm's bash-based recursive LLM shell fits together - its core engine, identity system, memory, skills and trajectory log.

    1.2k GitHub stars~2k tokensUpdated today
    DevelopmentAuto-check: notes
  • Cpp

    crazyguitar/cppcheatsheet

    Comprehensive C/C++ programming reference covering everything from C11-C23 and C++11-C++23, system programming, CUDA GPU computing, debugging tools, Rust interop, and advanced topics.

    290 GitHub stars~1.8k tokensUpdated 6 days ago
    DevelopmentAuto-check passed

More from moonpay/skills

All 39 skills in this repo
  • A skill your agent uses when accessing Alchemy APIs for RPC calls, token balances, NFT metadata, asset transfers, transaction simulation, or Alchemy-specific features.

    113 GitHub stars~2.1k tokensUpdated 27 days ago
    Auto-check: notes
  • Alchemy API

    moonpay/skills

    Integrates Alchemy blockchain APIs using an API key. An agent skill from moonpay/skills.

    113 GitHub stars~2.1k tokensUpdated 27 days ago
    Auto-check passed
  • Allium Onchain Data

    moonpay/skills

    Query blockchain data via Allium APIs. An agent skill from moonpay/skills.

    113 GitHub stars~1.9k tokensUpdated 27 days ago
    Auto-check passed
  • Corbits Marketplace

    moonpay/skills

    Paid API marketplace for AI agents via Corbits. An agent skill from moonpay/skills.

    113 GitHub stars~1.5k tokensUpdated 27 days ago
    Auto-check passed
  • Dune Analytics

    moonpay/skills

    Blockchain analytics via Dune REST API — execute DuneSQL queries against live on-chain data, discover decoded contract tables, and monitor credit usage.

    113 GitHub stars~1.3k tokensUpdated 27 days ago
    Auto-check passed
  • Moonpay Auth

    moonpay/skills

    Set up the MoonPay CLI, authenticate, and manage local wallets.

    113 GitHub stars~1.2k tokensUpdated 27 days ago
    Auto-check passed

Questions about Yield Optimization

What does Yield Optimization do?

Multi-chain yield optimization via yield.xyz (StakeKit). An agent skill from moonpay/skills. Yield Optimization is an agent skill from moonpay/skills.xyz (StakeKit).

When should I use Yield Optimization?

Yield Optimization fits situations like: the user wants to earn yield; find the best lending; enter/exit a position; check portfolio balances.

How do I install Yield Optimization in Claude Code?

Run `npx skills add moonpay/skills --skill yield-optimization -a claude-code`. Or copy the skill folder (skills/yield-optimization in moonpay/skills) into .claude/skills/yield-optimization in your project. Claude Code loads it when a task matches its description.

How do I install Yield Optimization in Codex?

Run `npx skills add moonpay/skills --skill yield-optimization -a codex`. Or copy the skill folder (skills/yield-optimization in moonpay/skills) into .agents/skills/yield-optimization in your project. Codex loads it when a task matches its description.

Can I use Yield Optimization 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 moonpay/skills --skill yield-optimization -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/yield-optimization, .gemini/skills/yield-optimization, .github/skills/yield-optimization and .opencode/skills/yield-optimization in your project.

What does Yield Optimization need to run?

Going by SKILL.md and its folder, Yield Optimization needs the command-line tools its instructions call (npx, npm and git) and credentials named YIELDS_API_KEY. Our summary lists: Node.js; A credential in YIELDS_API_KEY.

Does Yield Optimization access the network?

SKILL.md names 4 domains. In commands or code: github.com and dashboard.yield.xyz; the agent is likely to contact these when it follows the instructions. As links in the text: docs.yield.xyz and npmjs.com. This is read from the text; nothing was executed.

Is Yield Optimization 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. Review the folder before installing.

What licence does Yield Optimization use?

Yield Optimization is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Yield Optimization use?

About 1.6k tokens (SKILL.md is roughly 6.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Yield Optimization?

Skills that share tags, products or a category with Yield Optimization: Mole Bug Patterns (tw93/Mole, 69k stars), CLI Developer (Jeffallan/claude-skills, 12k stars), JSON Processing with jq (charmbracelet/crush, 29k stars) and Crush Shell Builtins (charmbracelet/crush, 29k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Yield Optimization?

moonpay (a GitHub organization) maintains it in moonpay/skills, which has 113 GitHub stars. The repository holds 39 skills in this directory. The repository was last updated on September 10, 2026.

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