Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 30 additions & 24 deletions yield-agentkit-skills/skills/yield-agentkit-moonpay/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Yield.xyz AgentKit Skill × MoonPay Skill

> **End-to-end on-chain yield, fully in Claude.** This skill combines Yield.xyz's yield discovery and transaction building with MoonPay's wallet authentication, signing, and broadcasting — so you can go from "find me ETH staking yields" to a confirmed on-chain position without leaving your AI assistant.
> **End-to-end on-chain yield.** This skill combines Yield.xyz's yield discovery and transaction building with MoonPay's wallet authentication, signing, and broadcasting — so you can go from "find me ETH staking yields" to a confirmed on-chain position without leaving your AI assistant.

---

Expand All @@ -16,8 +16,8 @@ Yield.xyz AgentKit MCP MoonPay MCP
───────────── ───────────
yields_get_all → wallet_list (get address)
yields_get → check balance
actions_enter → wallet_send_transaction (sign + broadcast)
submit-hash ← txHash returned
actions_enter → transaction_sign + transaction_send (sign + broadcast)
← txHash returned
yields_get_balances confirm position
```

Expand All @@ -30,7 +30,8 @@ yields_get_balances confirm position

| Requirement | Details |
|---|---|
| Claude Code | [Install guide](https://code.claude.com/docs/en/quickstart) |
|Yield AgentKit MCP | https://mcp.yield.xyz/mcp
|MoonPay MCP | mp
Comment thread
Ishita-02 marked this conversation as resolved.
| MoonPay CLI | `npm install -g @moonpay/cli` |
| MoonPay account | Free — created via `mp login` |
| Node.js | v18 or higher (for MoonPay CLI) |
Expand All @@ -39,20 +40,30 @@ yields_get_balances confirm position

## Install

Open Claude Code and say:

### Install via `npx skills` (recommended)

```bash
npx skills add https://github.com/stakekit/agentkit
```

The CLI will list all available skills, pick `yield-agentkit-moonpay`


Open your AI Agent and say:

Comment thread
Ishita-02 marked this conversation as resolved.
```
Set up the yield-agentkit-moonpay skill
```
Comment thread
Ishita-02 marked this conversation as resolved.

Claude will read `references/setup.md` and automatically:
The agent will read `references/setup.md` and automatically:
- Register the Yield.xyz AgentKit MCP (if not already connected)
- Check if the MoonPay CLI is installed, and install it if needed
- Check if you're already logged in to MoonPay, and run the login flow only if needed
- Check for existing wallets, and create one only if none exist
- Register the MoonPay MCP server (if not already connected)

The only moments Claude will pause and ask for your input are:
The only moments the agent will pause and ask for your input are:
- Your MoonPay email address (if login is needed)
- The verification code sent to your email (if login is needed)
- A wallet name (if wallet creation is needed)
Expand Down Expand Up @@ -99,7 +110,7 @@ You can fund it by:
```
Buy 100 USDC on Base via MoonPay
```
Claude will trigger the MoonPay on-ramp flow inside the conversation.
The agent will trigger the MoonPay on-ramp flow inside the conversation.

Once funded, confirm your balance:
```
Expand All @@ -114,9 +125,6 @@ Then you're ready to enter yield positions.

Once both MCPs are connected:

```
Stake 1 ETH on Ethereum via my MoonPay wallet
```
```
Find the best USDC yields on Base and deposit 100 USDC
```
Expand All @@ -126,11 +134,9 @@ Show me ETH liquid staking options, I want to use Lido
```
Check my current yield positions for my MoonPay wallet
```
```
Claim my staking rewards
```

Claude will automatically load the skill, call the right tools in order,

The agent will automatically load the skill, call the right tools in order,
confirm each step with you before signing, and submit the transaction hash
back to Yield.xyz after broadcasting.

Expand All @@ -152,18 +158,18 @@ where most yield opportunities exist.

```bash
claude mcp list
# Should show: yield-agentkit, moonpay
# Should show: yield-agentkit, moonpay (if using claude)
```

If either MCP is missing, ask Claude to set up the skill:
If either MCP is missing, ask the agent to set up the skill:

