clawd-twamm

clawd-twamm is a skill for Claude Code, Codex from x402agent/solana-clawd. It costs 52 tokens per session (920 once invoked), scanned A, original, MIT.

A skill for scheduling large spot-token swaps through a TWAMM, a system that spreads one trade across time instead of executing it all at once. It also covers running the program that processes those scheduled swaps.

In plain words
What is it for?
It is for planning, building, and operating time-weighted token swaps between assets such as SOL and USDC.
Why use it?
Spreading a large order over time can reduce the price impact of one large swap, but the trade completes later rather than immediately.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for openclaw. Also seen: built for openclaw.

Good fit It is for planning, building, and operating time-weighted token swaps between assets such as SOL and USDC.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/x402agent/solana-clawd/clawd-twamm
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 clawd-twamm
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 clawd-twamm

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/x402agent/solana-clawd/clawd-twamm"><img src="https://agentmods.dev/badge/skills/x402agent/solana-clawd/clawd-twamm.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 920 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.00052 $0.00920
Opus 5 $0.00026 $0.00460
Sonnet 5 $0.00010 $0.00184
Haiku 4.5 $0.00005 $0.00092

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

Security

Grade A, and why

clawd-twamm 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 9d 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/clawd-twamm/SKILL.md · 101 lines

How it starts

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

clawd-twamm

Use this skill when the user wants to:

  • Schedule a large spot swap via the TWAMM on-chain program
  • Run or automate the permissionless TWAMM crank
  • Check TWAMM workspace status / build the Anchor program
  • Route a large order through time-weighted execution instead of a single AMM swap

What TWAMM Is

TWAMM (Time-Weighted Automated Market Maker) is an Anchor program that executes orders as infinitely many infinitesimal swaps over a time window. The result: the average fill price tracks the time-weighted oracle price, eliminating the price impact a large single swap would cause.

Key trade-off: near-zero slippage vs deferred fill — orders are not immediate.

Workspace Setup

# Check workspace status (finds perps/twamm-master automatically)
clawd perps twamm status

# Build the Anchor program
clawd perps twamm build

# Preview what the crank command will run
clawd perps twamm plan --token-a <MINT_A> --token-b <MINT_B>

Environment variables:

  • CLAWD_TWAMM_ROOT — path to perps/twamm-master (auto-detected if unset)
  • CLAWD_TWAMM_TOKEN_A_MINT — token A mint (default: SOL)
  • CLAWD_TWAMM_TOKEN_B_MINT — token B mint (default: USDC)
  • CLAWD_TWAMM_RPC_URL — RPC endpoint (default: SOLANA_RPC_URL or local)

Running the Crank

The crank is gated — all three must be set before a live run:

CLAWD_TWAMM_LIVE=true OPERATOR_CONFIRMED=true \
  clawd perps twamm crank --token-a <MINT_A> --token-b <MINT_B> --yes

Never pass --yes without confirming the operator has reviewed the crank parameters.

Agent API (ClawdPerpsRuntime)

const runtime = new ClawdPerpsRuntime();

// Check TWAMM workspace status
const status = runtime.getTwammStatus();

// Build a crank plan (dry-run, shows exact command)
const plan = runtime.buildTwammCrankPlan({ tokenAMint, tokenBMint });

// Preview a TWAMM-scheduled execution for a large order
const preview = runtime.previewTwammExecution("SOL", "buy", 50_000);
// preview.twamm = the crank plan
// preview.route.payload.blocked = true until CLAWD_TWAMM_LIVE=true

Read the full file on GitHub · 101 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. 9d ago First seen · 101 lines · 52 tokens per session scan A 8ab83d11ede7

Subscribe to this mod's changes

clawd-twamm is a skill published in the GitHub repository x402agent/solana-clawd (24 stars, last pushed 3mo ago), licensed MIT. It adds 52 tokens to every session and 920 once invoked, about $0.0003 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-09-03.