Skip to content
MCP Servers
Skill

/recover-eco-funds

Recover USDC from a legacy Circle CLI Gateway `--method eco` deposit whose fixed refund recipient is the SCA's backing EOA. Use this skill for legacy Eco intents that are stuck, expired, waiting for refund, refunded to `eoaOwnerAddress`, missing from Gateway, or need a

From plugin
skills
17020 skills1 MCP

Claude Code

$ npx -y skills add circlefin/skills --skill recover-eco-funds --agent claude-code

SKILL.md

recover-eco-funds.SKILL.md
name: recover-eco-funds
description: "Recover USDC from a legacy Circle CLI Gateway `--method eco` deposit whose fixed refund recipient is the SCA's backing EOA. Use this skill for legacy Eco intents that are stuck, expired, waiting for refund, refunded to `eoaOwnerAddress`, missing from Gateway, or need a permissionless self-refund. Do not use its executable recovery phases for current Gateway v2 deposits, which set `refundRecipient` to the SCA. It covers calling Eco's Portal `refund(...)` with exact onchain intent data, then moving refunded USDC from the backing EOA to the linked SCA with ERC-3009, relayed by the SCA so the backing EOA needs no gas. The backing-EOA sweep also applies when USDC was sent directly to an Agent Wallet's backing EOA and the CLI reports \"Wallet not found\" for that address."
allowed-tools: ["Read", "Bash(mkdir -p ./eco-recovery-evidence)", "Bash(circle --version)", "Bash(circle wallet status --output json)", "Bash(circle gateway deposit --help)", "Bash(circle wallet execute --help)", "Bash(circle contract query --help)", "Bash(circle wallet list --chain * --type agent --output json)", "Bash(circle wallet balance --address * --chain * --output json)", "Bash(circle gateway balance --address * --chain * --output json)", "Bash(circle transaction list --address * --chain * --operation transfer --tx-type outbound --state complete --output json)", "Bash(curl -fsS \"https://api.eco.com/circle-gateway/v2/depositAddresses/*\")", "Bash(curl -fsS --request POST --url https://quotes.eco.com/api/v3/intents/intentStatus --header \"Content-Type: application/json\" --data '{\"intentHash\":\"*\"}')", "Bash(curl -fsS --request POST --url https://quotes.eco.com/api/v3/intents/intentStatus --header \"Content-Type: application/json\" --data '{\"intentCreatedHash\":\"*\"}')", "Bash(node */scripts/eco-self-refund.mjs *)", "Bash(node */scripts/sign-eoa-authorization.mjs *)", "Bash(npm ci --prefix * --ignore-scripts)", "Bash(circle transaction list --address * --chain * --operation execute --output json)"]
requirements:
  runtimes: [node]
  connectors: []

Recover Legacy Eco Funds

Overview

Recover funds from a legacy Circle CLI Eco deposit without guessing intent data, refund recipients, or transaction state. The workflow is evidence-first and defaults to read-only inspection.

> **Legacy-only recovery:** The executable recovery phases in this skill are for deposits whose already-published intent fixes `reward.creator` to the Circle SCA's API-verified `eoaOwnerAddress`. Current Gateway v2/Circle CLI deposits set `refundRecipient` to the SCA and should refund directly there. For a current deposit, use the read-only status checks below, reconcile the SCA and Gateway balances, and escalate through the normal support path if necessary; do not run the legacy backing-EOA sweep.

Do not classify a deposit as legacy from its age or endpoint version alone. Decode the `IntentPublished` event and compare the fixed `reward.creator` with both the SCA and its API-verified `eoaOwnerAddress`:

  • `reward.creator == eoaOwnerAddress`: legacy recovery may apply after all read-only checks.
  • `reward.creator == SCA`: current direct-to-SCA refund behavior; stop before the executable legacy phases.
  • neither: stop because the selected Circle wallet does not own the fixed refund recipient.

If there is no Eco deposit and USDC was simply sent to an Agent Wallet's backing EOA (the CLI reports "Wallet not found" for that address), skip Phases 1 and 2 and go straight to Phase 3.

If the Circle CLI is not installed, the Terms gate is unresolved, or the agent session is invalid, set up first: use the installed `use-agent-wallet` skill; if it isn't installed, fetch `https://agents.circle.com/skills/wallet-login.md` (full bootstrap: `https://agents.circle.com/skills/setup.md`). Do not trigger multiple login requests: each fresh request invalidates the prior OTP.

Workflow

