|
| 1 | +--- |
| 2 | +id: "claim-with-ai-skills" |
| 3 | +sidebar_position: 2 |
| 4 | +title: "Claim with AI" |
| 5 | +--- |
| 6 | + |
| 7 | +# Claim with AI |
| 8 | + |
| 9 | +Recipients can claim unlocked Sablier vesting streams from the terminal by asking an AI coding agent in plain English. |
| 10 | +The agent discovers claimable streams, previews the transaction plan, and asks you to sign with your wallet. |
| 11 | + |
| 12 | +This guide focuses on [`sablier-withdraw-vesting`](https://github.com/sablier-labs/sablier-skills), the skill for |
| 13 | +withdrawing unlocked tokens from Lockup vesting streams on EVM chains and Solana. |
| 14 | + |
| 15 | +:::tip[Payments streams] |
| 16 | + |
| 17 | +For Sablier Payments (Flow) streams, use [`sablier-withdraw-open-ended-stream`](#payments-streams). Same philosophy, |
| 18 | +different skill. |
| 19 | + |
| 20 | +::: |
| 21 | + |
| 22 | +:::info[App availability] |
| 23 | + |
| 24 | +`app.sablier.com` is not being deprecated. The EVM app will remain available for claiming until June 2028. The |
| 25 | +limitation is creation: new EVM streams cannot be created from `app.sablier.com`. |
| 26 | + |
| 27 | +`solana.sablier.com` is the app being deprecated. For Solana claims, use the AI skill or interact with the program |
| 28 | +directly. |
| 29 | + |
| 30 | +::: |
| 31 | + |
| 32 | +## Prerequisites |
| 33 | + |
| 34 | +### Agent |
| 35 | + |
| 36 | +- [**Claude Code CLI**](https://docs.claude.com/en/docs/claude-code/overview), the terminal tool. |
| 37 | +- [**Codex**](https://github.com/openai/codex), OpenAI's coding agent. |
| 38 | + |
| 39 | +:::caution[Claude Code CLI, not the desktop app] |
| 40 | + |
| 41 | +The skill runs in **Claude Code**, the terminal CLI. The Claude **desktop app** (`claude.ai` chat client) cannot install |
| 42 | +skills or sign on-chain transactions on your behalf. |
| 43 | + |
| 44 | +::: |
| 45 | + |
| 46 | +### Shared tools |
| 47 | + |
| 48 | +- `curl` and `jq`, for talking to the Sablier indexer and parsing transaction receipts. |
| 49 | +- A wallet that controls the stream recipient address. |
| 50 | +- A small native-token balance for transaction fees. |
| 51 | + |
| 52 | +### EVM tools |
| 53 | + |
| 54 | +- [**Foundry**](https://getfoundry.sh/), because the skill drives `cast` for RPC reads and signing. Your `cast` must |
| 55 | + support `--browser`; if you installed Foundry months ago, run `foundryup` first. |
| 56 | +- A browser wallet extension, such as MetaMask, Rabby, or Frame, holding the recipient address. |
| 57 | +- Enough native token to cover gas, plus the protocol withdraw fee on Lockup v3.0+ (often `0`, but not always). The |
| 58 | + skill previews the exact amount before broadcasting. |
| 59 | + |
| 60 | +### Solana tools |
| 61 | + |
| 62 | +- A Solana wallet that controls the recipient public key. |
| 63 | +- Enough SOL to cover transaction fees, plus the program withdrawal fee when it is nonzero. |
| 64 | + |
| 65 | +## Install |
| 66 | + |
| 67 | +Add the withdraw skill to your agent: |
| 68 | + |
| 69 | +```bash |
| 70 | +npx skills add sablier-labs/sablier-skills --skill sablier-withdraw-vesting |
| 71 | +``` |
| 72 | + |
| 73 | +This pulls the skill from [`sablier-labs/sablier-skills`](https://github.com/sablier-labs/sablier-skills) and registers |
| 74 | +it under `~/.claude/skills/sablier-withdraw-vesting` (global install) or `./.claude/skills/sablier-withdraw-vesting` |
| 75 | +(project-local). Claude Code auto-discovers it in new sessions. |
| 76 | + |
| 77 | +## EVM Lockup streams |
| 78 | + |
| 79 | +### Prompt |
| 80 | + |
| 81 | +Open Claude Code (or Codex) in any working directory and ask in plain English. The skill accepts up to three optional |
| 82 | +arguments: chain, wallet, and token. It asks for anything missing. |
| 83 | + |
| 84 | +```text |
| 85 | +withdraw everything I can claim from Sablier |
| 86 | +``` |
| 87 | + |
| 88 | +```text |
| 89 | +claim my Sablier streams on Ethereum |
| 90 | +``` |
| 91 | + |
| 92 | +```text |
| 93 | +withdraw my Sablier USDC vesting on Base for 0xMyWalletAddress |
| 94 | +``` |
| 95 | + |
| 96 | +There is no stream URL to copy. The skill queries the Sablier indexer for active, non-depleted streams where your wallet |
| 97 | +is the recipient, then keeps only streams with a positive `withdrawableAmountOf` at the current block. |
| 98 | + |
| 99 | +| Terminal session running the skill | |
| 100 | +| ------------------------------------------------------------------- | |
| 101 | +|  | |
| 102 | + |
| 103 | +### Discovery and batching |
| 104 | + |
| 105 | +For EVM chains, the skill walks through this flow: |
| 106 | + |
| 107 | +1. **Chain discovery**: if you did not name a chain, it asks the indexer where your wallet has active streams. It |
| 108 | + auto-picks a single match or asks you to choose. |
| 109 | +2. **Stream discovery**: it pulls every non-depleted stream where you are the recipient on the chosen chain, then drops |
| 110 | + streams with `withdrawableAmountOf == 0` via one Multicall3 round trip. |
| 111 | +3. **Selection**: it defaults to draining every eligible stream. You can narrow the selection before signing. |
| 112 | +4. **Grouping**: it splits the selection by Lockup contract address. Each group becomes one `withdrawMultiple` call and |
| 113 | + one signature. |
| 114 | +5. **Preflight**: it estimates gas per group, computes the required `MSG_VALUE` (the max `calculateMinFeeWei` on Lockup |
| 115 | + v3.0+, `0` on v1.x and v2.x), and verifies that your native-token balance can cover the whole batch. |
| 116 | +6. **Preview**: it prints the batch and waits for you to reply literally `YES`. |
| 117 | +7. **Broadcast**: it opens one browser tab per group on `localhost:9545`; you approve each transaction in your browser |
| 118 | + wallet. `cast send --browser` routes signing to the extension, so your private key never enters the terminal or chat. |
| 119 | +8. **Receipt verification**: it polls each receipt for up to 5 minutes, then scans logs for |
| 120 | + `InvalidWithdrawalInWithdrawMultiple` events (Lockup v2.0+) so silently failed streams are surfaced. |
| 121 | + |
| 122 | +This works across every EVM chain where Sablier Lockup is deployed. See [Lockup deployments](/guides/lockup/deployments) |
| 123 | +for the full list. One invocation handles one chain; re-run the skill for another chain. |
| 124 | + |
| 125 | +### Preview |
| 126 | + |
| 127 | +Before any signature request, the skill prints a human-readable preview covering every group it is about to broadcast. |
| 128 | +Trimmed example for a wallet holding v1.2 USDC streams and v4.0 SABL streams on the same chain: |
| 129 | + |
| 130 | +```text |
| 131 | +Chain: Ethereum (1) |
| 132 | +Signer: 0xOwner... (matches recipient) |
| 133 | +Total fee: 0.0005 ETH |
| 134 | +Estimated gas: 0.0021 ETH |
| 135 | +
|
| 136 | +Group 1/2 -- Lockup Linear v1.2 |
| 137 | + Contract: 0xAAA... |
| 138 | + Streams (2): |
| 139 | + LL2-1-887 -> 120 USDC (sender 0xc517...063c) |
| 140 | + LL2-1-902 -> 45.5 USDC (sender 0xc517...063c) |
| 141 | + Group fee: 0 ETH (non-payable) |
| 142 | +
|
| 143 | +Group 2/2 -- Lockup v4.0 |
| 144 | + Contract: 0x93b37Bd5B6b278373217333Ac30D7E74c85fBDCB |
| 145 | + Streams (3): |
| 146 | + LK3-1-42 -> 1,234.56789 SABL (sender 0xab12...cd34) |
| 147 | + LK3-1-58 -> 250 SABL (sender 0xab12...cd34) |
| 148 | + LK3-1-77 -> 100 SABL (sender 0x99aa...bbcc) |
| 149 | + Group fee: 0.0005 ETH |
| 150 | +
|
| 151 | +Per-token totals: |
| 152 | + USDC: 165.5 |
| 153 | + SABL: 1,584.56789 |
| 154 | +
|
| 155 | +Confirm broadcast for 2 transactions? |
| 156 | +Reply exactly: YES |
| 157 | +``` |
| 158 | + |
| 159 | +Anything other than a literal `YES` aborts before any transaction is broadcast. |
| 160 | + |
| 161 | +| Batch preview before broadcast | |
| 162 | +| ------------------------------------------------- | |
| 163 | +|  | |
| 164 | + |
| 165 | +### Signing and verification |
| 166 | + |
| 167 | +The skill charges no markup. Costs are limited to on-chain gas and, on Lockup v3.0+, the protocol fee returned by |
| 168 | +`calculateMinFeeWei`, which is frequently `0`. |
| 169 | + |
| 170 | +| Browser wallet signing prompt | |
| 171 | +| --------------------------------------------------------------- | |
| 172 | +|  | |
| 173 | + |
| 174 | +After each group lands, the skill prints per-stream `https://app.sablier.com/vesting/stream/{alias}` links so you can |
| 175 | +spot-check the result. |
| 176 | + |
| 177 | +| Post-broadcast confirmation | |
| 178 | +| ----------------------------------------------------------------- | |
| 179 | +|  | |
| 180 | + |
| 181 | +## Solana Lockup streams |
| 182 | + |
| 183 | +### Prompt |
| 184 | + |
| 185 | +The same skill covers Solana mainnet-beta. Pass `solana` as the chain and provide the recipient public key: |
| 186 | + |
| 187 | +```text |
| 188 | +withdraw my Sablier streams on Solana for <my-base58-pubkey> |
| 189 | +``` |
| 190 | + |
| 191 | +### Discovery and batching |
| 192 | + |
| 193 | +Solana uses a single-stream claim flow. There is no `withdrawMultiple` equivalent that fits Solana's 1232-byte |
| 194 | +transaction limit, so re-run the skill once per stream. |
| 195 | + |
| 196 | +The Solana flow is: |
| 197 | + |
| 198 | +1. **Stream discovery**: the skill looks up claimable Solana streams for the recipient public key. |
| 199 | +2. **Selection**: you choose one claimable stream. |
| 200 | +3. **Preflight**: the skill checks the currently withdrawable amount and the required fee. |
| 201 | +4. **Preview**: it shows the stream, token, recipient, and fee before signing. |
| 202 | +5. **Broadcast**: you sign one transaction for the selected stream. |
| 203 | +6. **Verification**: the skill checks the resulting transaction and prints the outcome. |
| 204 | + |
| 205 | +### Costs and app status |
| 206 | + |
| 207 | +The Solana protocol fee is the program's `WITHDRAWAL_FEE_USD` constant. It is currently `0` on mainnet; otherwise it is |
| 208 | +about $1 in SOL via Chainlink. |
| 209 | + |
| 210 | +Sablier on Solana is in maintenance mode. Creating new Solana streams and airdrop campaigns is no longer supported, and |
| 211 | +`solana.sablier.com` is the app being deprecated. See [Sablier on Solana](/solana/sablier-on-solana) for protocol |
| 212 | +details. |
| 213 | + |
| 214 | +## Troubleshooting |
| 215 | + |
| 216 | +### Shared |
| 217 | + |
| 218 | +**"No active Sablier streams were found".** Either the wallet address is wrong, the connected account is wrong, or the |
| 219 | +streams live on a different chain than the one you named. Re-run without a chain to let the skill scan indexer-wide. |
| 220 | + |
| 221 | +**"Nothing currently unlocked".** Streams exist, but every one has `withdrawableAmountOf == 0` at this block. Wait for |
| 222 | +more tokens to vest and retry. |
| 223 | + |
| 224 | +**Insufficient native balance.** Fund the wallet with the chain's native token to cover transaction fees, plus any |
| 225 | +protocol fee. The preview prints the exact shortfall. |
| 226 | + |
| 227 | +**Transaction still pending after 5 minutes.** The skill stops polling and prints the hash. Check the explorer for the |
| 228 | +chain. If it confirms later, you are done; if it gets dropped, re-run the skill. |
| 229 | + |
| 230 | +**Declined a signature mid-batch.** Earlier groups that already broadcast stay confirmed. The skill stops and tells you |
| 231 | +which groups were not attempted. Re-run the skill to pick up the rest. |
| 232 | + |
| 233 | +### EVM |
| 234 | + |
| 235 | +**`cast: command not found`.** Foundry is not installed or is not on `PATH`. Install it from |
| 236 | +[getfoundry.sh](https://getfoundry.sh/) and start a new shell. |
| 237 | + |
| 238 | +**`cast send` does not recognize `--browser`.** Your Foundry is too old. Run `foundryup`; the skill's prerequisite check |
| 239 | +enforces this and stops early. |
| 240 | + |
| 241 | +**Some streams silently failed.** Lockup v2.0+ emits `InvalidWithdrawalInWithdrawMultiple` instead of reverting when an |
| 242 | +individual stream in the batch cannot be withdrawn. The skill scans receipt logs and prints the affected stream IDs. |
| 243 | +Re-run the skill to retry the surviving streams, or check the failed stream on `app.sablier.com` for a hint (cancelled, |
| 244 | +hook revert, etc.). |
| 245 | + |
| 246 | +### Solana |
| 247 | + |
| 248 | +**Multiple streams are claimable.** Re-run the skill once per stream. The Solana transaction size limit prevents one |
| 249 | +`withdrawMultiple`-style claim from covering the whole wallet. |
| 250 | + |
| 251 | +**The fee is nonzero.** The Solana program fee follows `WITHDRAWAL_FEE_USD`. Fund the wallet with enough SOL for the |
| 252 | +network fee and withdrawal fee, then retry. |
| 253 | + |
| 254 | +## Payments streams |
| 255 | + |
| 256 | +For Sablier Payments (Flow) streams, install the sibling skill: |
| 257 | + |
| 258 | +```bash |
| 259 | +npx skills add sablier-labs/sablier-skills --skill sablier-withdraw-open-ended-stream |
| 260 | +``` |
| 261 | + |
| 262 | +Same shape: natural-language prompt, indexer-driven discovery, browser-wallet signing, applied to open-ended Flow |
| 263 | +streams instead of vesting Lockup streams. See [AI Agents](/guides/ai-agents) for the full skill catalogue. |
0 commit comments