cow-swap

cow-swap is a skill for Claude Code, Codex from krzysu/cow-mcp. It costs 85 tokens per session (2,424 once invoked), scanned A, original, MIT.

A guided workflow for completing a CoW Protocol token swap, from getting a quote through approval, signing, submission, and status checks.

In plain words
What is it for?
Use it when swapping tokens such as ETH, COW, USDC, or DAI: provide the trade details, review the quote, approve if needed, sign the order, submit it, and track its result.
Why use it?
It breaks a blockchain trade into separate confirmation and safety steps, including the point where the user must approve the quoted terms.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when swapping tokens such as ETH, COW, USDC, or DAI: provide the trade details, review the quote, approve if needed, sign the order, submit it, and track its result.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/krzysu/cow-mcp/cow-swap
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add krzysu/cow-mcp --skill cow-swap
Clone the repo
git clone --depth 1 https://github.com/krzysu/cow-mcp

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cow-swap

README.md
[![agentmods](https://agentmods.dev/badge/skills/krzysu/cow-mcp/cow-swap/github.svg)](https://agentmods.dev/skills/krzysu/cow-mcp/cow-swap)
Your own site
<a href="https://agentmods.dev/skills/krzysu/cow-mcp/cow-swap"><img src="https://agentmods.dev/badge/skills/krzysu/cow-mcp/cow-swap/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cow-swap

Your own site · 80×15
<a href="https://agentmods.dev/skills/krzysu/cow-mcp/cow-swap"><img src="https://agentmods.dev/badge/skills/krzysu/cow-mcp/cow-swap.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 85 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,424 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00085 $0.02424
Opus 5 $0.00043 $0.01212
Sonnet 5 $0.00017 $0.00485
Haiku 4.5 $0.00009 $0.00242

Measured 12d ago against content hash b3d3e051c24b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

cow-swap scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/cow-swap/SKILL.md · 130 lines

How it starts

The opening of the file, as written. The whole thing — 130 lines — stays where its author put it; the contents beside it link to each section on GitHub.

cow-swap

You are placing a CoW Protocol swap on behalf of the user. cow-mcp gives you the read/build/submit tools, but never signs. Your job is to drive the multi-step flow, decide when each tool fires, and route the signing step to the right place.

High-level flow

1. Parse intent     → chainId, sellToken, buyToken, kind, amount, from
2. Quote            → cow_get_quote
3. Confirm          → show price, fee, slippage; get user OK
4. Approval gate    → cow_check_approval; if needed, cow_build_approval and wait for on-chain confirm
5. Build order      → cow_build_order  (returns typedData)
6. Sign             → route to signer (see below)
7. Submit           → cow_submit_order  (returns uid)
8. Check status     → cow_get_order until fulfilled / expired / cancelled

Each numbered step has a decision gate — don't skip ahead. The user can change their mind at any step; if they do, restart from the relevant step rather than resuming a stale state.

Step 1 — parse intent

Resolve every required field before calling any tool. All six must be set before step 2 — if any is missing, ask the user; do not guess.

  • chainId — default to 1 (Ethereum). If the user says a chain by name ("on Arbitrum"), map it; if unsure, call cow_list_chains and ask.
  • sellToken / buyToken — accept symbols (WETH, USDC) or 0x addresses. cow-mcp resolves symbols per chain. If the user wants to sell native ETH (no WETH on hand), this skill does not support it — CoW Eth Flow handles that path by atomically wrapping + ordering, but cow-mcp doesn't expose Eth Flow yet. Either ask the user to wrap to WETH first, or decline. Buying native ETH is fine — just pass the sentinel 0xeeee…eeee (or omit a buyToken symbol; the orderbook auto-resolves).
  • kind"sell" (lock in sellAmount, accept variable buyAmount) or "buy" (lock in buyAmount, accept variable sellAmount). Phrase like "swap X for Y" → sell; "buy X paying Y" → buy.
  • amount — base units, decimal string. Convert from human input using token decimals (cow_list_tokens if you don't already know).
  • from — the signer / order owner address. Required for build and submit. If missing, ask the user.

Read the full file on GitHub · 130 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 130 lines · 85 tokens per session scan A b3d3e051c24b

Subscribe to this mod's changes

cow-swap is a skill published in the GitHub repository krzysu/cow-mcp (0 stars, last pushed 4mo ago), licensed MIT. It adds 85 tokens to every session and 2,424 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.