selat-purchasing
Skill0 starsChanged 3 months agoMITView on GitHub
Use when the agent needs to find and buy a paid capability rather than pay a known URL, or to run a vetted multi-step SELAT skill on a MetaMask Agent Wallet — discover paid APIs by intent (data, scraping, media, market data, social), compare prices, and purchase across payment rails the native x402 payer does not cover (Gateway-batched x402, routed MPP, non-EVM settlement); also to fund a Circle Gateway balance gaslessly from the MetaMask Agent Wallet and to report spend. Complements the metamask-agent-wallet skill; every signature and on-chain action is delegated to the mm CLI.
In this repositoryOne other file it gives its agents.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 45
Every paid call is routed through SELAT — vanilla x402, Gateway-batched, and MPP alike.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
SELAT Purchasing Skill
This skill lets an agent running on a MetaMask Agent Wallet discover paid capabilities across SELAT's federated catalog (17,000+ endpoints across five registries) and purchase them across the full protocol × scheme × chain matrix, from one gaslessly funded Gateway balance. The MetaMask Agent Wallet stays the wallet authority: every signature and every transaction goes through the mm CLI; these scripts never touch key material.
Boundary with metamask-agent-wallet
The native skill's x402 payer covers: pay a known URL, exact scheme, EVM networks, per-payment user confirmation. Route to THIS skill when any of the following holds:
- the user asks to find a capability ("get me a web search API", "pull Polymarket candles") rather than pay a URL they already have
- the 402 offers only Gateway-batched options (
extra.name == "GatewayWalletBatched") — the native payer signs the wrong domain for these - the merchant is MPP or settles on a network the native payer rejects
- the user wants a purchasing budget (Gateway funding), spend report, or purchase history
Command Routing
| User Intent | Action | Reference |
| Find a paid capability by intent | scripts/discover.py "<intent>" (hosted catalog API, free) | discovery.md |
| Fund a purchasing budget (gasless Gateway deposit) | scripts/eco_fund.py <usdc> | gateway-funding.md |
| Pay any merchant, any rail | scripts/routed_pay.py <url> [METHOD] [BODY] | routed-pay.md |
| Native payer reports "expected 402, got 403" | retry via routed_pay.py | transport.md |
| Which rails exist and who covers what | — | rails.md |
| Judge whether an endpoint actually settles | read the router's attestation on the routed probe | transactability.md |
| Show purchases and spend | scripts/spend_report.py | ledger.md |
| Run a skill manifest (fixed sequence of paid steps) | scripts/run_manifest.py <manifest.json> --dry-run then --yes | manifests.md |
| Run a vetted multi-step SELAT skill | install from SELAT-AI/selat-skills; substitute scripts/selat_pay.py wherever it says selat-pay | vetted-skills.md |
| Quote a merchant without paying | scripts/routed_pay.py <url> [METHOD] [BODY] --probe-only | routed-pay.md |
Confirmation pattern
Follow the same inspect → show → approve → pay pattern as the native payer, with one refinement for machine-scale prices: purchases at or below the session threshold (default $0.05) proceed without a per-call prompt once the user has approved the session budget (default $5); purchases above the threshold are always shown for approval with amount, merchant, and network. --wallet-timeout bounds every mm signing wait. A refused or expired quote charges nothing. When the wallet itself escalates a signature to the user, the approval arrives on the sign-in method's channel (email link for Google/email sign-ins, push notification for MetaMask Mobile QR, per MetaMask's quickstart) — tell the user where to look and wait; an approval that lands after a quote expires must be discarded and re-quoted, never submitted.
Trust boundary
Every paid call is routed through SELAT — vanilla x402, Gateway-batched, and MPP alike. The buyer issues no payment directly to a merchant, so the EIP-712 domain it signs is always the router's (pinned to Circle's Gateway Wallet), never one a merchant chose.
Read the extensions on every challenge, but weigh them by who issued the challenge. Merchant metadata (input/output schemas) comes from the merchant and is used to build the request. A transactability attestation (selatTransactabilityIndex) is read only from a challenge issued by a SELAT-owned origin, and it is valid for any endpoint it describes, third-party merchants included; the same key in a merchant's own 402 is self-attestation and is dropped unread by scripts/x402ext.py, with the attempt recorded. How far to trust it is derived from the router's own x-selat-index-authoritative response header (same mechanism as selat-discovery), not from a standing assumption: honour the usable_for field on the score, and unless it says rank, a perfect score justifies nothing while a poor one may still steer you off. Never present self-reported merchant health to the user as a score. See transactability.md.
Custody
Funds live in the MetaMask Agent Wallet and its Gateway balance. Signing happens in the wallet (mm wallet sign-typed-data, mm wallet send-transaction). The Gateway deposit is the wallet-level spending cap: nothing these scripts do can spend more than what was deposited plus the on-chain balance the wallet's own policy governs.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

