dflow-spot-trading

dflow-spot-trading is a skill for Claude Code, Codex from x402agent/solana-clawd. It costs 102 tokens per session (3,505 once invoked), scanned A, original, MIT.

A Solana token-swapping helper that uses DFlow, a trading service, to quote and execute exchanges between token pairs.

In plain words
What is it for?
Getting swap quotes, trading from a command line, integrating swaps into web or mobile applications, adjusting priority fees, and building gasless or sponsored swaps.
Why use it?
It gathers the command-line and API procedures needed to handle quotes, transactions, congestion fees, and optional sponsored fees without guessing at DFlow's interface.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit Getting swap quotes, trading from a command line, integrating swaps into web or mobile applications, adjusting priority fees, and building gasless or sponsored swaps.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/x402agent/solana-clawd/dflow-spot-trading
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 x402agent/solana-clawd --skill dflow-spot-trading
Clone the repo
git clone --depth 1 https://github.com/x402agent/solana-clawd

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 dflow-spot-trading

README.md
[![agentmods](https://agentmods.dev/badge/skills/x402agent/solana-clawd/dflow-spot-trading/github.svg)](https://agentmods.dev/skills/x402agent/solana-clawd/dflow-spot-trading)
Your own site
<a href="https://agentmods.dev/skills/x402agent/solana-clawd/dflow-spot-trading"><img src="https://agentmods.dev/badge/skills/x402agent/solana-clawd/dflow-spot-trading/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 dflow-spot-trading

Your own site · 80×15
<a href="https://agentmods.dev/skills/x402agent/solana-clawd/dflow-spot-trading"><img src="https://agentmods.dev/badge/skills/x402agent/solana-clawd/dflow-spot-trading.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 102 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,505 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.00102 $0.03505
Opus 5 $0.00051 $0.01752
Sonnet 5 $0.00020 $0.00701
Haiku 4.5 $0.00010 $0.00350

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

Security

Grade A, and why

dflow-spot-trading 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 10d 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.

agents/skills/dflow-spot-trading/SKILL.md · 119 lines

How it starts

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

DFlow Spot Trading

Swap any pair of Solana tokens via DFlow. Imperative trades (the default) settle synchronously in one transaction; declarative trades are opt-in for users who explicitly want better execution.

Prerequisites

  • DFlow docs MCP (https://pond.dflow.net/mcp) — install per the repo README. This skill is the recipe; the MCP is the reference. Look up endpoint shapes, parameter details, error codes, and anything else field-level via search_d_flow / query_docs_filesystem_d_flow — don't guess.
  • dflow CLI (optional, for command-line/agent use) — install per the repo README.

Choose your surface

  • CLI — command line, scripts, local agents. Manages keys, signs, broadcasts.
  • API — web/mobile apps, backends, automations with their own wallet/signer. Browser apps must proxy HTTP through their backend (the Trading API serves no CORS).

If unclear, ask once: "From the command line, or wired into an app?"

Workflows

Quote (read-only)

  • CLI: dflow quote <atomic-amount> <FROM> <TO>
  • API: GET /order doubles as a quote — including without a userPublicKey, in which case it returns all price fields with no transaction attached. Use this for live-quote UIs before the user has connected a wallet. Don't reach for /quote separately; it's the older surface and the docs redirect back to /order.

Trade — imperative /order (the default)

Single round-trip: get a quote and a signed-ready VersionedTransaction together; sign, submit, confirm. Fully synchronous. Works with all SPL + Token-2022 mints.

  • CLI: dflow trade <atomic-amount> <FROM> <TO> (add --confirm for agents/scripts that need to block until confirmed).
  • API: GET /order?userPublicKey=&inputMint=&outputMint=&amount=, deserialize transaction (base64) → VersionedTransaction, sign + broadcast, confirm against the blockhash DFlow signed with. Two broadcast idioms — pick the one that matches your context:
    • Browser wallet-adapter app (the default for UIs). const sig = await wallet.sendTransaction(tx, connection). The wallet signs and broadcasts through its own RPC — your connection only needs to serve reads (confirmTransaction).
    • Node script / server-side signing with a Keypair. Two-step: tx.sign([keypair])connection.sendRawTransaction(tx.serialize()). Your RPC is what broadcasts; a public endpoint will 403.

Read the full file on GitHub · 119 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. 10d ago First seen · 119 lines · 102 tokens per session scan A c22be920f908

Subscribe to this mod's changes

dflow-spot-trading is a skill published in the GitHub repository x402agent/solana-clawd (24 stars, last pushed 3mo ago), licensed MIT. It adds 102 tokens to every session and 3,505 once invoked, about $0.0005 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.