ClawHub
SkillsPluginsOfficialDocsSupport
K
Skillspg1-swap-check

pg1-swap-check

Project-Gifted1@project-gifted1
Before you sign a swap, check the unsigned transaction against what the user asked for (who gets the output, the minimum amount, router, tokens, deadline). Free check by PG1's API; the transaction and intent are sent to PG1 to decode, never signed, broadcast or kept.
Install in OpenClawRequires OpenClaw desktop app
Security check
Clean
Version
0.1.1
Updated
Nov 30, 2026
License
MIT-0

Latest: v0.1.1

  • Added a clear disclosure that each check sends the unsigned transaction and intent to PG1 over HTTPS, along with details about what PG1 records and does not retain.
  • Require user consent before the first check in a session; if they decline, do not call PG1 and explain the swap remains unchecked.
  • Clarified that PG1 decodes transactions without chain lookups and does not sign or broadcast them.
AgentsFinanceSecurity
#uniswap#aerodrome#pre-sign#ai-agents

PG1 swap check: does this transaction do what the user asked?

Use this skill every time an unsigned swap transaction is about to be signed: one your agent built, or one a trading API, aggregator or another agent handed back to you. It catches a swap whose bytes don't match the order: output sent to a look-alike address, a minimum below what the user accepts, a different router or token, or an expired deadline.

PG1 decodes the raw transaction bytes itself, with no chain lookups. It never trusts decoded fields that come with the transaction. It never signs or broadcasts anything. The check is free, with a limit of 60 calls an hour per caller.

What leaves the user's machine

This check runs on PG1's API, not locally. Each call sends PG1, over HTTPS:

  • the unsigned transaction bytes;
  • the intent: chain, recipient wallet, tokens, amounts, minimum output and any limits you set.

Together these show a planned trade before it is broadcast. PG1 uses them only to answer the call and does not keep them: its records hold the tool name, the result status, the timing, a hashed caller ID and the caller's country, never the transaction, addresses or amounts. No signing key or seed phrase is ever needed or sent; never include one.

Ask the user first. Before the first check in a session, tell the user in one line that the unsigned swap and its intent will be sent to PG1 to be checked, and continue only if they agree. If they decline, don't call PG1; tell them the swap was not checked.

When to use it

  • After any service returns an unsigned transaction for a swap, before you sign or ask the user to sign.
  • When the user asks "is this transaction OK to sign?" for a swap.

Not for transfers, approvals on their own, NFTs or bridges: only swaps (see "What PG1 can read" below).

Step 1: write down the user's intent

From the user's own request (never from the transaction or the service that built it), fill in:

FieldRequiredExample
chain_idyes8453 (Base)
recipientyesthe user's own wallet address
min_amount_outyesthe least the user accepts, in the output token's smallest units: 185 USDC is "185000000" (6 decimals)
token_in, token_outrecommendedtoken contract addresses
amount_inrecommendedwhat the user wants to spend, smallest units
routerrecommendedthe router address(es) the user trusts
max_fee_bipsoptionalthe most an interface fee may take, in basis points
max_deadline_secondsoptionalhow far in the future the deadline may be
signeroptionalthe signing address, if output may go to "the sender"

If the user did not give a minimum, ask them, or work one out from a fresh quote and their slippage tolerance, and tell them the number you used.

Step 2: call PG1

bash
curl -s -X POST https://pg1-ai-agent.vercel.app/api/swap-intent \
  -H 'Content-Type: application/json' \
  -d '{
    "transaction": "0x02f9...",
    "intent": {
      "chain_id": 8453,
      "recipient": "0xUSER_WALLET",
      "min_amount_out": "185000000",
      "token_in": "0x4200000000000000000000000000000000000006",
      "token_out": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount_in": "100000000000000000"
    }
  }'

