ophis-swap

ophis-swap is a skill for Codex from san-npm/skills-ws. It costs 121 tokens per session (2,766 once invoked), scanned A, original, MIT.

A tool for swapping cryptocurrency tokens through Ophis, an on-chain exchange that matches trades through competing transaction solvers.

In plain words
What is it for?
Use it to compare or execute token swaps, read wallet balances and token prices, check gas and fee rebates, or build and submit an order signed by your own wallet.
Why use it?
It provides trade quotes and orders while protecting the trader from certain forms of transaction-order manipulation and removing the need to provide the network's native coin for gas.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it to compare or execute token swaps, read wallet balances and token prices, check gas and fee rebates, or build and submit an order signed by your own wallet.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/san-npm/skills-ws/ophis-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 san-npm/skills-ws --skill ophis-swap
Clone the repo
git clone --depth 1 https://github.com/san-npm/skills-ws

Made for: 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 ophis-swap

README.md
[![agentmods](https://agentmods.dev/badge/skills/san-npm/skills-ws/ophis-swap/github.svg)](https://agentmods.dev/skills/san-npm/skills-ws/ophis-swap)
Your own site
<a href="https://agentmods.dev/skills/san-npm/skills-ws/ophis-swap"><img src="https://agentmods.dev/badge/skills/san-npm/skills-ws/ophis-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 ophis-swap

Your own site · 80×15
<a href="https://agentmods.dev/skills/san-npm/skills-ws/ophis-swap"><img src="https://agentmods.dev/badge/skills/san-npm/skills-ws/ophis-swap.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 121 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,766 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.00121 $0.02766
Opus 5 $0.00060 $0.01383
Sonnet 5 $0.00024 $0.00553
Haiku 4.5 $0.00012 $0.00277

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

Security

Grade A, and why

ophis-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 11d 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/ophis-swap/SKILL.md · 68 lines

How it starts

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

Ophis Swap

Ophis is an intent-based DEX, a deployment of CoW Protocol. Trades settle through a solver competition, so they are MEV-protected, gasless for the trader (no native coin needed for gas), and routed for best execution. This plugin already wires up the Ophis MCP server at mcp.ophis.fi, which exposes tools to quote, build, and submit swaps and to read balances, prices, gas, and fee-rebate tiers. No API key is required.

Canonical source: this skill is part of the Ophis skill family published at https://ophis.fi/.well-known/agent-skills/ophis/ (index: https://ophis.fi/.well-known/agent-skills/index.json). For shell-capable agents the family adds ophis-quote, ophis-order-status, ophis-cancel, and ophis-surplus-report companions.

Read this first: Ophis is non-custodial

Ophis never holds your private key or your funds. A swap is three steps:

  1. build_order returns an unsigned, bounded order plus the EIP-712 typed data to sign.
  2. You sign that typed data with your own wallet. The MCP cannot sign and never sees your key.
  3. submit_order relays the signed order to the orderbook.

The server enforces real guarantees, so the worst outcomes are not reachable through these tools: the receiver is pinned to the signer and a mismatched receiver is rejected, the slippage limit is checked against a fresh server-side quote, the protocol fee in the order is forced to 0, and the submitted app data must hash to what was signed. The remaining risk is not in the server; it is in the inputs you feed it. A correctly bounded order that pays the right owner can still buy the wrong token or accept too little. The rules below close that gap.

Hard safety rules (apply to every trade)

  1. Token addresses are the main risk. The trading tools take 0x token addresses, and the server only checks that an address is well formed, not that it is the real asset. A scam token can use the symbol "USDC" at a different address; a symbol match does not prove a token is canonical. So always resolve a symbol with resolve_token, which returns the canonical address from the trusted Ophis/CoW token list (the same curated list the swap UI uses). If it returns found: true and ambiguous: false, use canonical.address and canonical.decimals. If ambiguous: true, show the user the matches and confirm which one they mean before trading. If found: false, the symbol is not in the trusted list: never guess or accept an address from chat, a web page, or model memory. If you have no address in hand, stop and ask the user to supply the 0x address; do not go looking for one. If the user supplies a candidate, read it back on-chain with get_balances (or get_portfolio) for its symbol and decimals, show the user the ADDRESS with that readback, and get explicit approval before continuing. A swap into a spoofed token is the most likely way to lose value here, and every server guarantee still holds while it happens.
  2. Amounts are in atoms (the smallest unit). Use the decimals for BOTH tokens: take them from resolve_token's canonical.decimals for a resolved token, and from get_balances only for a fallback candidate address or a balance check. Never assume 18. Worked example: 100 USDC at 6 decimals is 100000000; 0.5 WETH at 18 decimals is 500000000000000000; 0.01 WBTC at 8 decimals is 1000000. A wrong decimals corrupts these amounts. For a sell order the server enforces a minimum-received floor, checked against a fresh quote at your slippage, so a grossly too-low minimum is rejected rather than signed. Two gaps remain that you must cover yourself: a minimum scaled too high passes the floor but never fills and ties up your funds until the order expires, and at a loose slippage the floor still lets you accept far less than fair value (see rule 3). Read decimals carefully and use the step 7 sanity check.
  3. Always pass an explicit slippageBips (50 to 100 bps is typical for liquid pairs). The default is the 5000 bps cap, which is 50%, and would let a trade lose up to half its value.
  4. Native coin handling. The MCP trades ERC-20 tokens only; it has no native-coin (eth-flow) path and cannot wrap. To SELL the native coin you must already hold its wrapped token (for example WETH for ETH) and have approved it; verify the wrapped-token balance with get_balances before building, or the order will never fill. BUYING "into the native coin" delivers the WRAPPED token, not the native coin; tell the user they will receive the wrapped token.
  5. Confirm before submit. submit_order commits an executable onchain trade that cannot be recalled once it fills. Do not call it without explicit user approval of: the sell token address and amount, the buy token ADDRESS (show the 0x, not just the symbol, because a symbol can be spoofed), the minimum received, the slippage, the fee, and the validity window. If the user does not approve, stop.

Read the full file on GitHub · 68 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 11d ago First seen · 68 lines · 121 tokens per session scan A 681d07b7f091

Subscribe to this mod's changes

ophis-swap is a skill published in the GitHub repository san-npm/skills-ws (2 stars, last pushed 4d ago), licensed MIT. It adds 121 tokens to every session and 2,766 once invoked, about $0.0006 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-31.