1. Create a private evidence directory. 2. Phase 1: diagnose read-only and classify the intent from the onchain `IntentPublished` event. 3. Phase 2, for a legacy intent past its deadline with a funded vault: run the read-only refund preflight, run the printed tuple check and fee estimate, get approval for that one intent, submit the printed refund command once, and verify. 4. Phase 3, when USDC sits at the verified backing EOA: get approval, sign the ERC-3009 authorization, estimate, get approval for the transfer and fee, submit once, and verify. 5. Report the outcome with the evidence-directory path.

Understand the two recovery legs

A legacy Eco deposit can require two separate operations:

1. **Eco self-refund:** call `Portal.refund(destination, routeHash, reward)` on the vault/refund chain after the reward deadline. The Portal validates the intent and instructs its deterministic vault to return funds to `reward.creator`. Anyone may relay this call, but the recipient is fixed by the original intent. 2. **Backing EOA sweep:** if `reward.creator` was the SCA's backing EOA, authorize USDC to move from that EOA to the linked SCA with ERC-3009. The SCA relays the token call and pays gas; the backing EOA does not need native gas.

Current Gateway v2/Circle CLI Eco deposits set the SCA as the refund recipient. They are outside the executable scope of this skill: use status and balance reconciliation, and do not run the backing-EOA sweep.

Safety boundary

  • Treat event/creation chain, vault/refund chain, intent destination value, Gateway destination chain, SCA, backing EOA, creation-chain Portal, refund-chain Portal, vault, token, amount, route hash, intent hash, and deadline as different fields. Never substitute one for another. A composed Eco flow can publish the event on one chain while leaving the refundable vault on another, and Portal deployment addresses need not match across chains.
  • Check every value before putting it in a command, whether it came from the user, an evidence file, or the Eco API: addresses are `0x` +
Read more
@circlefin
Ships withskills

Ship stablecoin apps faster with Circle Skills: best-practice guidance for USDC payments, crosschain transfers, wallets, and smart contracts, plus Circle's MCP server for real-time SDK and documentation context.

17020 skills1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
170
Star history of circlefin/skills on GitHub, a chart by star-history.com

Other skills on skills.

accept-agent-payments

accept-agent-payments

Use when a developer wants to monetize an API, endpoint, service, model, dataset, tool, or agent-facing resource with Circle USDC…

@circlefin@circlefinInstall Skill
agent-wallet-policy

agent-wallet-policy

View spending policy on a Circle agent wallet — per-transaction, daily, weekly, and monthly USDC caps and contract allowlists via…

@circlefin@circlefinInstall Skill
bridge-tokens

bridge-tokens

Build browser or server token bridging across chains with Circle App Kit or standalone Bridge Kit. Bridges USDC across CCTP…

@circlefin@circlefinInstall Skill
buy-crypto

buy-crypto

Set up and integrate Circle Onramp, the hosted widget that lets end users buy crypto with fiat (bank transfer, debit card, Apple…

@circlefin@circlefinInstall Skill
fund-agent-wallet

fund-agent-wallet

Fund a Circle agent wallet with USDC via the `circle` CLI. Payments are gas-abstracted: users pay with USDC only, no ETH…

@circlefin@circlefinInstall Skill
pay-via-agent-wallet

pay-via-agent-wallet

Use this skill when the user wants to call a paid API, look something up online, search for data, get prices, odds, or stats, or…

@circlefin@circlefinInstall Skill

More skills from other plugins.

gitnexus-cli

gitnexus-cli

Use when the user needs to run GitNexus CLI commands like analyze/index a repo, check status, clean the index, generate a wiki,…

@abhigyanpatwari@abhigyanpatwariInstall Skill
fastmcp-client-cli

fastmcp-client-cli

Query and invoke tools on MCP servers using fastmcp list and fastmcp call. Use when you need to discover what tools a server…

fastmcp8d29k
@prefecthq@prefecthqInstall Skill
n8n-agents

n8n-agents

Design n8n AI agents the right way. Use when building or editing any @n8n/n8n-nodes-langchain.* AI node — an AI Agent, LLM chain,…

n8n-mcp7d23k
@czlonkowski@czlonkowskiInstall Skill
post-to-xhs

post-to-xhs

小红书内容发布技能。支持两种发布模式:(1) 上传图文模式 - 图片+短文;(2) 写长文模式 - 长篇文章+排版模板。 支持两种输入方式:用户提供完整内容和图片/图片URL,直接发布;或提供网页URL,自动提取内容和图片。…

@xpzouying@xpzouyingInstall Skill

Questions about recover-eco-funds.

Which coding agents can use recover-eco-funds?
recover-eco-funds installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.