transaction is the unsigned EIP-1559 transaction (type 0x02) as hex. If you only have to, data and value, serialize them into an unsigned EIP-1559 transaction first with your wallet library (for example viem's serializeTransaction).

The same check is available as the MCP tool check_swap_intent at https://pg1-ai-agent.vercel.app/api/mcp, and as an A2A skill at https://pg1-ai-agent.vercel.app/api/a2a.

Step 3: act on the verdict

verdictWhat to do
matches_intentThe transaction does what the intent says, on every field you sent. You may continue to signing.
does_not_matchDo not sign. Tell the user which rows mismatched (intent_checks, findings[].detail), and rebuild the transaction.
reviewShow the user the medium findings (fee tier, payer, deadline too far, interface fee above the limit) and sign only if they confirm.
not_evaluatedPG1 could not read part of the transaction (see not_evaluated). Do not treat it as checked: tell the user and ask before signing.

Always show the user the key rows: recipient, minimum out against their floor, and the deadline.

matches_intent only says the transaction does what the user asked. It does not judge whether a token is legitimate, whether the price is fair or what the router contract does. It is not advice to sign. For token risk, run a separate token check before buying an unknown token.

What PG1 can read

  • Uniswap's Universal Router (execute): V3 and V2 exact-input swaps, SWEEP, UNWRAP_WETH, WRAP_ETH, Permit2 permits (the router must be the spender) and interface fees (PAY_PORTION). Output the router holds is followed to wherever it is sent.
  • The Aerodrome / Velodrome v2 router: swapExactTokensForTokens, swapExactETHForTokens, swapExactTokensForETH and their fee-on-transfer variants.

Anything else (other routers, Uniswap v4 swaps, exact-output swaps, other commands) comes back as not_evaluated, never guessed.

Reason codes

  • High (do not sign): SWAP_RECIPIENT_MISMATCH, SWAP_MIN_OUT_BELOW_FLOOR, SWAP_ROUTER_NOT_PERMITTED, SWAP_CHAIN_MISMATCH, SWAP_TOKEN_MISMATCH, SWAP_AMOUNT_IN_MISMATCH, SWAP_NATIVE_VALUE_MISMATCH, SWAP_DEADLINE_PASSED, SWAP_PERMIT_SPENDER_NOT_ROUTER, SWAP_TX_DIGEST_MISMATCH.
  • Medium (ask the user): SWAP_FEE_TIER_MISMATCH, SWAP_PAYER_MISMATCH, SWAP_DEADLINE_TOO_FAR, SWAP_NO_DEADLINE, SWAP_FEE_ABOVE_LIMIT.
  • Incomplete: SWAP_INTENT_NOT_EVALUATED.

Every result is signed by PG1 (Ed25519). The public keys are at https://pg1-ai-agent.vercel.app/.well-known/pg1-signing-key.

Built by Project-Gifted1™. Docs: https://pg1-ai-agent.vercel.app/docs/agents

Related skills

More in Agents
ClawHub

Skills and plugins for OpenClaw agents. Part of the wider OpenClaw ecosystem.

Explore docs

SkillsPluginsOfficialAudits

Publish SkillPublish PluginCreate org

OverviewOpenClawDocsBlog

SupportGitHubDiscord

Built alongside the OpenClaw ecosystem

LobsterCrabboxClickClackCrabfleetOctopoolClawSweeperagent-skillsdiscrawlgitcrawlslacrawlnotcrawltelecrawlgraincrawlcrawlkitcrawlbaracpxmcporterTachikomaclawpatchclawbenchPeekaboocookbookplugin-inspectorwacrawlcrabpotAll projectsLobsterCrabboxClickClackCrabfleetOctopoolClawSweeperagent-skillsdiscrawlgitcrawlslacrawlnotcrawltelecrawlgraincrawlcrawlkitcrawlbaracpxmcporterTachikomaclawpatchclawbenchPeekaboocookbookplugin-inspectorwacrawlcrabpotAll projects

© 2026 OpenClaw Foundation

Privacy policy·Status·Deployed on Vercel·Powered by Convex

....:: clawhub/openclaw ::....  skills plugins publishers trust signals   :::: signed manifests ::::: moderated releases ::::: version history ::::   openclaw ecosystem    crabbox clickclack crawler packs gateway plugins
>>> install scan publish verify    @@ gateway @@ registry @@ agents @@     hooks runners slash-commands skill.md templates scanners review-bots   ---- downloads installs stars lineage ownership docs package integrity
  30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship   openclaw ecosystem    crabbox clickclack crawler packs gateway plugins     safe browse paths   official gateways   publisher handles   org trust
:::: signed manifests ::::: moderated releases ::::: version history ::::   ---- downloads installs stars lineage ownership docs package integrity   ....:: clawhub/openclaw ::....  skills plugins publishers trust signals
  hooks runners slash-commands skill.md templates scanners review-bots     safe browse paths   official gateways   publisher handles   org trust   >>> install scan publish verify    @@ gateway @@ registry @@ agents @@
openclaw ecosystem    crabbox clickclack crawler packs gateway plugins   ....:: clawhub/openclaw ::....  skills plugins publishers trust signals     30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship
---- downloads installs stars lineage ownership docs package integrity   >>> install scan publish verify    @@ gateway @@ registry @@ agents @@   :::: signed manifests ::::: moderated releases ::::: version history ::::
  safe browse paths   official gateways   publisher handles   org trust     30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship     hooks runners slash-commands skill.md templates scanners review-bots
....:: clawhub/openclaw ::....  skills plugins publishers trust signals   :::: signed manifests ::::: moderated releases ::::: version history ::::   openclaw ecosystem    crabbox clickclack crawler packs gateway plugins
>>> install scan publish verify    @@ gateway @@ registry @@ agents @@     hooks runners slash-commands skill.md templates scanners review-bots   ---- downloads installs stars lineage ownership docs package integrity
  30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship   openclaw ecosystem    crabbox clickclack crawler packs gateway plugins     safe browse paths   official gateways   publisher handles   org trust
:::: signed manifests ::::: moderated releases ::::: version history ::::   ---- downloads installs stars lineage ownership docs package integrity   ....:: clawhub/openclaw ::....  skills plugins publishers trust signals
  hooks runners slash-commands skill.md templates scanners review-bots     safe browse paths   official gateways   publisher handles   org trust   >>> install scan publish verify    @@ gateway @@ registry @@ agents @@
openclaw ecosystem    crabbox clickclack crawler packs gateway plugins   ....:: clawhub/openclaw ::....  skills plugins publishers trust signals     30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship
---- downloads installs stars lineage ownership docs package integrity   >>> install scan publish verify    @@ gateway @@ registry @@ agents @@   :::: signed manifests ::::: moderated releases ::::: version history ::::
  safe browse paths   official gateways   publisher handles   org trust     30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship     hooks runners slash-commands skill.md templates scanners review-bots
....:: clawhub/openclaw ::....  skills plugins publishers trust signals   :::: signed manifests ::::: moderated releases ::::: version history ::::   openclaw ecosystem    crabbox clickclack crawler packs gateway plugins
>>> install scan publish verify    @@ gateway @@ registry @@ agents @@     hooks runners slash-commands skill.md templates scanners review-bots   ---- downloads installs stars lineage ownership docs package integrity
  30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship   openclaw ecosystem    crabbox clickclack crawler packs gateway plugins     safe browse paths   official gateways   publisher handles   org trust
:::: signed manifests ::::: moderated releases ::::: version history ::::   ---- downloads installs stars lineage ownership docs package integrity   ....:: clawhub/openclaw ::....  skills plugins publishers trust signals
  hooks runners slash-commands skill.md templates scanners review-bots     safe browse paths   official gateways   publisher handles   org trust   >>> install scan publish verify    @@ gateway @@ registry @@ agents @@
openclaw ecosystem    crabbox clickclack crawler packs gateway plugins   ....:: clawhub/openclaw ::....  skills plugins publishers trust signals     30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship
---- downloads installs stars lineage ownership docs package integrity   >>> install scan publish verify    @@ gateway @@ registry @@ agents @@   :::: signed manifests ::::: moderated releases ::::: version history ::::
  safe browse paths   official gateways   publisher handles   org trust     30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship     hooks runners slash-commands skill.md templates scanners review-bots
....:: clawhub/openclaw ::....  skills plugins publishers trust signals   :::: signed manifests ::::: moderated releases ::::: version history ::::   openclaw ecosystem    crabbox clickclack crawler packs gateway plugins
>>> install scan publish verify    @@ gateway @@ registry @@ agents @@     hooks runners slash-commands skill.md templates scanners review-bots   ---- downloads installs stars lineage ownership docs package integrity
  30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship   openclaw ecosystem    crabbox clickclack crawler packs gateway plugins     safe browse paths   official gateways   publisher handles   org trust
:::: signed manifests ::::: moderated releases ::::: version history ::::   ---- downloads installs stars lineage ownership docs package integrity   ....:: clawhub/openclaw ::....  skills plugins publishers trust signals
  hooks runners slash-commands skill.md templates scanners review-bots     safe browse paths   official gateways   publisher handles   org trust   >>> install scan publish verify    @@ gateway @@ registry @@ agents @@
openclaw ecosystem    crabbox clickclack crawler packs gateway plugins   ....:: clawhub/openclaw ::....  skills plugins publishers trust signals     30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship
---- downloads installs stars lineage ownership docs package integrity   >>> install scan publish verify    @@ gateway @@ registry @@ agents @@   :::: signed manifests ::::: moderated releases ::::: version history ::::
  safe browse paths   official gateways   publisher handles   org trust     30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship     hooks runners slash-commands skill.md templates scanners review-bots
....:: clawhub/openclaw ::....  skills plugins publishers trust signals   :::: signed manifests ::::: moderated releases ::::: version history ::::   openclaw ecosystem    crabbox clickclack crawler packs gateway plugins
>>> install scan publish verify    @@ gateway @@ registry @@ agents @@     hooks runners slash-commands skill.md templates scanners review-bots   ---- downloads installs stars lineage ownership docs package integrity
  30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship   openclaw ecosystem    crabbox clickclack crawler packs gateway plugins     safe browse paths   official gateways   publisher handles   org trust
:::: signed manifests ::::: moderated releases ::::: version history ::::   ---- downloads installs stars lineage ownership docs package integrity   ....:: clawhub/openclaw ::....  skills plugins publishers trust signals
  hooks runners slash-commands skill.md templates scanners review-bots     safe browse paths   official gateways   publisher handles   org trust   >>> install scan publish verify    @@ gateway @@ registry @@ agents @@
openclaw ecosystem    crabbox clickclack crawler packs gateway plugins   ....:: clawhub/openclaw ::....  skills plugins publishers trust signals     30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship
---- downloads installs stars lineage ownership docs package integrity   >>> install scan publish verify    @@ gateway @@ registry @@ agents @@   :::: signed manifests ::::: moderated releases ::::: version history ::::
  safe browse paths   official gateways   publisher handles   org trust     30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship     hooks runners slash-commands skill.md templates scanners review-bots
....:: clawhub/openclaw ::....  skills plugins publishers trust signals   :::: signed manifests ::::: moderated releases ::::: version history ::::   openclaw ecosystem    crabbox clickclack crawler packs gateway plugins
>>> install scan publish verify    @@ gateway @@ registry @@ agents @@     hooks runners slash-commands skill.md templates scanners review-bots   ---- downloads installs stars lineage ownership docs package integrity
  30 skills 12 plugins    /api/v1/skills   /owners   /audit   /ship   openclaw ecosystem    crabbox clickclack crawler packs gateway plugins     safe browse paths   official gateways   publisher handles   org trust
:::: signed manifests ::::: moderated releases ::::: version history ::::   ---- downloads installs stars lineage ownership docs package integrity   ....:: clawhub/openclaw ::....  skills plugins publishers trust signals