relay-diagnostic/SKILL.md
Operator relay diagnostics and sponsor nonce recovery. Use canonical payment-status polling for caller-facing payment state; use this for relay health and sponsor recovery.
npx skillsauth add aibtcdev/skills relay-diagnosticInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Diagnoses and recovers stuck sponsored transactions by inspecting the sponsor relay's nonce state and optionally triggering automated recovery.
Use this for operator diagnostics only. Caller-facing x402 payment state should come from canonical payment-status polling by paymentId, not from relay health heuristics.
bun run relay-diagnostic/relay-diagnostic.ts <subcommand> [options]
Check the sponsor relay availability and nonce status. No wallet needed.
bun run relay-diagnostic/relay-diagnostic.ts check-health
Output:
{
"healthy": true,
"network": "mainnet",
"version": "1.2.0",
"sponsorAddress": "SP1PMPPVCMVW96FSWFV30KJQ4MNBMZ8MRWR3JWQ7",
"nonceStatus": {
"lastExecuted": 4210,
"lastMempool": 4215,
"possibleNext": 4216,
"missingNonces": [],
"mempoolNonces": [4211, 4212, 4213, 4214, 4215],
"hasGaps": false,
"gapCount": 0,
"mempoolDesync": false,
"desyncGap": 5
},
"stuckTransactions": [],
"issues": [],
"formatted": "Relay Health Check (mainnet)\nStatus: HEALTHY\n..."
}
Attempt automated recovery of stuck transactions. Requires an unlocked wallet.
bun run relay-diagnostic/relay-diagnostic.ts recover [options]
Options:
--action <rbf|fill-gaps|both> — Recovery mode (default: both)--txids <txid,...> — Comma-separated list of specific stuck txids for RBF (omit to bump all)--nonces <n,...> — Comma-separated list of specific missing nonces for gap-fill (omit to fill all)Output:
{
"action": "both",
"rbf": {
"supported": true,
"result": { "bumped": 2 }
},
"fillGaps": {
"supported": true,
"result": { "filled": 0 }
},
"summary": "Recovery request sent to relay. Run check-health to verify nonce state improved."
}
check-health before recover — recovery without a prior health check may bump transactions unnecessarily.supported: false with instructions to contact the AIBTC team.SP1PMPPVCMVW96FSWFV30KJQ4MNBMZ8MRWR3JWQ7.bun run wallet/wallet.ts unlock first).development
Web of Trust operations for Nostr pubkeys — trust scoring, sybil detection, trust path analysis, neighbor discovery, follow recommendations, and network health. Free tier (wot.klabo.world, 50 req/day) with paid fallback (maximumsats.com, 100 sats via L402). Covers 52K+ pubkeys and 2.4M+ zap-weighted trust edges. Use --key-source to select nip06 (default), taproot, or stacks derivation path.
data-ai
BTC ordinals marketplace operations via Magic Eden — browse active listings, list inscriptions for sale via PSBT flow, submit signed listings, buy inscriptions, and cancel active listings. BTC ordinals only (not Solana). Mainnet-only.
testing
Pay-per-call access to LunarCrush social and market intelligence (Galaxy Score, AltRank, market cap rank, price, 24h change) via x402 on Stacks. USD-pegged pricing recomputed hourly from live STX/USD. Mainnet endpoint live; testnet supported.
devops
Detects HODLMM LP inventory drift (token-ratio imbalance from one-sided swap flow) and restores the target ratio via a corrective Bitflow swap plus a hodlmm-move-liquidity redeploy, gated by the 4h per-pool cooldown.