real claude skill inspired by @GeoffreyHuntley :)
Sell all SPL tokens in your Solana wallet for SOL.
- Install dependencies:
cd ~/.claude/skills/derisk
npm install-
Make sure you have a Solana keypair at
~/.config/solana/id.jsonor setSOLANA_KEYPAIR_PATH -
(Recommended) Get a free RPC URL from Helius, QuickNode, or Alchemy
Just say one of:
derisksell all tokensliquidate walletsell everything
# With default settings
node derisk.mjs
# With custom RPC and keypair
SOLANA_RPC_URL=https://mainnet.helius-rpc.com/?api-key=YOUR_KEY \
SOLANA_KEYPAIR_PATH=/path/to/wallet.json \
node derisk.mjs| Variable | Default | Description |
|---|---|---|
SOLANA_RPC_URL |
https://api.mainnet-beta.solana.com |
Solana RPC endpoint |
SOLANA_KEYPAIR_PATH |
~/.config/solana/id.json |
Path to wallet keypair |
- Loads your local Solana keypair
- Fetches all SPL token accounts with non-zero balance
- Gets quotes from Jupiter for each token -> SOL
- Executes swaps with 1% slippage tolerance
- Prints "Congrats you have derisked"
- Your private key never leaves your machine
- Skips wrapped SOL (no point swapping SOL for SOL)
- Needs ~0.005 SOL per swap for transaction fees
- Public RPC is rate limited - use a dedicated RPC for reliability
