payql

payql is a skill for Claude Code, Codex from PaulieB14/payql. It costs 134 tokens per session (1,083 once invoked), scanned A, original, MIT.

A skill for retrieving live blockchain data from The Graph, a service that indexes data from decentralized applications. It discovers suitable subgraphs, checks the price, and pays for queries in USDC from a wallet on Base.

In plain words
What is it for?
Finding subgraphs and querying data about DeFi, exchange pools, NFTs, ENS, tokens, and governance across supported blockchain networks.
Why use it?
It avoids relying on stale or hard-to-find blockchain data and makes the cost visible before a query spends real money.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/paulieb14/payql/skill
Any agent
npx skills add PaulieB14/payql --skill skill
Clone the repo
git clone --depth 1 https://github.com/PaulieB14/payql

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for payql

README.md
[![agentmods](https://agentmods.dev/badge/skills/paulieb14/payql/skill.svg)](https://agentmods.dev/skills/paulieb14/payql/skill)
Your own site
<a href="https://agentmods.dev/skills/paulieb14/payql/skill"><img src="https://agentmods.dev/badge/skills/paulieb14/payql/skill.svg" alt="Measured on agentmods" height="20"></a>
Per session 134 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,083 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00134 $0.01083
Opus 5 $0.00067 $0.00541
Sonnet 5 $0.00027 $0.00217
Haiku 4.5 $0.00013 $0.00108

Measured 5d ago against content hash 361934f49123, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

payql scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skill/SKILL.md · 60 lines

How it starts

The opening of the file, as written. The whole thing — 60 lines — stays where its author put it; the contents beside it link to each section on GitHub.

PayQL — pay-per-query data from The Graph

Get 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. No API key, no account, no ETH for gas — the payment is the auth, and it's gasless (EIP-3009 transferWithAuthorization on Base).

💸 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.

The loop: discover → price → query

  1. Discover the right live subgraph for a protocol — ranked by on-chain curation signal, so you skip dead forks.
  2. Price it — preflight the 402 challenge to read the exact USDC cost before paying (free).
  3. Query — send GraphQL, pay the 402 from your wallet, get the data + a receipt back.

Two ways to run it

A. PayQL MCP server (turnkey)

Install and wire into your harness (Claude Desktop / Code / Cursor):

{
  "mcpServers": {
    "payql": {
      "command": "npx",
      "args": ["-y", "payql"],
      "env": { "PAYQL_NETWORK": "base", "PAYQL_PRIVATE_KEY": "0xYOUR_BASE_WALLET_KEY" }
    }
  }
}

⚠️ 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-managed wallet with spend caps.

Tools: search_subgraphs, get_payment_info (free price quote), query_subgraph (paid), get_subgraph_schema, wallet_status. Full recipe + example queries in references/gateway.md.

Read the full file on GitHub · 60 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 60 lines · 134 tokens per session scan A 361934f49123

Subscribe to this mod's changes

payql is a skill published in the GitHub repository PaulieB14/payql (0 stars, last pushed 1mo ago), licensed MIT. It adds 134 tokens to every session and 1,083 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.