/snaplii-a2m-payment:snaplii-autopilotfrom snaplii-a2m-payment
Automates ordering from delivery sites (Uber Eats, DoorDash, Skip) using Snaplii gift cards: buys discounted card with cashback, redeems code in browser, and checks out with user confirmation.
Ships in snaplii-a2m-payment. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
This skill completes the full Agent-to-Merchant flow: buy a Snaplii gift card (prepaid, capped, cashback) → get its redemption code → open the merchant/delivery site in the browser → add the gift card → place the order. The snaplii-cli skill in this plugin (file ../snaplii-cli/SKILL.md) holds the full gift-card rules; this file carries enough of them to run the flow on its own and adds the browser part.
Every Snaplii operation, including browsing and quotes, needs has_valid_token=true from snaplii_config_show. Check it before step 1 and again after any login. When it is false, call snaplii_connect and act on its result and message: authenticated (the plugin's Snaplii API key option logged in, or the user entered the key on the secure Snaplii page Claude Code opened; if the option's key was rejected, the user fixes or clears it with /plugin configure and restarts Claude Code), pending (the page is open; once the user has submitted, call snaplii_connect again within 2 minutes), card_requested (a secure card appears in the chat; wait for the user to type the key there), or use_terminal_or_chat_key and the other fallbacks (the message names what is left: normally the exact snaplii init command for the user's own terminal window, or pasting the key in chat for snaplii_init when the user chooses it or the message says a terminal login cannot reach this server). Never run init through the Bash tool or pass the key yourself. On auth_required, reauth_required or HTTP 401, return here; a plain 403 is a scope error, not a login trigger. The snaplii-cli skill's Auth section has the full branches.
snaplii_* MCP tools this plugin registers. If the Snaplii MCP server is disabled or its tools are not loaded, use the snaplii CLI at ~/.snaplii-env/bin/snaplii (Windows: %USERPROFILE%\.snaplii-env\Scripts\snaplii.exe); the snaplii-cli skill's Tool reference maps each tool to its command and flags, and snaplii <command> --help shows them too. The snaplii-cli skill covers installing it. The user runs snaplii init in their own terminal window; never run it through the Bash tool.claude --chrome or /chrome. It opens tabs in the user's browser and shares its login state. A browser MCP server such as Chrome DevTools MCP or Playwright MCP also works.If no browser tool is available, don't stop and don't pretend to place the order. Offer the setup: the user runs /chrome (or restarts with claude --chrome) and installs the extension when asked, then you retry; or, if they would rather not, give them the redemption code and the exact steps to add it in the merchant app so they finish in under a minute. Always leave the user with a working option, and never claim to have placed an order you did not place.
snaplii_purchase charges the balance as soon as it runs.snaplii_purchase runs only after the user's explicit "yes" to the quote breakdown (step 2). Show the breakdown together with the fact that the card is bought and charged first and the merchant order comes after it, so if the order is not placed the card stays in their Snaplii account for later, before asking.snaplii-cli rule that reports the code of a just-bought card does not apply while the browser step is live; it applies again only if that step fails and the user has to redeem the code themselves.Complete Auth first, then:
snaplii_browse_tags → categories and brands for the account's country. For delivery, prefer the delivery platform's own card (DoorDash, Uber Eats, Skip): its code is redeemed on that platform in step 3.snaplii_browse_brand(brand_id) → denominations. Copy the chosen entry's item_id verbatim ({cardBrandId}-{cardTemplateId}, e.g. CB00000000000086-CT000000003618); never assemble or guess one, and never pass a brand or template ID alone. FIXED cards have one amount; VARIABLE cards have a real min/max.snaplii_balance → the spendable Snaplii Cash, so you can say up front whether the order is affordable. $0 is normal for a new account: point the user to Wallet → Add Cash in the app and offer to continue once they have topped up.snaplii_quote(item_id, price) → check two fields. brand_name must be the brand the user asked for; if it names another brand, browse again once, and if it still differs, stop and tell the user. If you_pay > 0, Snaplii Cash doesn't cover the card: tell the user to top up in the app and stop.The snaplii-cli skill's Step 4 has the full purchase rules (voucher and cashback options, failure modes).
Show the quote breakdown (brand, card amount, vouchers, Snaplii Cash used, you_pay) and wait for the user's explicit "yes" to buy the card. Then call snaplii_purchase(item_id, price) with the same item_id, price and any voucher/cashback options you quoted. The purchase result does not carry the code; fetch it:
snaplii_giftcard_list → find the new card. If it is not there yet, wait about 10 seconds and list again (page through with page if the user owns many cards).snaplii_giftcard_detail(card_no) → the code. Fields sit under data; use cardCode if present, otherwise pin (DoorDash, for example, uses pin).Confirm the order went through by reading the confirmation page; report the order number and the cashback the user earned via Snaplii. Report only what the page confirms.
invalid_item_id, amount_out_of_range, a gateway MCAP2107, or item_check_unavailable on quote or purchase → nothing was charged. For the first three, rethink the parameters as the retry_hint says (browse the brand again, copy the item_id verbatim, use an allowed amount) and retry once; if the new quote's brand, card amount or you_pay differs from the one the user said yes to, show it and wait for their "yes" to the new quote before buying. After item_check_unavailable, retry the same call once unchanged. If refused again, stop and tell the user which brand and amount could not be bought.outcome: indeterminate on snaplii_purchase (a timeout, a lost connection, a 5xx other than MCAP2107, or an unreadable reply) → the purchase may have gone through. Never retry it: check snaplii_giftcard_list (every page) for the new card first, and if you cannot tell, stop and report it.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
snaplii, gift-card, delivery-ordering, browser-automation, cashback
2 skills in this plugin
npx claudepluginhub snaplii-inc/agent-to-merchant-payments --plugin snaplii-a2m-paymentOther plugins' skills for the same job