```
Set up the yield-agentkit-moonpay skill
```

Claude will read `references/setup.md` and resolve any missing MCPs automatically.
The agent will read `references/setup.md` and resolve any missing MCPs automatically.

### Step 2 — Open Claude Code and check skill is loaded
### Step 2 — Open the agent and check skill is loaded

**Option 1** — view loaded skills via `/context`:
```
Expand All @@ -186,7 +192,7 @@ What wallets do I have in MoonPay?
```

If you see a wallet address → you're authenticated and ready.
If you get an auth error → ask Claude to re-authenticate: `Re-authenticate my MoonPay wallet`
If you get an auth error → ask the agent to re-authenticate: `Re-authenticate my MoonPay wallet`

### Step 4 — Test Yield.xyz independently

Expand All @@ -210,7 +216,7 @@ Get full details on ethereum-eth-lido-staking
I want to stake 0.01 ETH via Lido using my MoonPay wallet
```

Watch Claude:
Watch your AI agent:
1. Call `wallet_list` → get your address
2. Call `yields_get` → inspect the schema
3. Call `actions_enter` → build the transaction
Expand All @@ -224,10 +230,10 @@ Watch Claude:
| Symptom | Fix |
|---|---|
| Skill not triggering | Run `/yield-agentkit-moonpay find ETH yields` to force-invoke |
| MoonPay auth error | Ask Claude: `Re-authenticate my MoonPay wallet` |
| `transaction_sign` fails | Check wallet has enough balance: `mp wallet list` |
| MoonPay auth error | Ask the agent: `Re-authenticate my MoonPay wallet` |
| `transaction_sign` fails | Ask the agent to check if wallet has enough balance |
| Balances not updating | Hash submission was skipped — re-enter position or submit manually |
Comment thread
coderabbitai[bot] marked this conversation as resolved.
| Skill missing from `/context` | Wrong install path — check `ls .claude/skills/` |
| Skill missing from `/context` | Ask the agent to check and reload the skill. |

---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ This skill requires both MCP servers to be connected:
| **MoonPay** | Auth + wallet + sign + broadcast | `wallet_list`, `transaction_sign`, `transaction_send`, `token_balance_list` and more |

If either MCP is missing, stop and tell the user. See
`{baseDir}/references/setup.md` for connection instructions.
`references/setup.md` for connection instructions.

---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@

## MoonPay rules

7. **Get wallet address first.** Call `wallet_list` before any yield action.
6. **Get wallet address first.** Call `wallet_list` before any yield action.
The wallet address from MoonPay = the `address` param in all Yield.xyz calls.

8. **Never modify `unsignedTransaction` before passing to MoonPay.**
Pass the complete object exactly as returned by Yield.xyz.
7. **Never alter transaction values from `unsignedTransaction` returned by Yield.xyz.**

9. **Capture `txHash` from every `wallet_send_transaction` call.**
Submit it to Yield.xyz immediately after — do not wait.
For `transaction_sign`, serialize the unsigned tx to base64 RLP exactly as documented in `references/moonpay-tools.md` (format conversion only; no value changes).

10. **Verify wallet balance before entering a position.**
Call `wallet_balance` first. If insufficient, tell the user clearly.
8. **Capture `txHash` from every `transaction_send` call.**

9. **Verify wallet balance before entering a position.**
Call `token_balance_list` first. If insufficient, tell the user clearly.

---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ List all local wallets and their addresses.

### `token_balance_list`
Get token balances for a wallet.
- Both `wallet` and `chain` are required
- Use to verify the user has enough funds before calling `actions_enter`
- Use to confirm a position was entered after hash submission

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ Run `claude mcp list` and check if `yield-agentkit` is already registered.
claude mcp add yield-agentkit --transport http https://mcp.yield.xyz/mcp
```

If not using claude, register the MCP in agent/IDE's MCP settings with::

```bash
MCP name: yield-agentkit
MCP URL: https://mcp.yield.xyz/mcp
Transport: http
```

Then verify in your agent that `yield-agentkit` appears in the connected MCP list before continuing.

---

## 2. MoonPay MCP
Expand Down