Agent skill
w3rt-swap-safe
Execute a safe two-step Solana swap (quote/simulate then explicit confirm/execute) using w3rt runtime.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/w3rt-swap-safe
Metadata
Additional technical details for this skill
- openclaw
-
{ "emoji": "\ud83d\udd01", "requires": { "bins": [ "node" ], "config": [ "~/.w3rt/config.yaml" ] } }
SKILL.md
w3rt-swap-safe
This skill performs a two-step swap to avoid accidental execution and to survive client retries.
Safety rules (must follow)
- Always run quote first.
- Present a clear summary to the user (from/to/amount/slippage/route).
- Only execute after the user explicitly confirms.
- Start with small amounts when testing.
Step 1 — Quote (build + simulate later)
cd /home/davirain/clawd/web3AIRuntime
node scripts/w3rt_swap_safe.mjs quote --from SOL --to USDC --amount 0.01 --slippage-bps 50
If Jupiter is flaky and you want to allow fallback to Meteora:
node scripts/w3rt_swap_safe.mjs quote --from SOL --to USDC --amount 0.01 --slippage-bps 50 --allow-fallback
This prints JSON with quoteId. Save it.
Step 2 — Execute (requires explicit confirm phrase)
Only after the user confirms, run:
node scripts/w3rt_swap_safe.mjs exec --quote-id <QUOTE_ID> --confirm I_CONFIRM
Output handling
- On success: show signature + Solscan link.
- On simulation failure: show the error + first ~30 logs and STOP.
- Never execute multiple times for the same
quoteId.
Policy
This tool honors ~/.w3rt/config.yaml policy fields:
policy:
maxSlippageBps: 100
maxSwapInputSol: 0.25
maxSwapInputUsdc: 250
requireConfirmPhrase: "I_CONFIRM"
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?