{"id":"6060f6e5-5bea-44a6-bf55-b21b41a340bd","entityType":"agent","slug":"clawhub-paulieb14-payqlskill","name":"PayQL","canonicalUrl":"https://www.xpersona.co/agent/clawhub-paulieb14-payqlskill","canonicalPath":"/agent/clawhub-paulieb14-payqlskill","generatedAt":"2026-10-11T20:57:19.202Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T16:39:16.870Z","emptyReason":null},"description":"Get live on-chain data from The Graph, paid per query in USDC over x402 — gasless, keyless, bring-your-own-wallet. Each query spends real USDC (~$0.01) from a wallet you control — use a dedicated, low-balance Base wallet. Discover the right live subgraph, see the price before paying, then pull the data in one loop. Trigger keywords: subgraph, The Graph, GraphQL, on-chain data, DeFi, DEX, pool, TVL, swap, NFT, ENS, token holders, governance, x402, pay per query, USDC, Base, gateway.","descriptionLabel":"Source description","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1K downloads reported by the source. Last updated 10/11/2026.","installCommand":"clawhub skill install s179kend24a91k7vj5e7dqsjfx83e31s:payqlskill","sourceUrl":"https://clawhub.ai/paulieb14/payqlskill","homepage":"https://clawhub.ai/paulieb14/skills/payqlskill","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/paulieb14/payqlskill","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/paulieb14/skills/payqlskill","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":60,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"PayQL technical dossier on Xpersona with agent coverage, OPENCLEW support, and live trust metadata."},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-11T16:39:16.870Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T16:39:16.870Z","emptyReason":null},"stars":null,"forks":null,"downloads":1026,"packageName":null,"latestVersion":"0.1.5","tractionLabel":"1K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T16:39:16.857Z","emptyReason":null},"lastUpdatedAt":"2026-10-11T16:39:16.870Z","lastCrawledAt":"2026-10-11T16:39:16.857Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-12T16:39:16.857Z","lastVerifiedAt":null,"highlights":[{"version":"0.1.5","createdAt":"2026-08-06T02:05:20.556Z","changelog":"0.1.5: serverInfo version now derives from package.json (it had drifted to 0.1.0 while npm shipped 0.1.2); x402 payment SDK raised to ^2.21.0; MCP SDK ^1.30.0; regression tests pin the version across package.json and skill.json.","fileCount":5,"zipByteSize":6091},{"version":"0.1.4","createdAt":"2026-07-16T18:00:53.350Z","changelog":"Restore display name to PayQL.","fileCount":5,"zipByteSize":5956},{"version":"0.1.3","createdAt":"2026-07-16T17:55:09.606Z","changelog":"Correct the fulltext search example (uniswap:* | v3:*) to match the OR-join fix — multi-word topics now return results.","fileCount":5,"zipByteSize":6022},{"version":"0.1.2","createdAt":"2026-06-25T15:16:23.627Z","changelog":"Display name -> PayQL.","fileCount":5,"zipByteSize":5953},{"version":"0.1.1","createdAt":"2026-06-25T14:25:36.573Z","changelog":"Safety docs: PAYQL_PRIVATE_KEY warning (dedicated low-balance wallet), explicit real-USDC-spend notice, removed auto-swap language (paid reads only).","fileCount":5,"zipByteSize":6083}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s179kend24a91k7vj5e7dqsjfx83e31s:payqlskill","setupComplexity":"low","setupSteps":["Install using `clawhub skill install s179kend24a91k7vj5e7dqsjfx83e31s:payqlskill` in an isolated environment before connecting it to live workloads.","No published capability contract is available yet, so validate auth and request/response behavior manually.","Review the upstream CLAWHUB listing at https://clawhub.ai/paulieb14/payqlskill before using production credentials."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-paulieb14-payqlskill/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-paulieb14-payqlskill/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-paulieb14-payqlskill/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-paulieb14-payqlskill/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-paulieb14-payqlskill/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-paulieb14-payqlskill/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-11T20:57:19.201Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-paulieb14-payqlskill/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-paulieb14-payqlskill/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-paulieb14-payqlskill/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-paulieb14-payqlskill/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T16:39:16.870Z","emptyReason":null},"readme":"Skill: PayQL\n\nOwner: paulieb14\n\nSummary: Get live on-chain data from The Graph, paid per query in USDC over x402 — gasless, keyless, bring-your-own-wallet. Each query spends real USDC (~$0.01) from a wallet you control — use a dedicated, low-balance Base wallet. Discover the right live subgraph, see the price before paying, then pull the data in one loop. Trigger keywords: subgraph, The Graph, GraphQL, on-chain data, DeFi, DEX, pool, TVL, swap, NFT, ENS, token holders, governance, x402, pay per query, USDC, Base, gateway.\n\nTags: latest:0.1.5\n\nVersion history:\n\nv0.1.5 | 2026-08-06T02:05:20.556Z | user\n\n0.1.5: serverInfo version now derives from package.json (it had drifted to 0.1.0 while npm shipped 0.1.2); x402 payment SDK raised to ^2.21.0; MCP SDK ^1.30.0; regression tests pin the version across package.json and skill.json.\n\nv0.1.4 | 2026-07-16T18:00:53.350Z | user\n\nRestore display name to PayQL.\n\nv0.1.3 | 2026-07-16T17:55:09.606Z | user\n\nCorrect the fulltext search example (uniswap:* | v3:*) to match the OR-join fix — multi-word topics now return results.\n\nv0.1.2 | 2026-06-25T15:16:23.627Z | user\n\nDisplay name -> PayQL.\n\nv0.1.1 | 2026-06-25T14:25:36.573Z | user\n\nSafety docs: PAYQL_PRIVATE_KEY warning (dedicated low-balance wallet), explicit real-USDC-spend notice, removed auto-swap language (paid reads only).\n\nArchive index:\n\nArchive v0.1.5: 5 files, 6091 bytes\n\nFiles: references/gateway.md (2778b), skill-card.md (2357b), skill.json (1192b), SKILL.md (3996b), _meta.json (129b)\n\nFile v0.1.5:SKILL.md\n\n---\nname: payql\ndescription: \"Get live on-chain data from The Graph, paid per query in USDC over x402 — gasless, keyless, bring-your-own-wallet. Each query spends real USDC (~$0.01) from a wallet you control — use a dedicated, low-balance Base wallet. Discover the right live subgraph, see the price before paying, then pull the data in one loop. Trigger keywords: subgraph, The Graph, GraphQL, on-chain data, DeFi, DEX, pool, TVL, swap, NFT, ENS, token holders, governance, x402, pay per query, USDC, Base, gateway.\"\nversion: 0.1.5\nhomepage: https://github.com/PaulieB14/payql\nmetadata:\n  clawdbot:\n    emoji: \"💸\"\n---\n\n# PayQL — pay-per-query data from The Graph\n\nGet **live on-chain data** from The Graph's subgraphs (DeFi, DEX pools, NFTs, ENS, tokens, governance — 15,000+ subgraphs across 20+ chains), paying ~**$0.01 USDC per query** over [x402](https://x402.org). **No API key, no account, no ETH for gas** — the payment *is* the auth, and it's gasless (EIP-3009 `transferWithAuthorization` on Base).\n\n> 💸 **This spends real USDC.** Every paid query is a live on-chain micropayment (~$0.01) from your wallet — it is **not** a free, read-only API, and the payment is visible on-chain and to the x402 facilitator. Quote the price first (free), and fund a **dedicated, low-balance wallet** — see [Wallet & safety](#wallet--safety).\n\n## The loop: discover → price → query\n\n1. **Discover** the right *live* subgraph for a protocol — ranked by on-chain curation signal, so you skip dead forks.\n2. **Price** it — preflight the `402` challenge to read the exact USDC cost *before* paying (free).\n3. **Query** — send GraphQL, pay the `402` from your wallet, get the data + a receipt back.\n\n## Two ways to run it\n\n### A. PayQL MCP server (turnkey)\n\nInstall and wire into your harness (Claude Desktop / Code / Cursor):\n\n```jsonc\n{\n  \"mcpServers\": {\n    \"payql\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"payql\"],\n      \"env\": { \"PAYQL_NETWORK\": \"base\", \"PAYQL_PRIVATE_KEY\": \"0xYOUR_BASE_WALLET_KEY\" }\n    }\n  }\n}\n```\n\n> ⚠️ **`PAYQL_PRIVATE_KEY` can spend its wallet's USDC.** Use a **dedicated, low-balance Base wallet** — never a primary, valuable, or reused key. It sits in your harness config (which can be logged, synced, or screenshotted), so treat it like any secret: don't commit it or paste it in shared chats. Don't want a raw key here? Use **option B** (your harness's own wallet) or an [Ampersend](https://ampersend.ai)-managed wallet with spend caps.\n\nTools: `search_subgraphs`, `get_payment_info` (free price quote), `query_subgraph` (paid), `get_subgraph_schema`, `wallet_status`. Full recipe + example queries in [references/gateway.md](references/gateway.md).\n\n### B. No install — use your harness's own wallet\n\nIf your harness already has an x402 / `pay-for-service` capability, hit the gateway directly:\n\n- **Gateway URL:** `https://gateway.thegraph.com/api/x402/subgraphs/id/<SUBGRAPH_ID>`\n- POST GraphQL `{\"query\":\"...\"}`. On `402`, pay the quoted USDC amount and retry — your x402 client does this automatically.\n\nFull no-install recipe (discovery query, pricing, examples) in [references/gateway.md](references/gateway.md).\n\n## Wallet & safety\n\n- **Use a dedicated, low-balance Base wallet** funded with only the USDC you intend to spend — **never a primary, valuable, or reused key.** `PAYQL_PRIVATE_KEY` can spend that wallet's USDC.\n- Fund with **USDC only** — payments are gasless, so no ETH is required. The per-query cost is **$0.01**; there are no API keys, subscriptions, or platform fees.\n- This skill is for paid **reads**. It does **not** swap, trade, or auto-top-up your wallet — keep any funding or top-up a separate, human-approved action.\n- Don't want a raw key in your config? Use **option B** (your harness's own wallet), or an [Ampersend](https://ampersend.ai)-managed wallet with **server-side spend caps + allowlists** (see the [PayQL README](https://github.com/PaulieB14/payql#using-ampersend-optional)).\n\nFile v0.1.5:_meta.json\n\n{\n  \"ownerId\": \"kn7ep45hbzy18628bqpwfwcxa582smkj\",\n  \"slug\": \"payqlskill\",\n  \"version\": \"0.1.5\",\n  \"publishedAt\": 1785981920556\n}\n\nFile v0.1.5:references/gateway.md\n\n# The Graph x402 gateway — recipe & examples\n\nEverything needed to discover, price, and query The Graph's subgraphs pay-per-query, with no API key.\n\n## Endpoints\n\n| | URL |\n|---|---|\n| Query a subgraph (mainnet) | `https://gateway.thegraph.com/api/x402/subgraphs/id/<SUBGRAPH_ID>` |\n| Query a subgraph (testnet) | `https://testnet.gateway.thegraph.com/api/x402/subgraphs/id/<SUBGRAPH_ID>` |\n\n- **Method:** `POST`, `Content-Type: application/json`, body `{\"query\":\"...\",\"variables\":{}}`.\n- **Payment:** the first request returns `402` with the challenge in a base64 **`payment-required` response header** (`accepts[]` → `scheme: exact`, `network: eip155:8453`, `asset:` USDC `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`, `amount:` atomic USDC, `extra.assetTransferMethod: eip3009`). Sign the EIP-3009 authorization and retry with the `X-PAYMENT` header — any x402 client (`@x402/fetch`, `@graphprotocol/client-x402`) does this for you. Settlement is **gasless** (the facilitator pays gas).\n- **Price:** ~**$0.01 USDC** per query.\n\n## 1. Discover a subgraph (free if you have a registry; else a tiny paid query)\n\nQuery The Graph **network subgraph** (`DZz4kDTdmzWLWsV373w2bSmoar3umKKH9y82SUKr5qmp`) with its fulltext index, ranked by curation signal:\n\n```graphql\nquery Search($text: String!, $first: Int!) {\n  subgraphMetadataSearch(text: $text, first: $first) {\n    displayName\n    description\n    subgraphs(first: 1, where: { active: true }, orderBy: currentSignalledTokens, orderDirection: desc) {\n      id\n      currentVersion { subgraphDeployment { ipfsHash queryFeesAmount signalledTokens } }\n    }\n  }\n}\n```\n\n`text` uses tsquery syntax — turn `\"uniswap v3\"` into `\"uniswap:* | v3:*\"` (OR-join, so multi-word topics still match). The `subgraphs[0].id` is the `<SUBGRAPH_ID>` you query in step 2.\n\n## 2. Query it\n\n```graphql\n{\n  pools(first: 3, orderBy: volumeUSD, orderDirection: desc) {\n    token0 { symbol }\n    token1 { symbol }\n    volumeUSD\n  }\n}\n```\n\nExample result (Uniswap V3, `5zvR82QoaXYFyDEKLZ9t6v9adgnptxYpKpSbxtgVENFV`):\n\n```json\n{\n  \"data\": {\n    \"pools\": [\n      { \"token0\": { \"symbol\": \"USDC\" }, \"token1\": { \"symbol\": \"WETH\" }, \"volumeUSD\": \"1234567890.12\" }\n    ]\n  }\n}\n```\n\nThe paid response includes an `X-PAYMENT-RESPONSE` header (base64) with the settlement receipt: `{ success, transaction (tx hash), network, amount }`.\n\n## Funding\n\nHold **USDC on Base** — no ETH needed (gasless). **Use a dedicated, low-balance wallet** funded with only the USDC you intend to spend; seeding it is a one-time human step. This skill makes paid **reads** — it does not swap, trade, or auto-top-up the wallet, so keep funding a separate, human-approved action. For server-side spend caps/allowlists, use an [Ampersend](https://ampersend.ai)-managed wallet.\n\nFile v0.1.5:skill-card.md\n\n## Description:\n\nPayQL helps agents discover live The Graph subgraphs, quote x402 pricing, and run paid GraphQL reads using USDC from a user-controlled Base wallet.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[paulieb14](https://clawhub.ai/user/paulieb14)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers and agent operators use PayQL to find relevant on-chain subgraphs, preview query costs, retrieve schemas, check wallet status, and run paid read-only GraphQL queries for DeFi, NFT, ENS, token, and governance data.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The default setup can run a mutable npm package with a wallet private key that can spend real USDC.\n\nMitigation: Use a pinned reviewed package version or locked local install, and configure only a dedicated low-balance Base wallet.\n\nRisk: Paid queries spend real USDC from the configured wallet.\n\nMitigation: Review each quoted price before querying and keep only the USDC amount you are willing to spend or lose in the configured wallet.\n\nRisk: Wallet credentials in harness configuration can be logged, synced, committed, or exposed in shared contexts.\n\nMitigation: Never use a primary or reused private key; prefer the harness wallet flow or a managed wallet with spend caps and allowlists.\n\n## Reference(s):\n\n- [The Graph x402 gateway recipe and examples](artifact/references/gateway.md)\n- [PayQL ClawHub release page](https://clawhub.ai/paulieb14/skills/payqlskill)\n- [x402](https://x402.org)\n- [Ampersend managed wallet option](https://ampersend.ai)\n\n## Skill Output:\n\n**Output Type(s):** [guidance, shell commands, configuration, code, text]\n\n**Output Format:** [Markdown with JSON, GraphQL, and shell command snippets]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May produce x402 payment guidance, GraphQL query examples, subgraph metadata, schemas, wallet status, and paid query results with receipts.]\n\n## Skill Version(s):\n\n0.1.5 (source: server-resolved release evidence, SKILL.md frontmatter, and skill.json)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v0.1.5:skill.json\n\n{\n  \"name\": \"payql\",\n  \"version\": \"0.1.5\",\n  \"description\": \"Get live on-chain data from The Graph's subgraphs and pay per query in USDC over x402 \\u2014 gasless, keyless, bring-your-own-wallet. Each paid query spends real USDC (~$0.01) from a wallet you control \\u2014 use a dedicated, low-balance Base wallet, never a primary/reused key \\u2014 so it is not free read-only access. Discover the right live subgraph (ranked by curation signal), see the price before paying, then pull DeFi, DEX, NFT, ENS, token, and governance data in one agent loop. No API key, no account, no ETH for gas.\",\n  \"author\": \"paulieb14\",\n  \"license\": \"MIT\",\n  \"homepage\": \"https://github.com/PaulieB14/payql\",\n  \"tags\": [\n    \"x402\",\n    \"thegraph\",\n    \"subgraph\",\n    \"graphql\",\n    \"onchain-data\",\n    \"usdc\",\n    \"base\",\n    \"defi\",\n    \"nft\",\n    \"ens\",\n    \"agent-payments\",\n    \"pay-per-query\",\n    \"mcp\",\n    \"web3\"\n  ],\n  \"categories\": [\n    \"Web\",\n    \"Finance\",\n    \"AI/ML\"\n  ],\n  \"mcp\": {\n    \"tools\": [\n      \"search_subgraphs\",\n      \"get_payment_info\",\n      \"query_subgraph\",\n      \"get_subgraph_schema\",\n      \"wallet_status\"\n    ],\n    \"transport\": \"stdio\",\n    \"endpoint\": \"npx -y payql\"\n  }\n}\n\nArchive v0.1.4: 5 files, 5956 bytes\n\nFiles: references/gateway.md (2778b), skill-card.md (2154b), skill.json (1131b), SKILL.md (3996b), _meta.json (129b)\n\nFile v0.1.4:SKILL.md\n\n---\nname: payql\ndescription: \"Get live on-chain data from The Graph, paid per query in USDC over x402 — gasless, keyless, bring-your-own-wallet. Each query spends real USDC (~$0.01) from a wallet you control — use a dedicated, low-balance Base wallet. Discover the right live subgraph, see the price before paying, then pull the data in one loop. Trigger keywords: subgraph, The Graph, GraphQL, on-chain data, DeFi, DEX, pool, TVL, swap, NFT, ENS, token holders, governance, x402, pay per query, USDC, Base, gateway.\"\nversion: 0.1.1\nhomepage: https://github.com/PaulieB14/payql\nmetadata:\n  clawdbot:\n    emoji: \"💸\"\n---\n\n# PayQL — pay-per-query data from The Graph\n\nGet **live on-chain data** from The Graph's subgraphs (DeFi, DEX pools, NFTs, ENS, tokens, governance — 15,000+ subgraphs across 20+ chains), paying ~**$0.01 USDC per query** over [x402](https://x402.org). **No API key, no account, no ETH for gas** — the payment *is* the auth, and it's gasless (EIP-3009 `transferWithAuthorization` on Base).\n\n> 💸 **This spends real USDC.** Every paid query is a live on-chain micropayment (~$0.01) from your wallet — it is **not** a free, read-only API, and the payment is visible on-chain and to the x402 facilitator. Quote the price first (free), and fund a **dedicated, low-balance wallet** — see [Wallet & safety](#wallet--safety).\n\n## The loop: discover → price → query\n\n1. **Discover** the right *live* subgraph for a protocol — ranked by on-chain curation signal, so you skip dead forks.\n2. **Price** it — preflight the `402` challenge to read the exact USDC cost *before* paying (free).\n3. **Query** — send GraphQL, pay the `402` from your wallet, get the data + a receipt back.\n\n## Two ways to run it\n\n### A. PayQL MCP server (turnkey)\n\nInstall and wire into your harness (Claude Desktop / Code / Cursor):\n\n```jsonc\n{\n  \"mcpServers\": {\n    \"payql\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"payql\"],\n      \"env\": { \"PAYQL_NETWORK\": \"base\", \"PAYQL_PRIVATE_KEY\": \"0xYOUR_BASE_WALLET_KEY\" }\n    }\n  }\n}\n```\n\n> ⚠️ **`PAYQL_PRIVATE_KEY` can spend its wallet's USDC.** Use a **dedicated, low-balance Base wallet** — never a primary, valuable, or reused key. It sits in your harness config (which can be logged, synced, or screenshotted), so treat it like any secret: don't commit it or paste it in shared chats. Don't want a raw key here? Use **option B** (your harness's own wallet) or an [Ampersend](https://ampersend.ai)-managed wallet with spend caps.\n\nTools: `search_subgraphs`, `get_payment_info` (free price quote), `query_subgraph` (paid), `get_subgraph_schema`, `wallet_status`. Full recipe + example queries in [references/gateway.md](references/gateway.md).\n\n### B. No install — use your harness's own wallet\n\nIf your harness already has an x402 / `pay-for-service` capability, hit the gateway directly:\n\n- **Gateway URL:** `https://gateway.thegraph.com/api/x402/subgraphs/id/<SUBGRAPH_ID>`\n- POST GraphQL `{\"query\":\"...\"}`. On `402`, pay the quoted USDC amount and retry — your x402 client does this automatically.\n\nFull no-install recipe (discovery query, pricing, examples) in [references/gateway.md](references/gateway.md).\n\n## Wallet & safety\n\n- **Use a dedicated, low-balance Base wallet** funded with only the USDC you intend to spend — **never a primary, valuable, or reused key.** `PAYQL_PRIVATE_KEY` can spend that wallet's USDC.\n- Fund with **USDC only** — payments are gasless, so no ETH is required. The per-query cost is **$0.01**; there are no API keys, subscriptions, or platform fees.\n- This skill is for paid **reads**. It does **not** swap, trade, or auto-top-up your wallet — keep any funding or top-up a separate, human-approved action.\n- Don't want a raw key in your config? Use **option B** (your harness's own wallet), or an [Ampersend](https://ampersend.ai)-managed wallet with **server-side spend caps + allowlists** (see the [PayQL README](https://github.com/PaulieB14/payql#using-ampersend-optional)).\n\nFile v0.1.4:_meta.json\n\n{\n  \"ownerId\": \"kn7ep45hbzy18628bqpwfwcxa582smkj\",\n  \"slug\": \"payqlskill\",\n  \"version\": \"0.1.4\",\n  \"publishedAt\": 1784224853350\n}\n\nFile v0.1.4:references/gateway.md\n\n# The Graph x402 gateway — recipe & examples\n\nEverything needed to discover, price, and query The Graph's subgraphs pay-per-query, with no API key.\n\n## Endpoints\n\n| | URL |\n|---|---|\n| Query a subgraph (mainnet) | `https://gateway.thegraph.com/api/x402/subgraphs/id/<SUBGRAPH_ID>` |\n| Query a subgraph (testnet) | `https://testnet.gateway.thegraph.com/api/x402/subgraphs/id/<SUBGRAPH_ID>` |\n\n- **Method:** `POST`, `Content-Type: application/json`, body `{\"query\":\"...\",\"variables\":{}}`.\n- **Payment:** the first request returns `402` with the challenge in a base64 **`payment-required` response header** (`accepts[]` → `scheme: exact`, `network: eip155:8453`, `asset:` USDC `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`, `amount:` atomic USDC, `extra.assetTransferMethod: eip3009`). Sign the EIP-3009 authorization and retry with the `X-PAYMENT` header — any x402 client (`@x402/fetch`, `@graphprotocol/client-x402`) does this for you. Settlement is **gasless** (the facilitator pays gas).\n- **Price:** ~**$0.01 USDC** per query.\n\n## 1. Discover a subgraph (free if you have a registry; else a tiny paid query)\n\nQuery The Graph **network subgraph** (`DZz4kDTdmzWLWsV373w2bSmoar3umKKH9y82SUKr5qmp`) with its fulltext index, ranked by curation signal:\n\n```graphql\nquery Search($text: String!, $first: Int!) {\n  subgraphMetadataSearch(text: $text, first: $first) {\n    displayName\n    description\n    subgraphs(first: 1, where: { active: true }, orderBy: currentSignalledTokens, orderDirection: desc) {\n      id\n      currentVersion { subgraphDeployment { ipfsHash queryFeesAmount signalledTokens } }\n    }\n  }\n}\n```\n\n`text` uses tsquery syntax — turn `\"uniswap v3\"` into `\"uniswap:* | v3:*\"` (OR-join, so multi-word topics still match). The `subgraphs[0].id` is the `<SUBGRAPH_ID>` you query in step 2.\n\n## 2. Query it\n\n```graphql\n{\n  pools(first: 3, orderBy: volumeUSD, orderDirection: desc) {\n    token0 { symbol }\n    token1 { symbol }\n    volumeUSD\n  }\n}\n```\n\nExample result (Uniswap V3, `5zvR82QoaXYFyDEKLZ9t6v9adgnptxYpKpSbxtgVENFV`):\n\n```json\n{\n  \"data\": {\n    \"pools\": [\n      { \"token0\": { \"symbol\": \"USDC\" }, \"token1\": { \"symbol\": \"WETH\" }, \"volumeUSD\": \"1234567890.12\" }\n    ]\n  }\n}\n```\n\nThe paid response includes an `X-PAYMENT-RESPONSE` header (base64) with the settlement receipt: `{ success, transaction (tx hash), network, amount }`.\n\n## Funding\n\nHold **USDC on Base** — no ETH needed (gasless). **Use a dedicated, low-balance wallet** funded with only the USDC you intend to spend; seeding it is a one-time human step. This skill makes paid **reads** — it does not swap, trade, or auto-top-up the wallet, so keep funding a separate, human-approved action. For server-side spend caps/allowlists, use an [Ampersend](https://ampersend.ai)-managed wallet.\n\nFile v0.1.4:skill-card.md\n\n## Description: <br>\nPayQL helps agents discover live The Graph subgraphs, check per-query USDC pricing, and query on-chain data through x402 payment flows. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[paulieb14](https://clawhub.ai/user/paulieb14) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nDevelopers and agent builders use PayQL to add paid, live on-chain data retrieval for DeFi, DEX, NFT, ENS, token, and governance workflows. It supports a discover, price, and query loop where agents can quote cost before executing paid reads. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Paid queries can spend real USDC from the configured wallet. <br>\nMitigation: Use a dedicated low-balance Base wallet and run the free price check before paid queries. <br>\nRisk: A raw private key in harness configuration can be exposed through logs, sync, screenshots, or accidental sharing. <br>\nMitigation: Treat the harness config as secret, never use a primary or reused private key, and consider a managed or harness wallet with spend caps. <br>\n\n\n## Reference(s): <br>\n- [PayQL on ClawHub](https://clawhub.ai/paulieb14/skills/payqlskill) <br>\n- [Gateway recipe and examples](references/gateway.md) <br>\n- [x402](https://x402.org) <br>\n- [Ampersend managed wallet option](https://ampersend.ai) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [guidance, markdown, code, shell commands, configuration] <br>\n**Output Format:** [Markdown guidance with JSON configuration snippets, GraphQL examples, and command examples] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May guide agents through paid x402 data queries that spend USDC from a user-controlled wallet.] <br>\n\n## Skill Version(s): <br>\n0.1.4 (source: server release evidence) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v0.1.4:skill.json\n\n{\n  \"name\": \"payql\",\n  \"version\": \"0.1.4\",\n  \"description\": \"Get live on-chain data from The Graph's subgraphs and pay per query in USDC over x402 — gasless, keyless, bring-your-own-wallet. Each paid query spends real USDC (~$0.01) from a wallet you control — use a dedicated, low-balance Base wallet, never a primary/reused key — so it is not free read-only access. Discover the right live subgraph (ranked by curation signal), see the price before paying, then pull DeFi, DEX, NFT, ENS, token, and governance data in one agent loop. No API key, no account, no ETH for gas.\",\n  \"author\": \"paulieb14\",\n  \"license\": \"MIT\",\n  \"homepage\": \"https://github.com/PaulieB14/payql\",\n  \"tags\": [\n    \"x402\",\n    \"thegraph\",\n    \"subgraph\",\n    \"graphql\",\n    \"onchain-data\",\n    \"usdc\",\n    \"base\",\n    \"defi\",\n    \"nft\",\n    \"ens\",\n    \"agent-payments\",\n    \"pay-per-query\",\n    \"mcp\",\n    \"web3\"\n  ],\n  \"categories\": [\"Web\", \"Finance\", \"AI/ML\"],\n  \"mcp\": {\n    \"tools\": [\"search_subgraphs\", \"get_payment_info\", \"query_subgraph\", \"get_subgraph_schema\", \"wallet_status\"],\n    \"transport\": \"stdio\",\n    \"endpoint\": \"npx -y payql\"\n  }\n}\n\nArchive v0.1.3: 5 files, 6022 bytes\n\nFiles: references/gateway.md (2778b), skill-card.md (2302b), skill.json (1131b), SKILL.md (3996b), _meta.json (129b)\n\nFile v0.1.3:SKILL.md\n\n---\nname: payql\ndescription: \"Get live on-chain data from The Graph, paid per query in USDC over x402 — gasless, keyless, bring-your-own-wallet. Each query spends real USDC (~$0.01) from a wallet you control — use a dedicated, low-balance Base wallet. Discover the right live subgraph, see the price before paying, then pull the data in one loop. Trigger keywords: subgraph, The Graph, GraphQL, on-chain data, DeFi, DEX, pool, TVL, swap, NFT, ENS, token holders, governance, x402, pay per query, USDC, Base, gateway.\"\nversion: 0.1.1\nhomepage: https://github.com/PaulieB14/payql\nmetadata:\n  clawdbot:\n    emoji: \"💸\"\n---\n\n# PayQL — pay-per-query data from The Graph\n\nGet **live on-chain data** from The Graph's subgraphs (DeFi, DEX pools, NFTs, ENS, tokens, governance — 15,000+ subgraphs across 20+ chains), paying ~**$0.01 USDC per query** over [x402](https://x402.org). **No API key, no account, no ETH for gas** — the payment *is* the auth, and it's gasless (EIP-3009 `transferWithAuthorization` on Base).\n\n> 💸 **This spends real USDC.** Every paid query is a live on-chain micropayment (~$0.01) from your wallet — it is **not** a free, read-only API, and the payment is visible on-chain and to the x402 facilitator. Quote the price first (free), and fund a **dedicated, low-balance wallet** — see [Wallet & safety](#wallet--safety).\n\n## The loop: discover → price → query\n\n1. **Discover** the right *live* subgraph for a protocol — ranked by on-chain curation signal, so you skip dead forks.\n2. **Price** it — preflight the `402` challenge to read the exact USDC cost *before* paying (free).\n3. **Query** — send GraphQL, pay the `402` from your wallet, get the data + a receipt back.\n\n## Two ways to run it\n\n### A. PayQL MCP server (turnkey)\n\nInstall and wire into your harness (Claude Desktop / Code / Cursor):\n\n```jsonc\n{\n  \"mcpServers\": {\n    \"payql\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"payql\"],\n      \"env\": { \"PAYQL_NETWORK\": \"base\", \"PAYQL_PRIVATE_KEY\": \"0xYOUR_BASE_WALLET_KEY\" }\n    }\n  }\n}\n```\n\n> ⚠️ **`PAYQL_PRIVATE_KEY` can spend its wallet's USDC.** Use a **dedicated, low-balance Base wallet** — never a primary, valuable, or reused key. It sits in your harness config (which can be logged, synced, or screenshotted), so treat it like any secret: don't commit it or paste it in shared chats. Don't want a raw key here? Use **option B** (your harness's own wallet) or an [Ampersend](https://ampersend.ai)-managed wallet with spend caps.\n\nTools: `search_subgraphs`, `get_payment_info` (free price quote), `query_subgraph` (paid), `get_subgraph_schema`, `wallet_status`. Full recipe + example queries in [references/gateway.md](references/gateway.md).\n\n### B. No install — use your harness's own wallet\n\nIf your harness already has an x402 / `pay-for-service` capability, hit the gateway directly:\n\n- **Gateway URL:** `https://gateway.thegraph.com/api/x402/subgraphs/id/<SUBGRAPH_ID>`\n- POST GraphQL `{\"query\":\"...\"}`. On `402`, pay the quoted USDC amount and retry — your x402 client does this automatically.\n\nFull no-install recipe (discovery query, pricing, examples) in [references/gateway.md](references/gateway.md).\n\n## Wallet & safety\n\n- **Use a dedicated, low-balance Base wallet** funded with only the USDC you intend to spend — **never a primary, valuable, or reused key.** `PAYQL_PRIVATE_KEY` can spend that wallet's USDC.\n- Fund with **USDC only** — payments are gasless, so no ETH is required. The per-query cost is **$0.01**; there are no API keys, subscriptions, or platform fees.\n- This skill is for paid **reads**. It does **not** swap, trade, or auto-top-up your wallet — keep any funding or top-up a separate, human-approved action.\n- Don't want a raw key in your config? Use **option B** (your harness's own wallet), or an [Ampersend](https://ampersend.ai)-managed wallet with **server-side spend caps + allowlists** (see the [PayQL README](https://github.com/PaulieB14/payql#using-ampersend-optional)).\n\nFile v0.1.3:_meta.json\n\n{\n  \"ownerId\": \"kn7ep45hbzy18628bqpwfwcxa582smkj\",\n  \"slug\": \"payqlskill\",\n  \"version\": \"0.1.3\",\n  \"publishedAt\": 1784224509606\n}\n\nFile v0.1.3:references/gateway.md\n\n# The Graph x402 gateway — recipe & examples\n\nEverything needed to discover, price, and query The Graph's subgraphs pay-per-query, with no API key.\n\n## Endpoints\n\n| | URL |\n|---|---|\n| Query a subgraph (mainnet) | `https://gateway.thegraph.com/api/x402/subgraphs/id/<SUBGRAPH_ID>` |\n| Query a subgraph (testnet) | `https://testnet.gateway.thegraph.com/api/x402/subgraphs/id/<SUBGRAPH_ID>` |\n\n- **Method:** `POST`, `Content-Type: application/json`, body `{\"query\":\"...\",\"variables\":{}}`.\n- **Payment:** the first request returns `402` with the challenge in a base64 **`payment-required` response header** (`accepts[]` → `scheme: exact`, `network: eip155:8453`, `asset:` USDC `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`, `amount:` atomic USDC, `extra.assetTransferMethod: eip3009`). Sign the EIP-3009 authorization and retry with the `X-PAYMENT` header — any x402 client (`@x402/fetch`, `@graphprotocol/client-x402`) does this for you. Settlement is **gasless** (the facilitator pays gas).\n- **Price:** ~**$0.01 USDC** per query.\n\n## 1. Discover a subgraph (free if you have a registry; else a tiny paid query)\n\nQuery The Graph **network subgraph** (`DZz4kDTdmzWLWsV373w2bSmoar3umKKH9y82SUKr5qmp`) with its fulltext index, ranked by curation signal:\n\n```graphql\nquery Search($text: String!, $first: Int!) {\n  subgraphMetadataSearch(text: $text, first: $first) {\n    displayName\n    description\n    subgraphs(first: 1, where: { active: true }, orderBy: currentSignalledTokens, orderDirection: desc) {\n      id\n      currentVersion { subgraphDeployment { ipfsHash queryFeesAmount signalledTokens } }\n    }\n  }\n}\n```\n\n`text` uses tsquery syntax — turn `\"uniswap v3\"` into `\"uniswap:* | v3:*\"` (OR-join, so multi-word topics still match). The `subgraphs[0].id` is the `<SUBGRAPH_ID>` you query in step 2.\n\n## 2. Query it\n\n```graphql\n{\n  pools(first: 3, orderBy: volumeUSD, orderDirection: desc) {\n    token0 { symbol }\n    token1 { symbol }\n    volumeUSD\n  }\n}\n```\n\nExample result (Uniswap V3, `5zvR82QoaXYFyDEKLZ9t6v9adgnptxYpKpSbxtgVENFV`):\n\n```json\n{\n  \"data\": {\n    \"pools\": [\n      { \"token0\": { \"symbol\": \"USDC\" }, \"token1\": { \"symbol\": \"WETH\" }, \"volumeUSD\": \"1234567890.12\" }\n    ]\n  }\n}\n```\n\nThe paid response includes an `X-PAYMENT-RESPONSE` header (base64) with the settlement receipt: `{ success, transaction (tx hash), network, amount }`.\n\n## Funding\n\nHold **USDC on Base** — no ETH needed (gasless). **Use a dedicated, low-balance wallet** funded with only the USDC you intend to spend; seeding it is a one-time human step. This skill makes paid **reads** — it does not swap, trade, or auto-top-up the wallet, so keep funding a separate, human-approved action. For server-side spend caps/allowlists, use an [Ampersend](https://ampersend.ai)-managed wallet.\n\nFile v0.1.3:skill-card.md\n\n## Description: <br>\nPayQL helps agents discover, price, and query live The Graph subgraphs with pay-per-query USDC payments over x402. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[paulieb14](https://clawhub.ai/user/paulieb14) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nDevelopers and agents use PayQL to pull live on-chain data for DeFi, DEX, NFT, ENS, token, and governance workflows. The skill supports discovering active subgraphs, checking the query price before payment, and retrieving GraphQL results with a payment receipt. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Paid queries can spend USDC from the configured wallet. <br>\nMitigation: Install with a dedicated low-balance Base wallet, harness payment mode, or a managed wallet with spend caps. <br>\nRisk: A primary or reused private key could expose funds beyond the intended query budget. <br>\nMitigation: Do not use a primary or reused private key; keep funding and top-ups as separate human-approved actions. <br>\nRisk: Per-query caps do not by themselves limit total spend over time. <br>\nMitigation: Pin the npm package version where appropriate and monitor wallet balance and aggregate spend. <br>\n\n\n## Reference(s): <br>\n- [The Graph x402 gateway recipe and examples](references/gateway.md) <br>\n- [PayQL skill page](https://clawhub.ai/paulieb14/skills/payqlskill) <br>\n- [x402](https://x402.org) <br>\n- [Ampersend](https://ampersend.ai) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Guidance, Configuration, Shell commands, API calls, JSON] <br>\n**Output Format:** [Markdown guidance with configuration snippets, GraphQL requests, JSON responses, and payment receipt details] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May initiate paid read queries that spend USDC from a configured Base wallet.] <br>\n\n## Skill Version(s): <br>\n0.1.3 (source: server release metadata and skill.json) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v0.1.3:skill.json\n\n{\n  \"name\": \"payql\",\n  \"version\": \"0.1.3\",\n  \"description\": \"Get live on-chain data from The Graph's subgraphs and pay per query in USDC over x402 — gasless, keyless, bring-your-own-wallet. Each paid query spends real USDC (~$0.01) from a wallet you control — use a dedicated, low-balance Base wallet, never a primary/reused key — so it is not free read-only access. Discover the right live subgraph (ranked by curation signal), see the price before paying, then pull DeFi, DEX, NFT, ENS, token, and governance data in one agent loop. No API key, no account, no ETH for gas.\",\n  \"author\": \"paulieb14\",\n  \"license\": \"MIT\",\n  \"homepage\": \"https://github.com/PaulieB14/payql\",\n  \"tags\": [\n    \"x402\",\n    \"thegraph\",\n    \"subgraph\",\n    \"graphql\",\n    \"onchain-data\",\n    \"usdc\",\n    \"base\",\n    \"defi\",\n    \"nft\",\n    \"ens\",\n    \"agent-payments\",\n    \"pay-per-query\",\n    \"mcp\",\n    \"web3\"\n  ],\n  \"categories\": [\"Web\", \"Finance\", \"AI/ML\"],\n  \"mcp\": {\n    \"tools\": [\"search_subgraphs\", \"get_payment_info\", \"query_subgraph\", \"get_subgraph_schema\", \"wallet_status\"],\n    \"transport\": \"stdio\",\n    \"endpoint\": \"npx -y payql\"\n  }\n}\n\nArchive v0.1.2: 5 files, 5953 bytes\n\nFiles: references/gateway.md (2734b), skill-card.md (2184b), skill.json (1131b), SKILL.md (3996b), _meta.json (129b)\n\nFile v0.1.2:SKILL.md\n\n---\nname: payql\ndescription: \"Get live on-chain data from The Graph, paid per query in USDC over x402 — gasless, keyless, bring-your-own-wallet. Each query spends real USDC (~$0.01) from a wallet you control — use a dedicated, low-balance Base wallet. Discover the right live subgraph, see the price before paying, then pull the data in one loop. Trigger keywords: subgraph, The Graph, GraphQL, on-chain data, DeFi, DEX, pool, TVL, swap, NFT, ENS, token holders, governance, x402, pay per query, USDC, Base, gateway.\"\nversion: 0.1.1\nhomepage: https://github.com/PaulieB14/payql\nmetadata:\n  clawdbot:\n    emoji: \"💸\"\n---\n\n# PayQL — pay-per-query data from The Graph\n\nGet **live on-chain data** from The Graph's subgraphs (DeFi, DEX pools, NFTs, ENS, tokens, governance — 15,000+ subgraphs across 20+ chains), paying ~**$0.01 USDC per query** over [x402](https://x402.org). **No API key, no account, no ETH for gas** — the payment *is* the auth, and it's gasless (EIP-3009 `transferWithAuthorization` on Base).\n\n> 💸 **This spends real USDC.** Every paid query is a live on-chain micropayment (~$0.01) from your wallet — it is **not** a free, read-only API, and the payment is visible on-chain and to the x402 facilitator. Quote the price first (free), and fund a **dedicated, low-balance wallet** — see [Wallet & safety](#wallet--safety).\n\n## The loop: discover → price → query\n\n1. **Discover** the right *live* subgraph for a protocol — ranked by on-chain curation signal, so you skip dead forks.\n2. **Price** it — preflight the `402` challenge to read the exact USDC cost *before* paying (free).\n3. **Query** — send GraphQL, pay the `402` from your wallet, get the data + a receipt back.\n\n## Two ways to run it\n\n### A. PayQL MCP server (turnkey)\n\nInstall and wire into your harness (Claude Desktop / Code / Cursor):\n\n```jsonc\n{\n  \"mcpServers\": {\n    \"payql\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"payql\"],\n      \"env\": { \"PAYQL_NETWORK\": \"base\", \"PAYQL_PRIVATE_KEY\": \"0xYOUR_BASE_WALLET_KEY\" }\n    }\n  }\n}\n```\n\n> ⚠️ **`PAYQL_PRIVATE_KEY` can spend its wallet's USDC.** Use a **dedicated, low-balance Base wallet** — never a primary, valuable, or reused key. It sits in your harness config (which can be logged, synced, or screenshotted), so treat it like any secret: don't commit it or paste it in shared chats. Don't want a raw key here? Use **option B** (your harness's own wallet) or an [Ampersend](https://ampersend.ai)-managed wallet with spend caps.\n\nTools: `search_subgraphs`, `get_payment_info` (free price quote), `query_subgraph` (paid), `get_subgraph_schema`, `wallet_status`. Full recipe + example queries in [references/gateway.md](references/gateway.md).\n\n### B. No install — use your harness's own wallet\n\nIf your harness already has an x402 / `pay-for-service` capability, hit the gateway directly:\n\n- **Gateway URL:** `https://gateway.thegraph.com/api/x402/subgraphs/id/<SUBGRAPH_ID>`\n- POST GraphQL `{\"query\":\"...\"}`. On `402`, pay the quoted USDC amount and retry — your x402 client does this automatically.\n\nFull no-install recipe (discovery query, pricing, examples) in [references/gateway.md](references/gateway.md).\n\n## Wallet & safety\n\n- **Use a dedicated, low-balance Base wallet** funded with only the USDC you intend to spend — **never a primary, valuable, or reused key.** `PAYQL_PRIVATE_KEY` can spend that wallet's USDC.\n- Fund with **USDC only** — payments are gasless, so no ETH is required. The per-query cost is **$0.01**; there are no API keys, subscriptions, or platform fees.\n- This skill is for paid **reads**. It does **not** swap, trade, or auto-top-up your wallet — keep any funding or top-up a separate, human-approved action.\n- Don't want a raw key in your config? Use **option B** (your harness's own wallet), or an [Ampersend](https://ampersend.ai)-managed wallet with **server-side spend caps + allowlists** (see the [PayQL README](https://github.com/PaulieB14/payql#using-ampersend-optional)).\n\nFile v0.1.2:_meta.json\n\n{\n  \"ownerId\": \"kn7ep45hbzy18628bqpwfwcxa582smkj\",\n  \"slug\": \"payqlskill\",\n  \"version\": \"0.1.2\",\n  \"publishedAt\": 1782400583627\n}\n\nFile v0.1.2:references/gateway.md\n\n# The Graph x402 gateway — recipe & examples\n\nEverything needed to discover, price, and query The Graph's subgraphs pay-per-query, with no API key.\n\n## Endpoints\n\n| | URL |\n|---|---|\n| Query a subgraph (mainnet) | `https://gateway.thegraph.com/api/x402/subgraphs/id/<SUBGRAPH_ID>` |\n| Query a subgraph (testnet) | `https://testnet.gateway.thegraph.com/api/x402/subgraphs/id/<SUBGRAPH_ID>` |\n\n- **Method:** `POST`, `Content-Type: application/json`, body `{\"query\":\"...\",\"variables\":{}}`.\n- **Payment:** the first request returns `402` with the challenge in a base64 **`payment-required` response header** (`accepts[]` → `scheme: exact`, `network: eip155:8453`, `asset:` USDC `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`, `amount:` atomic USDC, `extra.assetTransferMethod: eip3009`). Sign the EIP-3009 authorization and retry with the `X-PAYMENT` header — any x402 client (`@x402/fetch`, `@graphprotocol/client-x402`) does this for you. Settlement is **gasless** (the facilitator pays gas).\n- **Price:** ~**$0.01 USDC** per query.\n\n## 1. Discover a subgraph (free if you have a registry; else a tiny paid query)\n\nQuery The Graph **network subgraph** (`DZz4kDTdmzWLWsV373w2bSmoar3umKKH9y82SUKr5qmp`) with its fulltext index, ranked by curation signal:\n\n```graphql\nquery Search($text: String!, $first: Int!) {\n  subgraphMetadataSearch(text: $text, first: $first) {\n    displayName\n    description\n    subgraphs(first: 1, where: { active: true }, orderBy: currentSignalledTokens, orderDirection: desc) {\n      id\n      currentVersion { subgraphDeployment { ipfsHash queryFeesAmount signalledTokens } }\n    }\n  }\n}\n```\n\n`text` uses tsquery syntax — turn `\"uniswap v3\"` into `\"uniswap:* & v3:*\"`. The `subgraphs[0].id` is the `<SUBGRAPH_ID>` you query in step 2.\n\n## 2. Query it\n\n```graphql\n{\n  pools(first: 3, orderBy: volumeUSD, orderDirection: desc) {\n    token0 { symbol }\n    token1 { symbol }\n    volumeUSD\n  }\n}\n```\n\nExample result (Uniswap V3, `5zvR82QoaXYFyDEKLZ9t6v9adgnptxYpKpSbxtgVENFV`):\n\n```json\n{\n  \"data\": {\n    \"pools\": [\n      { \"token0\": { \"symbol\": \"USDC\" }, \"token1\": { \"symbol\": \"WETH\" }, \"volumeUSD\": \"1234567890.12\" }\n    ]\n  }\n}\n```\n\nThe paid response includes an `X-PAYMENT-RESPONSE` header (base64) with the settlement receipt: `{ success, transaction (tx hash), network, amount }`.\n\n## Funding\n\nHold **USDC on Base** — no ETH needed (gasless). **Use a dedicated, low-balance wallet** funded with only the USDC you intend to spend; seeding it is a one-time human step. This skill makes paid **reads** — it does not swap, trade, or auto-top-up the wallet, so keep funding a separate, human-approved action. For server-side spend caps/allowlists, use an [Ampersend](https://ampersend.ai)-managed wallet.\n\nFile v0.1.2:skill-card.md\n\n## Description: <br>\nPayQL helps agents discover live The Graph subgraphs, quote an x402 USDC price, and run paid GraphQL reads from a dedicated Base wallet. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[paulieb14](https://clawhub.ai/user/paulieb14) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nDevelopers and agent operators use PayQL to retrieve live on-chain DeFi, DEX, NFT, ENS, token, and governance data without API keys while paying per query in USDC. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill can spend real USDC from a user-provided Base wallet for paid queries. <br>\nMitigation: Install it only with a dedicated low-balance wallet funded with the USDC intended for queries; avoid primary or reused private keys. <br>\nRisk: Wallet private keys in agent harness configuration may be logged, synced, screenshotted, or accidentally committed. <br>\nMitigation: Keep private keys out of shared chats and repositories, and prefer managed wallet controls, spend caps, or allowlists when agents may run many queries. <br>\n\n\n## Reference(s): <br>\n- [PayQL ClawHub skill page](https://clawhub.ai/paulieb14/skills/payqlskill) <br>\n- [The Graph x402 gateway recipe](references/gateway.md) <br>\n- [x402 protocol](https://x402.org) <br>\n- [Ampersend managed wallets](https://ampersend.ai) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Guidance, Configuration instructions, Shell commands, JSON, Text] <br>\n**Output Format:** [Markdown guidance with JSON, GraphQL, and shell/configuration snippets; tool responses may include JSON data and payment receipts.] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Paid queries can spend real USDC from the configured wallet.] <br>\n\n## Skill Version(s): <br>\n0.1.2 (source: server release evidence) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v0.1.2:skill.json\n\n{\n  \"name\": \"payql\",\n  \"version\": \"0.1.1\",\n  \"description\": \"Get live on-chain data from The Graph's subgraphs and pay per query in USDC over x402 — gasless, keyless, bring-your-own-wallet. Each paid query spends real USDC (~$0.01) from a wallet you control — use a dedicated, low-balance Base wallet, never a primary/reused key — so it is not free read-only access. Discover the right live subgraph (ranked by curation signal), see the price before paying, then pull DeFi, DEX, NFT, ENS, token, and governance data in one agent loop. No API key, no account, no ETH for gas.\",\n  \"author\": \"paulieb14\",\n  \"license\": \"MIT\",\n  \"homepage\": \"https://github.com/PaulieB14/payql\",\n  \"tags\": [\n    \"x402\",\n    \"thegraph\",\n    \"subgraph\",\n    \"graphql\",\n    \"onchain-data\",\n    \"usdc\",\n    \"base\",\n    \"defi\",\n    \"nft\",\n    \"ens\",\n    \"agent-payments\",\n    \"pay-per-query\",\n    \"mcp\",\n    \"web3\"\n  ],\n  \"categories\": [\"Web\", \"Finance\", \"AI/ML\"],\n  \"mcp\": {\n    \"tools\": [\"search_subgraphs\", \"get_payment_info\", \"query_subgraph\", \"get_subgraph_schema\", \"wallet_status\"],\n    \"transport\": \"stdio\",\n    \"endpoint\": \"npx -y payql\"\n  }\n}\n\nArchive v0.1.1: 5 files, 6083 bytes\n\nFiles: references/gateway.md (2734b), skill-card.md (2588b), skill.json (1131b), SKILL.md (3996b), _meta.json (129b)\n\nFile v0.1.1:SKILL.md\n\n---\nname: payql\ndescription: \"Get live on-chain data from The Graph, paid per query in USDC over x402 — gasless, keyless, bring-your-own-wallet. Each query spends real USDC (~$0.01) from a wallet you control — use a dedicated, low-balance Base wallet. Discover the right live subgraph, see the price before paying, then pull the data in one loop. Trigger keywords: subgraph, The Graph, GraphQL, on-chain data, DeFi, DEX, pool, TVL, swap, NFT, ENS, token holders, governance, x402, pay per query, USDC, Base, gateway.\"\nversion: 0.1.1\nhomepage: https://github.com/PaulieB14/payql\nmetadata:\n  clawdbot:\n    emoji: \"💸\"\n---\n\n# PayQL — pay-per-query data from The Graph\n\nGet **live on-chain data** from The Graph's subgraphs (DeFi, DEX pools, NFTs, ENS, tokens, governance — 15,000+ subgraphs across 20+ chains), paying ~**$0.01 USDC per query** over [x402](https://x402.org). **No API key, no account, no ETH for gas** — the payment *is* the auth, and it's gasless (EIP-3009 `transferWithAuthorization` on Base).\n\n> 💸 **This spends real USDC.** Every paid query is a live on-chain micropayment (~$0.01) from your wallet — it is **not** a free, read-only API, and the payment is visible on-chain and to the x402 facilitator. Quote the price first (free), and fund a **dedicated, low-balance wallet** — see [Wallet & safety](#wallet--safety).\n\n## The loop: discover → price → query\n\n1. **Discover** the right *live* subgraph for a protocol — ranked by on-chain curation signal, so you skip dead forks.\n2. **Price** it — preflight the `402` challenge to read the exact USDC cost *before* paying (free).\n3. **Query** — send GraphQL, pay the `402` from your wallet, get the data + a receipt back.\n\n## Two ways to run it\n\n### A. PayQL MCP server (turnkey)\n\nInstall and wire into your harness (Claude Desktop / Code / Cursor):\n\n```jsonc\n{\n  \"mcpServers\": {\n    \"payql\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"payql\"],\n      \"env\": { \"PAYQL_NETWORK\": \"base\", \"PAYQL_PRIVATE_KEY\": \"0xYOUR_BASE_WALLET_KEY\" }\n    }\n  }\n}\n```\n\n> ⚠️ **`PAYQL_PRIVATE_KEY` can spend its wallet's USDC.** Use a **dedicated, low-balance Base wallet** — never a primary, valuable, or reused key. It sits in your harness config (which can be logged, synced, or screenshotted), so treat it like any secret: don't commit it or paste it in shared chats. Don't want a raw key here? Use **option B** (your harness's own wallet) or an [Ampersend](https://ampersend.ai)-managed wallet with spend caps.\n\nTools: `search_subgraphs`, `get_payment_info` (free price quote), `query_subgraph` (paid), `get_subgraph_schema`, `wallet_status`. Full recipe + example queries in [references/gateway.md](references/gateway.md).\n\n### B. No install — use your harness's own wallet\n\nIf your harness already has an x402 / `pay-for-service` capability, hit the gateway directly:\n\n- **Gateway URL:** `https://gateway.thegraph.com/api/x402/subgraphs/id/<SUBGRAPH_ID>`\n- POST GraphQL `{\"query\":\"...\"}`. On `402`, pay the quoted USDC amount and retry — your x402 client does this automatically.\n\nFull no-install recipe (discovery query, pricing, examples) in [references/gateway.md](references/gateway.md).\n\n## Wallet & safety\n\n- **Use a dedicated, low-balance Base wallet** funded with only the USDC you intend to spend — **never a primary, valuable, or reused key.** `PAYQL_PRIVATE_KEY` can spend that wallet's USDC.\n- Fund with **USDC only** — payments are gasless, so no ETH is required. The per-query cost is **$0.01**; there are no API keys, subscriptions, or platform fees.\n- This skill is for paid **reads**. It does **not** swap, trade, or auto-top-up your wallet — keep any funding or top-up a separate, human-approved action.\n- Don't want a raw key in your config? Use **option B** (your harness's own wallet), or an [Ampersend](https://ampersend.ai)-managed wallet with **server-side spend caps + allowlists** (see the [PayQL README](https://github.com/PaulieB14/payql#using-ampersend-optional)).\n\nFile v0.1.1:_meta.json\n\n{\n  \"ownerId\": \"kn7ep45hbzy18628bqpwfwcxa582smkj\",\n  \"slug\": \"payqlskill\",\n  \"version\": \"0.1.1\",\n  \"publishedAt\": 1782397536573\n}\n\nFile v0.1.1:references/gateway.md\n\n# The Graph x402 gateway — recipe & examples\n\nEverything needed to discover, price, and query The Graph's subgraphs pay-per-query, with no API key.\n\n## Endpoints\n\n| | URL |\n|---|---|\n| Query a subgraph (mainnet) | `https://gateway.thegraph.com/api/x402/subgraphs/id/<SUBGRAPH_ID>` |\n| Query a subgraph (testnet) | `https://testnet.gateway.thegraph.com/api/x402/subgraphs/id/<SUBGRAPH_ID>` |\n\n- **Method:** `POST`, `Content-Type: application/json`, body `{\"query\":\"...\",\"variables\":{}}`.\n- **Payment:** the first request returns `402` with the challenge in a base64 **`payment-required` response header** (`accepts[]` → `scheme: exact`, `network: eip155:8453`, `asset:` USDC `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`, `amount:` atomic USDC, `extra.assetTransferMethod: eip3009`). Sign the EIP-3009 authorization and retry with the `X-PAYMENT` header — any x402 client (`@x402/fetch`, `@graphprotocol/client-x402`) does this for you. Settlement is **gasless** (the facilitator pays gas).\n- **Price:** ~**$0.01 USDC** per query.\n\n## 1. Discover a subgraph (free if you have a registry; else a tiny paid query)\n\nQuery The Graph **network subgraph** (`DZz4kDTdmzWLWsV373w2bSmoar3umKKH9y82SUKr5qmp`) with its fulltext index, ranked by curation signal:\n\n```graphql\nquery Search($text: String!, $first: Int!) {\n  subgraphMetadataSearch(text: $text, first: $first) {\n    displayName\n    description\n    subgraphs(first: 1, where: { active: true }, orderBy: currentSignalledTokens, orderDirection: desc) {\n      id\n      currentVersion { subgraphDeployment { ipfsHash queryFeesAmount signalledTokens } }\n    }\n  }\n}\n```\n\n`text` uses tsquery syntax — turn `\"uniswap v3\"` into `\"uniswap:* & v3:*\"`. The `subgraphs[0].id` is the `<SUBGRAPH_ID>` you query in step 2.\n\n## 2. Query it\n\n```graphql\n{\n  pools(first: 3, orderBy: volumeUSD, orderDirection: desc) {\n    token0 { symbol }\n    token1 { symbol }\n    volumeUSD\n  }\n}\n```\n\nExample result (Uniswap V3, `5zvR82QoaXYFyDEKLZ9t6v9adgnptxYpKpSbxtgVENFV`):\n\n```json\n{\n  \"data\": {\n    \"pools\": [\n      { \"token0\": { \"symbol\": \"USDC\" }, \"token1\": { \"symbol\": \"WETH\" }, \"volumeUSD\": \"1234567890.12\" }\n    ]\n  }\n}\n```\n\nThe paid response includes an `X-PAYMENT-RESPONSE` header (base64) with the settlement receipt: `{ success, transaction (tx hash), network, amount }`.\n\n## Funding\n\nHold **USDC on Base** — no ETH needed (gasless). **Use a dedicated, low-balance wallet** funded with only the USDC you intend to spend; seeding it is a one-time human step. This skill makes paid **reads** — it does not swap, trade, or auto-top-up the wallet, so keep funding a separate, human-approved action. For server-side spend caps/allowlists, use an [Ampersend](https://ampersend.ai)-managed wallet.\n\nFile v0.1.1:skill-card.md\n\n## Description: <br>\nGet live on-chain data from The Graph's subgraphs and pay per query in USDC over x402, with price checks before paid GraphQL queries and guidance to use a dedicated low-balance Base wallet. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[paulieb14](https://clawhub.ai/user/paulieb14) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nDevelopers and agents use this skill to discover live The Graph subgraphs, quote query costs, and retrieve on-chain DeFi, DEX, NFT, ENS, token, and governance data through paid x402 GraphQL requests. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Paid queries spend real USDC from the configured Base wallet. <br>\nMitigation: Use a dedicated low-balance wallet, check prices before paid queries, and prefer spend caps before allowing repeated paid queries. <br>\nRisk: A configured PAYQL_PRIVATE_KEY can spend the wallet's USDC and may be exposed through local harness configuration, logs, sync, screenshots, or shared chats. <br>\nMitigation: Never use a primary or reused private key; avoid committing secrets and consider a harness-managed wallet or Ampersend-managed wallet with spend caps and allowlists. <br>\nRisk: Repeated agent loops can generate multiple paid reads. <br>\nMitigation: Use get_payment_info or equivalent price checks before query_subgraph calls and require human approval or a spending limit for repeated paid access. <br>\n\n\n## Reference(s): <br>\n- [PayQL ClawHub skill page](https://clawhub.ai/paulieb14/skills/payqlskill) <br>\n- [The Graph x402 gateway recipe](references/gateway.md) <br>\n- [x402](https://x402.org) <br>\n- [Ampersend](https://ampersend.ai) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, code, shell commands, configuration, guidance] <br>\n**Output Format:** [Markdown guidance with JSON configuration snippets, GraphQL examples, and command-line setup instructions] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May produce MCP server configuration, x402 gateway request guidance, price-check steps, paid query instructions, and wallet safety guidance.] <br>\n\n## Skill Version(s): <br>\n0.1.1 (source: server release evidence and skill frontmatter) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v0.1.1:skill.json\n\n{\n  \"name\": \"payql\",\n  \"version\": \"0.1.1\",\n  \"description\": \"Get live on-chain data from The Graph's subgraphs and pay per query in USDC over x402 — gasless, keyless, bring-your-own-wallet. Each paid query spends real USDC (~$0.01) from a wallet you control — use a dedicated, low-balance Base wallet, never a primary/reused key — so it is not free read-only access. Discover the right live subgraph (ranked by curation signal), see the price before paying, then pull DeFi, DEX, NFT, ENS, token, and governance data in one agent loop. No API key, no account, no ETH for gas.\",\n  \"author\": \"paulieb14\",\n  \"license\": \"MIT\",\n  \"homepage\": \"https://github.com/PaulieB14/payql\",\n  \"tags\": [\n    \"x402\",\n    \"thegraph\",\n    \"subgraph\",\n    \"graphql\",\n    \"onchain-data\",\n    \"usdc\",\n    \"base\",\n    \"defi\",\n    \"nft\",\n    \"ens\",\n    \"agent-payments\",\n    \"pay-per-query\",\n    \"mcp\",\n    \"web3\"\n  ],\n  \"categories\": [\"Web\", \"Finance\", \"AI/ML\"],\n  \"mcp\": {\n    \"tools\": [\"search_subgraphs\", \"get_payment_info\", \"query_subgraph\", \"get_subgraph_schema\", \"wallet_status\"],\n    \"transport\": \"stdio\",\n    \"endpoint\": \"npx -y payql\"\n  }\n}","readmeExcerpt":"Skill: PayQL Owner: paulieb14 Summary: Get live on-chain data from The Graph, paid per query in USDC over x402 — gasless, keyless, bring-your-own-wallet. Each query spends real USDC (~$0.01) from a wallet you control — use a dedicated, low-balance Base wallet. Discover the right live subgraph, see the price before paying, then pull the data in one loop. Trigger keywords: subgraph, The Graph, GraphQL, on-chain data, D","codeSnippets":[],"executableExamples":[{"language":"jsonc","snippet":"{\n  \"mcpServers\": {\n    \"payql\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"payql\"],\n      \"env\": { \"PAYQL_NETWORK\": \"base\", \"PAYQL_PRIVATE_KEY\": \"0xYOUR_BASE_WALLET_KEY\" }\n    }\n  }\n}"},{"language":"graphql","snippet":"query Search($text: String!, $first: Int!) {\n  subgraphMetadataSearch(text: $text, first: $first) {\n    displayName\n    description\n    subgraphs(first: 1, where: { active: true }, orderBy: currentSignalledTokens, orderDirection: desc) {\n      id\n      currentVersion { subgraphDeployment { ipfsHash queryFeesAmount signalledTokens } }\n    }\n  }\n}"},{"language":"graphql","snippet":"{\n  pools(first: 3, orderBy: volumeUSD, orderDirection: desc) {\n    token0 { symbol }\n    token1 { symbol }\n    volumeUSD\n  }\n}"},{"language":"json","snippet":"{\n  \"data\": {\n    \"pools\": [\n      { \"token0\": { \"symbol\": \"USDC\" }, \"token1\": { \"symbol\": \"WETH\" }, \"volumeUSD\": \"1234567890.12\" }\n    ]\n  }\n}"},{"language":"jsonc","snippet":"{\n  \"mcpServers\": {\n    \"payql\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"payql\"],\n      \"env\": { \"PAYQL_NETWORK\": \"base\", \"PAYQL_PRIVATE_KEY\": \"0xYOUR_BASE_WALLET_KEY\" }\n    }\n  }\n}"},{"language":"graphql","snippet":"query Search($text: String!, $first: Int!) {\n  subgraphMetadataSearch(text: $text, first: $first) {\n    displayName\n    description\n    subgraphs(first: 1, where: { active: true }, orderBy: currentSignalledTokens, orderDirection: desc) {\n      id\n      currentVersion { subgraphDeployment { ipfsHash queryFeesAmount signalledTokens } }\n    }\n  }\n}"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: payql\ndescription: \"Get live on-chain data from The Graph, paid per query in USDC over x402 — gasless, keyless, bring-your-own-wallet. Each query spends real USDC (~$0.01) from a wallet you control — use a dedicated, low-balance Base wallet. Discover the right live subgraph, see the price before paying, then pull the data in one loop. Trigger keywords: subgraph, The Graph, GraphQL, on-chain data, DeFi, DEX, pool, TVL, swap, NFT, ENS, token holders, governance, x402, pay per query, USDC, Base, gateway.\"\nversion: 0.1.5\nhomepage: https://github.com/PaulieB14/payql\nmetadata:\n  clawdbot:\n    emoji: \"💸\"\n---\n\n# PayQL — pay-per-query data from The Graph\n\nGet **live on-chain data** from The Graph's subgraphs (DeFi, DEX pools, NFTs, ENS, tokens, governance — 15,000+ subgraphs across 20+ chains), paying ~**$0.01 USDC per query** over [x402](https://x402.org). **No API key, no account, no ETH for gas** — the payment *is* the auth, and it's gasless (EIP-3009 `transferWithAuthorization` on Base).\n\n> 💸 **This spends real USDC.** Every paid query is a live on-chain micropayment (~$0.01) from your wallet — it is **not** a free, read-only API, and the payment is visible on-chain and to the x402 facilitator. Quote the price first (free), and fund a **dedicated, low-balance wallet** — see [Wallet & safety](#wallet--safety).\n\n## The loop: discover → price → query\n\n1. **Discover** the right *live* subgraph for a protocol — ranked by on-chain curation signal, so you skip dead forks.\n2. **Price** it — preflight the `402` challenge to read the exact USDC cost *before* paying (free).\n3. **Query** — send GraphQL, pay the `402` from your wallet, get the data + a receipt back.\n\n## Two ways to run it\n\n### A. PayQL MCP server (turnkey)\n\nInstall and wire into your harness (Claude Desktop / Code / Cursor):\n\n```jsonc\n{\n  \"mcpServers\": {\n    \"payql\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"payql\"],\n      \"env\": { \"PAYQL_NETWORK\": \"base\", \"PAYQL_PRIVATE_KEY\": \"0xYOUR_BASE_WALLET_KEY\" }\n    }\n  }\n}\n```\n\n> ⚠️ **`PAYQL_PRIVATE_KEY` can spend its wallet's USDC.** Use a **dedicated, low-balance Base wallet** — never a primary, valuable, or reused key. It sits in your harness config (which can be logged, synced, or screenshotted), so treat it like any secret: don't commit it or paste it in shared chats. Don't want a raw key here? Use **option B** (your harness's own wallet) or an [Ampersend](https://ampersend.ai)-managed wallet with spend caps.\n\nTools: `search_subgraphs`, `get_payment_info` (free price quote), `query_subgraph` (paid), `get_subgraph_schema`, `wallet_status`. Full recipe + example queries in [references/gateway.md](references/gateway.md).\n\n### B. No install — use your harness's own wallet\n\nIf your harness already has an x402 / `pay-for-service` capability, hit the gateway directly:\n\n- **Gateway URL:** `https://gateway.thegraph.com/api/x402/subgraphs/id/<SUBGRAPH_ID>`\n- POST GraphQL `{\"query\":\"...\"}`. On `402`, pay the quoted USDC amount and retry — your"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7ep45hbzy18628bqpwfwcxa582smkj\",\n  \"slug\": \"payqlskill\",\n  \"version\": \"0.1.5\",\n  \"publishedAt\": 1785981920556\n}"},{"path":"references/gateway.md","content":"# The Graph x402 gateway — recipe & examples\n\nEverything needed to discover, price, and query The Graph's subgraphs pay-per-query, with no API key.\n\n## Endpoints\n\n| | URL |\n|---|---|\n| Query a subgraph (mainnet) | `https://gateway.thegraph.com/api/x402/subgraphs/id/<SUBGRAPH_ID>` |\n| Query a subgraph (testnet) | `https://testnet.gateway.thegraph.com/api/x402/subgraphs/id/<SUBGRAPH_ID>` |\n\n- **Method:** `POST`, `Content-Type: application/json`, body `{\"query\":\"...\",\"variables\":{}}`.\n- **Payment:** the first request returns `402` with the challenge in a base64 **`payment-required` response header** (`accepts[]` → `scheme: exact`, `network: eip155:8453`, `asset:` USDC `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`, `amount:` atomic USDC, `extra.assetTransferMethod: eip3009`). Sign the EIP-3009 authorization and retry with the `X-PAYMENT` header — any x402 client (`@x402/fetch`, `@graphprotocol/client-x402`) does this for you. Settlement is **gasless** (the facilitator pays gas).\n- **Price:** ~**$0.01 USDC** per query.\n\n## 1. Discover a subgraph (free if you have a registry; else a tiny paid query)\n\nQuery The Graph **network subgraph** (`DZz4kDTdmzWLWsV373w2bSmoar3umKKH9y82SUKr5qmp`) with its fulltext index, ranked by curation signal:\n\n```graphql\nquery Search($text: String!, $first: Int!) {\n  subgraphMetadataSearch(text: $text, first: $first) {\n    displayName\n    description\n    subgraphs(first: 1, where: { active: true }, orderBy: currentSignalledTokens, orderDirection: desc) {\n      id\n      currentVersion { subgraphDeployment { ipfsHash queryFeesAmount signalledTokens } }\n    }\n  }\n}\n```\n\n`text` uses tsquery syntax — turn `\"uniswap v3\"` into `\"uniswap:* | v3:*\"` (OR-join, so multi-word topics still match). The `subgraphs[0].id` is the `<SUBGRAPH_ID>` you query in step 2.\n\n## 2. Query it\n\n```graphql\n{\n  pools(first: 3, orderBy: volumeUSD, orderDirection: desc) {\n    token0 { symbol }\n    token1 { symbol }\n    volumeUSD\n  }\n}\n```\n\nExample result (Uniswap V3, `5zvR82QoaXYFyDEKLZ9t6v9adgnptxYpKpSbxtgVENFV`):\n\n```json\n{\n  \"data\": {\n    \"pools\": [\n      { \"token0\": { \"symbol\": \"USDC\" }, \"token1\": { \"symbol\": \"WETH\" }, \"volumeUSD\": \"1234567890.12\" }\n    ]\n  }\n}\n```\n\nThe paid response includes an `X-PAYMENT-RESPONSE` header (base64) with the settlement receipt: `{ success, transaction (tx hash), network, amount }`.\n\n## Funding\n\nHold **USDC on Base** — no ETH needed (gasless). **Use a dedicated, low-balance wallet** funded with only the USDC you intend to spend; seeding it is a one-time human step. This skill makes paid **reads** — it does not swap, trade, or auto-top-up the wallet, so keep funding a separate, human-approved action. For server-side spend caps/allowlists, use an [Ampersend](https://ampersend.ai)-managed wallet."},{"path":"skill-card.md","content":"## Description:\n\nPayQL helps agents discover live The Graph subgraphs, quote x402 pricing, and run paid GraphQL reads using USDC from a user-controlled Base wallet.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[paulieb14](https://clawhub.ai/user/paulieb14)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers and agent operators use PayQL to find relevant on-chain subgraphs, preview query costs, retrieve schemas, check wallet status, and run paid read-only GraphQL queries for DeFi, NFT, ENS, token, and governance data.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The default setup can run a mutable npm package with a wallet private key that can spend real USDC.\n\nMitigation: Use a pinned reviewed package version or locked local install, and configure only a dedicated low-balance Base wallet.\n\nRisk: Paid queries spend real USDC from the configured wallet.\n\nMitigation: Review each quoted price before querying and keep only the USDC amount you are willing to spend or lose in the configured wallet.\n\nRisk: Wallet credentials in harness configuration can be logged, synced, committed, or exposed in shared contexts.\n\nMitigation: Never use a primary or reused private key; prefer the harness wallet flow or a managed wallet with spend caps and allowlists.\n\n## Reference(s):\n\n- [The Graph x402 gateway recipe and examples](artifact/references/gateway.md)\n- [PayQL ClawHub release page](https://clawhub.ai/paulieb14/skills/payqlskill)\n- [x402](https://x402.org)\n- [Ampersend managed wallet option](https://ampersend.ai)\n\n## Skill Output:\n\n**Output Type(s):** [guidance, shell commands, configuration, code, text]\n\n**Output Format:** [Markdown with JSON, GraphQL, and shell command snippets]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May produce x402 payment guidance, GraphQL query examples, subgraph metadata, schemas, wallet status, and paid query results with receipts.]\n\n## Skill Version(s):\n\n0.1.5 (source: server-resolved release evidence, SKILL.md frontmatter, and skill.json)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment."},{"path":"skill.json","content":"{\n  \"name\": \"payql\",\n  \"version\": \"0.1.5\",\n  \"description\": \"Get live on-chain data from The Graph's subgraphs and pay per query in USDC over x402 \\u2014 gasless, keyless, bring-your-own-wallet. Each paid query spends real USDC (~$0.01) from a wallet you control \\u2014 use a dedicated, low-balance Base wallet, never a primary/reused key \\u2014 so it is not free read-only access. Discover the right live subgraph (ranked by curation signal), see the price before paying, then pull DeFi, DEX, NFT, ENS, token, and governance data in one agent loop. No API key, no account, no ETH for gas.\",\n  \"author\": \"paulieb14\",\n  \"license\": \"MIT\",\n  \"homepage\": \"https://github.com/PaulieB14/payql\",\n  \"tags\": [\n    \"x402\",\n    \"thegraph\",\n    \"subgraph\",\n    \"graphql\",\n    \"onchain-data\",\n    \"usdc\",\n    \"base\",\n    \"defi\",\n    \"nft\",\n    \"ens\",\n    \"agent-payments\",\n    \"pay-per-query\",\n    \"mcp\",\n    \"web3\"\n  ],\n  \"categories\": [\n    \"Web\",\n    \"Finance\",\n    \"AI/ML\"\n  ],\n  \"mcp\": {\n    \"tools\": [\n      \"search_subgraphs\",\n      \"get_payment_info\",\n      \"query_subgraph\",\n      \"get_subgraph_schema\",\n      \"wallet_status\"\n    ],\n    \"transport\": \"stdio\",\n    \"endpoint\": \"npx -y payql\"\n  }\n}"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":null,"editorialQuality":{"score":100,"threshold":65,"status":"thin","wordCount":1665,"uniquenessScore":40,"reasons":["uniqueness-below-45"]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-11T16:39:16.870Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-11T16:39:16.870Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-11T20:57:19.202Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}