v4-sdk-integration

v4-sdk-integration is a skill for Claude Code from Uniswap/uniswap-ai. It costs 101 tokens per session (2,557 once invoked), scanned A, original, MIT.

A developer guide for using the Uniswap v4 software libraries to build token swaps, price quotes, and liquidity features. Liquidity means supplying tokens to a trading pool so others can trade against them.

In plain words
What is it for?
It is for building swap interfaces, displaying quotes, reading pool prices and liquidity, and adding, removing, or collecting from liquidity positions.
Why use it?
It helps developers handle v4-specific contracts, pool state, approvals, and position management correctly.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter.

Part of the uniswap-trading plugin — 5 skills shipped together

Good fit It is for building swap interfaces, displaying quotes, reading pool prices and liquidity, and adding, removing, or collecting from liquidity positions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/uniswap/uniswap-ai/v4-sdk-integration
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.

Any agent
npx skills add Uniswap/uniswap-ai --skill v4-sdk-integration
Clone the repo
git clone --depth 1 https://github.com/Uniswap/uniswap-ai

Made for: Claude Code.

Or install uniswap-trading, the plugin that ships this one along with the rest of its 5 skills.

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 v4-sdk-integration

README.md
[![agentmods](https://agentmods.dev/badge/skills/uniswap/uniswap-ai/v4-sdk-integration/github.svg)](https://agentmods.dev/skills/uniswap/uniswap-ai/v4-sdk-integration)
Your own site
<a href="https://agentmods.dev/skills/uniswap/uniswap-ai/v4-sdk-integration"><img src="https://agentmods.dev/badge/skills/uniswap/uniswap-ai/v4-sdk-integration/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for v4-sdk-integration

Your own site · 80×15
<a href="https://agentmods.dev/skills/uniswap/uniswap-ai/v4-sdk-integration"><img src="https://agentmods.dev/badge/skills/uniswap/uniswap-ai/v4-sdk-integration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 101 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,557 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 8 Apr 2026
  • Snyk warn 8 Apr 2026
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 9
    Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.
    Fix: Remove the model/provider override or disclose it prominently and require explicit operator approval before invoking an external coding CLI or billed model.
  • medium Prompt Injection · line 56
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
How audits are shown
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.00101 $0.02557
Opus 5 $0.00051 $0.01278
Sonnet 5 $0.00020 $0.00511
Haiku 4.5 $0.00010 $0.00256

Measured 2d ago against content hash 02b5000ed2f6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

v4-sdk-integration scanned grade A with 1 finding 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

allowed-tools: Read, Write, Edit, Glob, Grep, Bash(npm:*), Bash(npx:*), Bash(yarn:*), Bash(curl:*), WebFetch
packages/plugins/uniswap-trading/skills/v4-sdk-integration/SKILL.md · 272 lines

How it starts

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

Uniswap v4 SDK Integration

App-layer SDK for swaps, quotes, and liquidity. For Solidity hook contracts, use the uniswap-hooks skill. For Trading API or v3-centric swaps, use the swap-integration skill.

When to Use

  • Token swap UI (single-hop or multi-hop)
  • Quote/price display before executing a trade
  • Liquidity position management (add/remove/collect)
  • Pool state reads (price, tick, liquidity)

Packages

npm i @uniswap/v4-sdk @uniswap/sdk-core @uniswap/universal-router-sdk

v4 vs v3 Decision Table

Aspect v3 v4
Swap execution SwapRouter directly Universal Router required (V4Planner)
Pool architecture One contract per pool Singleton PoolManager
Pool state reads Direct pool contract StateView contract
Native ETH Wrap to WETH Native support (Ether.onChain(chainId))
Position NFTs NonfungiblePositionManager PositionManager + multicall
Fee collection Explicit collect() Automatic on position modification
Position discovery Onchain enumeration Offchain event indexing
Token approvals Direct approve Permit2 required
Contract addresses Same across chains Different per chain — verify from deployments

Core Contracts (Per Chain)

Look up addresses at https://docs.uniswap.org/contracts/v4/deployments — they differ per chain.

Contract Purpose
PoolManager Singleton pool state
Universal Router Swap execution entry point
Quoter Offchain quote simulation (eth_call, never a transaction)
StateView Pool state reads (getSlot0, getLiquidity)
PositionManager LP position lifecycle
Permit2 Token approval layer (same across chains: 0x000000000022D473030F116dDEE9F6B43aC78BA3)

Read the full file on GitHub · 272 lines

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. 2d ago Changed · +31 lines 02b5000ed2f6
  2. 11d ago First seen · 241 lines · 101 tokens per session scan A 2e3d1abd103c

Subscribe to this mod's changes

v4-sdk-integration is a skill published in the GitHub repository Uniswap/uniswap-ai (230 stars, last pushed today), licensed MIT. It adds 101 tokens to every session and 2,557 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

web3-fullstack-packaged-build

Systematic full-stack Web3 build with mandatory packaging and delivery phase.

HKUDS/OpenSpace · 21 tokens

web3-fullstack-systematic-build

Systematic approach to building full-stack Web3 applications layer by layer.

HKUDS/OpenSpace · 21 tokens

solana-dev

Use when user asks to "build a Solana dapp", "write an Anchor program", "create a token", "debug Solana errors", "set up wallet connection", "test my Solana program", "fuzz my Solana program", "deploy to devnet", "send a v1 transaction", "support larger transactions", "fix maxSupportedTransactionVersion", or "explain…

solana-foundation/solana-dev-skill · 250 tokens

devtools-event-client

Create typed EventClient for a library. Define event maps with typed payloads, pluginId auto-prepend namespacing, emit()/on()/onAll()/onAllPluginEvents() API. Connection lifecycle (5 retries, 300ms), event queuing, enabled/disabled state, SSR fallbacks, singleton pattern. Unique pluginId requirement to avoid event…

TanStack/devtools · 79 tokens

walkeros-create-destination

Use when creating a new walkerOS destination to send events to a vendor or API (GA4/gtag, Meta/Facebook Pixel, Mixpanel, Amplitude, a custom HTTP API, Measurement Protocol), web or server-side. Example-driven workflow: research the vendor SDK and define step examples before implementing the destination interface, env…

elbwalker/walkerOS · 77 tokens

walkeros-create-source

Use when creating a new walkerOS source to capture events (browser source, dataLayer interception, server/HTTP source, webhook receiver, event capture), web or server-side. Example-driven workflow: research the input format and define step examples before implementing the push interface, createTrigger, and env pattern.

elbwalker/walkerOS · 65 tokens