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.
npx agentmods add skills/nirholas/three.ws/query-onchain-datanpx skills add nirholas/three.ws --skill query-onchain-datagit clone --depth 1 https://github.com/nirholas/three.wsWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00042 | $0.02386 |
| Opus 5 | $0.00021 | $0.01193 |
| Sonnet 5 | $0.00008 | $0.00477 |
| Haiku 4.5 | $0.00004 | $0.00239 |
Grade A, and why
query-onchain-data 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 2d 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.
Copies of this mod
1 near-identical copy found in the catalogue:
- query-onchain-data — 91% identical, 22 lines differ
How it starts
The opening of the file, as written. The whole thing — 214 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Query Onchain Data on Base
Use the CDP SQL API to query onchain data (events, transactions, blocks, transfers) on Base. Queries are executed via x402 and are charged per query.
Confirm wallet is initialized and authed
npx [email protected] status
If the wallet is not authenticated, refer to the authenticate-wallet skill.
Executing a Query
npx [email protected] x402 pay https://x402.cdp.coinbase.com/platform/v2/data/query/run -X POST -d '{"sql": "<YOUR_QUERY>"}' --json
IMPORTANT: Always single-quote the -d JSON string to prevent bash variable expansion.
Input Validation
Before constructing the command, validate inputs to prevent shell injection:
- SQL query: Always embed the query inside a single-quoted JSON string (
-d '{"sql": "..."}'). Never use double quotes for the outer-dwrapper, as this enables shell expansion of$and backticks within the query. - Addresses: Must be valid
0xhex addresses (^0x[0-9a-fA-F]{40}$). Reject any value containing shell metacharacters.
Do not pass unvalidated user input into the command.
CRITICAL: Indexed Fields
Queries against base.events MUST filter on indexed fields to avoid full table scans. The indexed fields are:
| Indexed Field | Use For |
|---|---|
event_signature |
Filter by event type. Use this instead of event_name for performance. |
address |
Filter by contract address. |
block_timestamp |
Filter by time range. |
Always include at least one indexed field in your WHERE clause. Combining all three gives the best performance.
CoinbaseQL Syntax
CoinbaseQL is a SQL dialect based on ClickHouse. Supported features:
- Clauses: SELECT (DISTINCT), FROM, WHERE, GROUP BY, ORDER BY (ASC/DESC), LIMIT, WITH (CTEs), UNION (ALL/DISTINCT)
- Joins: INNER, LEFT, RIGHT, FULL with ON
- Operators:
=,!=,<>,<,>,<=,>=,+,-,*,/,%, AND, OR, NOT, BETWEEN, IN, IS NULL, LIKE - Expressions: CASE/WHEN/THEN/ELSE, CAST (both
CAST()and::syntax), subqueries, array/map indexing with[], dot notation - Literals: Array
[...], Map{...}, Tuple(...) - Functions: Standard SQL functions, lambda functions with
->syntax
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.
- 2d ago First seen · 214 lines · 42 tokens per session scan A dd71ea2949a9
query-onchain-data is a skill published in the GitHub repository nirholas/three.ws (107 stars, last pushed 3d ago), licensed Apache-2.0. It adds 42 tokens to every session and 2,386 once invoked, about $0.0002 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-30.
Other skills, from other repositories
dual-replay
Run Sui dual execution replay between base and tip commits, recover failed steps, build, and commit replay instrumentation.
sui-move-security-review
Use when auditing, reviewing, or hunting for vulnerabilities in Move code on Sui. Applies equally to source code (.move files) and to disassembly of compiled bytecode (on-chain packages). A checklist of invariants whose VIOLATION causes exploitable bugs: access control & capabilities, struct abilities & type safety…
sui-and-move-tools
Use to get bytecode for a deployed Sui package and produce a disassembled working view. One GraphQL call fetches every module's raw bytecode bytes; sui move disassemble (already on the system, running sui prompt) produces .asm files for analysis. Trigger on "fetch this package's bytecode", "get me the .mv for package…
analyzing-ethereum-smart-contract-vulnerabilities
Perform static and symbolic analysis of Solidity smart contracts using Slither and Mythril to detect reentrancy, integer overflow, access control, and other vulnerability classes before deployment to Ethereum mainnet.
beacon-skill
Agent-to-agent protocol for social coordination, crypto payments, and P2P mesh.
lineth-quickstart
Operating manual for the Lineth Stack quickstart — the Docker-Compose dev/demo stack at docs/getting-started/lineth-stack in the lineth-monorepo that boots a local Linea/Lineth L2 with Sepolia or local L1 finality. Use whenever you are working inside the lineth-stack quickstart and need to boot or run the stack…