atomic-rescue

Transfers SPL and Token-2022 balances from compromised Solana wallets inside Jito bundles.

15|2|Updated May 19, 2026
One-click install
npx skills add https://github.com/nirholas/atomic --skill atomic-rescue-nirholas
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: atomic-rescue
Source: https://github.com/nirholas/atomic/tree/main/skills/rescue
Command: npx skills add https://github.com/nirholas/atomic --skill atomic-rescue-nirholas

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When a Solana wallet's private key leaks, sweeper bots watch the address and drain any deposited tokens within seconds. This Skill moves SPL or Token-2022 balances out of the compromised wallet inside a single Jito bundle, so no bot can insert a competing transfer between the read and the write. ## Core Features & Use Cases - Atomic token rescue: Executes the full balance transfer inside one Jito bundle, eliminating the window sweeper bots exploit. - Dual token program support: Handles both classic SPL Token (Tokenkeg) and Token-2022 (TokenzQd) mints, including resolving transfer-hook accounts for Token-2022. - Separate rent payer: Supports a clean RENT_PAYER_SECRET wallet to cover the Jito tip and destination ATA rent when the leaked wallet has no SOL. - Use Case: You bought tokens into a wallet whose key was exposed. Chain the buy and this rescue script in one bundle so the tokens land directly in your safe wallet without ever resting in the compromised address. ## Quick Start Set SOURCE_SECRET, DESTINATION, and MINT environment variables, then run npm run transfer-tokens from the repo root to move the full balance into your safe wallet.

Frequently Asked Questions about atomic-rescue

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I rescue tokens from a leaked Solana wallet?▼

Set SOURCE_SECRET to the compromised wallet, DESTINATION to a safe wallet, and MINT to the token address, then run npm run transfer-tokens. The script executes the transfer inside a Jito bundle so sweeper bots cannot insert a competing transaction.

How to transfer Token-2022 tokens with transfer hooks on Solana?▼

The script detects the mint's program ID and builds the correct Token-2022 transfer instruction, resolving transfer-hook accounts from the mint's TransferHook extension. Unknown hook programs cause the bundle to fail with MissingAccount.

Can I drain a wallet that has no SOL for fees?▼

Yes, set RENT_PAYER_SECRET to a separate clean wallet that pays the Jito tip and destination ATA creation rent. Without it, the bundle fails because the source wallet cannot cover transaction costs.

Why does my rescue bundle fail against sweeper bots?▼

Sweeper bots submit competing bundles targeting the same wallet, and the higher Jito tip wins. Start with JITO_TIP=0.005 SOL and increase it if bundles return Invalid or fail to land.

Is a wallet safe to reuse after rescuing its tokens?▼

No. Treat the source wallet as permanently compromised after a rescue, since sweepers watch the address indefinitely. Generate a fresh wallet for any future use of that role.