
Grimoire Uniswap
Look up Uniswap V3/V4 router addresses, tokens, and pools via Grimoire’s venue CLI so you can wire DeFi spells without hand-copying chain metadata.
Overview
Grimoire Uniswap is an agent skill for the Build phase that retrieves Uniswap router, token, and pool metadata through the Grimoire venue CLI for spell authoring.
Install
npx skills add https://github.com/franalgaba/grimoire --skill grimoire-uniswapWhat is this skill?
- Preflight with `grimoire venue doctor --adapter uniswap` before lookups
- Router addresses per chain via `venue uniswap routers`
- Token list lookup and agent-only `tokens-snapshot` for spell `params:` blocks
- Pool discovery by token pair with fee, subgraph, Graph, or RPC options
- Invocable via `grimoire`, `npx @grimoirelabs/cli`, bun repo-local, or `grimoire-uniswap` binary
- Supports Uniswap V3 and V4 adapter metadata via venue CLI
- Multiple invocation paths: grimoire, npx @grimoirelabs/cli, bun local, grimoire-uniswap binary
Adoption & trust: 1k installs on skills.sh; 5 GitHub stars; 1/3 security scanners passed (skills.sh audits).
What problem does it solve?
You are writing a Grimoire spell and need correct Uniswap routers, tokens, or pools on a specific chain without manual chain explorers or brittle copy-paste.
Who is it for?
Indie builders using Grimoire to prototype or ship EVM spells that touch Uniswap V3/V4 on one or more chains.
Skip if: Builders who only need generic DEX analytics without Grimoire spells, or workflows that target non-EVM venues such as Hyperliquid without a Uniswap adapter.
When should I use this skill?
You need router addresses, adapter information, or Uniswap V3/V4 details using the Grimoire venue CLI.
What do I get? / Deliverables
You get CLI-backed adapter metadata and optional spell `params:` snapshots so the next simulate or cast step uses consistent Uniswap addresses and pool references.
- Uniswap adapter info and per-chain router address list
- Token or pool lookup output and optional spell params snapshots
Recommended Skills
Journey fit
Canonical shelf is Build because the skill is invoked while composing or configuring on-chain agent spells and venue adapters, not while operating production monitoring. Integrations fits Uniswap as an external venue API/CLI hook that feeds spell params and snapshots.
How it compares
Venue-specific CLI skill for spell params, not a general-purpose block explorer MCP or a subgraph dashboard UI.
Common Questions / FAQ
Who is grimoire-uniswap for?
Solo and indie builders automating on-chain actions with Grimoire who need Uniswap metadata formatted for spells and venue doctor checks.
When should I use grimoire-uniswap?
During Build integrations when you need router lists, token lookups, pool discovery for a pair, or tokens-snapshot/pools-snapshot blocks before simulating or casting a spell.
Is grimoire-uniswap safe to install?
Review the Security Audits panel on this Prism page before installing; RPC and optional Graph keys are yours—do not commit secrets into repos.
Workflow Chain
Then invoke: grimoire
SKILL.md
READMESKILL.md - Grimoire Uniswap
# Grimoire Uniswap Skill Use this skill to inspect Uniswap metadata and produce token/pool snapshots for spells. Preferred invocations: - `grimoire venue uniswap ...` - `npx -y @grimoirelabs/cli venue uniswap ...` (no-install) - `bun run packages/cli/src/index.ts venue uniswap ...` (repo-local) - `grimoire-uniswap ...` (direct binary from `@grimoirelabs/venues`) Recommended preflight: - `grimoire venue doctor --adapter uniswap --chain 1 --rpc-url <rpc> --json` ## Commands - `grimoire venue uniswap info` — adapter metadata - `grimoire venue uniswap routers [--chain <id>]` — router addresses per chain - `grimoire venue uniswap tokens [--chain <id>] [--symbol <sym>] [--address <addr>] [--source <url>]` — token list lookup - `grimoire venue uniswap tokens-snapshot [--chain <id>] [--symbol <sym>] [--address <addr>] [--source <url>]` — generate spell `params:` block for tokens (agent-only) - `grimoire venue uniswap pools --token0 <address|symbol> --token1 <address|symbol> [--chain <id>] [--fee <bps>] [--limit <n>] [--source <url>] [--endpoint <url>] [--graph-key <key>] [--subgraph-id <id>] [--rpc-url <url>] [--factory <address>]` — find pools for a token pair - `grimoire venue uniswap pools-snapshot --token0 <address|symbol> --token1 <address|symbol> [--chain <id>] [--fee <bps>] [--limit <n>] [--source <url>] [--endpoint <url>] [--graph-key <key>] [--subgraph-id <id>] [--rpc-url <url>] [--factory <address>]` — generate spell `params:` block for pools (agent-only) ## Pool Data Sources Pools can be fetched from The Graph (subgraph) or directly from on-chain factory contracts: - **Subgraph** (default when `GRAPH_API_KEY` is set): queries The Graph decentralized network. Built-in subgraph IDs for Ethereum, Optimism, Polygon, Base, Arbitrum. - **RPC** (fallback): if no usable graph config is present, pools uses on-chain factory lookups (with `--rpc-url`/`RPC_URL` when provided, otherwise chain default RPC where available). - To force RPC mode: provide `--rpc-url` and omit `--graph-key`. ## Environment Variables | Variable | Description | |----------|-------------| | `GRAPH_API_KEY` | The Graph API key for subgraph queries (get one at https://thegraph.com/studio/apikeys/) | | `RPC_URL` | Fallback RPC URL for on-chain pool lookups | ## Examples ```bash grimoire venue uniswap info --format table grimoire venue uniswap routers grimoire venue uniswap routers --chain 1 grimoire venue uniswap tokens --chain 1 --symbol USDC --format spell grimoire venue uniswap pools --chain 1 --token0 USDC --token1 WETH --fee 3000 --format spell grimoire venue uniswap pools --chain 8453 --token0 USDC --token1 WETH --fee 500 --rpc-url $RPC_URL --format table grimoire venue uniswap pools --chain 8453 --token0 USDC --token1 WETH --fee 500 --graph-key $GRAPH_API_KEY --subgraph-id <id> grimoire venue uniswap tokens-snapshot --chain 1 --symbol USDC grimoire venue uniswap pools-snapshot --chain 1 --token0 USDC --token1 WETH --rpc-url $RPC_URL ``` Use `tokens-snapshot` or `pools-snapshot` to emit a `params:` block for spell inputs. These are agent-only commands (output suppressed in interactive mode). ## Metric Surface (Spell Comparisons) Uniswap V3 and V4 expose `quote_out` for protocol comparison: ```spell v3_out = metric("quote_out", uni_v3, USDC, "asset_out=WETH,amount=1000000,fee_tier=3000") v4_out = metric("quote_out", uni_v4, USDC, "asset_out=WETH,amount=1000000,fee_tier=3000,tick_spacing=60") ``` Selector fields: - required: `asset_out` - optional: `amount` (defaults to 1 unit of input asset), `fee_tier` - V4 optional: `tick_spacing` ## Spell Constraints When writing swap actions in `.spell` files targeting Uniswap, use `with` clauses to set constraints: ```spell uniswap_v3.swap(USDC, WETH, params.amount) with ( fee_tier=3000, max_slippage=50,