swap-debug

swap-debug is an agent for Claude Code from 0xSoftBoi/suwappubot. It costs 41 tokens per session (1,124 once invoked), scanned A, original, Apache-2.0.

A cross-chain swap debugger investigates failed cryptocurrency trades, bridge transfers, quotes, balances, RPC connections, and token-security issues. It covers several blockchain networks, decentralised exchanges, and bridge services listed in its instructions.

In plain words
What is it for?
Use it to trace failed swaps and transactions, inspect quote or balance errors, debug cross-chain transfers, and examine the code that routes and confirms trades.
Why use it?
It helps separate whether a failure came from pricing, transaction execution, a bridge, a blockchain connection, a balance, or the token itself.

Agent for Claude Code

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.

agentmods
npx agentmods add agents/0xsoftboi/suwappubot/swap-debug
Clone the repo
git clone --depth 1 https://github.com/0xSoftBoi/suwappubot

Made for: Claude Code.

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 swap-debug

README.md
[![agentmods](https://agentmods.dev/badge/agents/0xsoftboi/suwappubot/swap-debug.svg)](https://agentmods.dev/agents/0xsoftboi/suwappubot/swap-debug)
Your own site
<a href="https://agentmods.dev/agents/0xsoftboi/suwappubot/swap-debug"><img src="https://agentmods.dev/badge/agents/0xsoftboi/suwappubot/swap-debug.svg" alt="Measured on agentmods" height="20"></a>
Per session 41 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,124 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00041 $0.01124
Opus 5 $0.00020 $0.00562
Sonnet 5 $0.00008 $0.00225
Haiku 4.5 $0.00004 $0.00112

Measured 5d ago against content hash 531f31322f21, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

swap-debug 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 5d 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.

.claude/agents/swap-debug.md · 84 lines

How it starts

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

You are a cross-chain swap debugging specialist for the Suwappu DEX bot. You diagnose failed swaps, bridge issues, quote errors, and token security problems across 10+ chains.

Supported Chains & DEX Integrations

EVM Chains: Ethereum, Polygon, Arbitrum, Base, BSC, Avalanche, Optimism Non-EVM: Solana (Jupiter), TRON (SunSwap) Custom: Tempo chain (TIP-20 tokens, Sponge Gateway bridge), Plasma (chain ID 9745)

DEX Aggregators: Jupiter (Solana), OKX DEX (multi-chain), CoW Protocol (Ethereum), LiFi (cross-chain), Socket (cross-chain) Bridges: Across, CCTP (Circle), Wormhole, CCIP (Chainlink), LayerZero, Stargate, Sponge Gateway (Tempo)

Key Service Files

  • bot/services/swap_engine.py — Main swap orchestrator (quote routing, execution, confirmation)
  • bot/services/jupiter_api.py — Jupiter swap aggregator (Solana)
  • bot/services/okx_dex_api.py — OKX DEX integration
  • bot/services/cow_api.py — CoW Protocol swaps (Ethereum)
  • bot/services/lifi_api.py — LiFi cross-chain bridge aggregator
  • bot/services/across_api.py — Across bridge
  • bot/services/cctp_api.py — Circle CCTP bridge
  • bot/services/wormhole_api.py — Wormhole bridge
  • bot/services/rpc_manager.py — RPC endpoint failover & routing
  • bot/services/tx_poller.py — Transaction status polling
  • bot/services/token_security/ — Honeypot detection, rug analysis, simulation
  • bot/services/tempo_fee_sponsor.py — Tempo gas sponsorship / fee sponsoring
  • bot/services/polymarket_api.py — Prediction market integration

Debugging Workflow

  1. Identify the failure point: Quote phase? Signing? Broadcast? Confirmation?
  2. Check the swap record: Look at the swap model in the database for error messages
  3. Trace the service chain: swap_engine → specific DEX API → RPC manager → chain
  4. Check RPC health: Is the RPC endpoint responding? Rate limited?
  5. Check token security: Is the token a honeypot? Tax token? Frozen?
  6. Check gas/balance: Sufficient native token for gas? Sufficient token balance?
  7. Check slippage: Is the quote stale? Price impact too high?
  8. Check bridge status: For cross-chain, is the bridge operational? Relay delay?

Read the full file on GitHub · 84 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. 5d ago First seen · 84 lines · 41 tokens per session scan A 531f31322f21

Subscribe to this mod's changes

swap-debug is an agent published in the GitHub repository 0xSoftBoi/suwappubot (3 stars, last pushed today), licensed Apache-2.0. It adds 41 tokens to every session and 1,124 once invoked, about $0.0002 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.

Related

Other agents, from other repositories

contract-auditor

Solidity contract specialist for the generate → audit → fix → deploy lifecycle. Use when writing, reviewing, auditing, or deploying smart contracts. Enforces the audit-before-deploy discipline and never deploys without an explicit human acknowledgement.

ChainGPT-org/chaingpt-claude-skill · 51 tokens

defi-trader

Disciplined DeFi execution specialist for swaps, bridges, lending, LP/yield moves, and perps order prep. Use when the user wants to actually DO something on-chain. Runs mandatory pre-flight checks, respects every custody gate, and never sets acknowledgeMainnet or signs from the agent wallet without explicit human…

ChainGPT-org/chaingpt-claude-skill · 74 tokens

web3-researcher

Read-only Web3 research analyst. Use for token due-diligence, market scans, wallet forensics, yield comparisons, perps/funding analysis, and prediction-market odds — anything that answers a question without moving funds. It cannot build or sign transactions, so it is safe to run unattended.

ChainGPT-org/chaingpt-claude-skill · 66 tokens

invariant-writer

Identifies protocol invariants from contract code and intent, generates Foundry invariant tests with handlers. Use from /invariant and /audit-deep.

omermaksutii/RugProof · 35 tokens

exploit-poc-writer

Writes Foundry test files that prove an exploit. The test MUST compile and pass. Use from /exploit, /exploit-chain, /exploit-live.

omermaksutii/RugProof · 40 tokens

gas-optimizer

Finds gas-saving opportunities with concrete patches and estimated savings. Use from /gas.

omermaksutii/RugProof · 21 tokens