Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Uniswap V3 Liquidity

ASecurity

Use when managing a Uniswap v3 NFT position: choose usable ticks, mint or increase liquidity, collect fees, remove liquidity, or move a range. Resolves position inventory and fee accounting with exact manager calls; excludes v4 and gauge custody.

2 stars
0 votes
0 copies
0 views
Added 9/28/2026
ai-agentsnodeexpressapidocumentation

Works with

api

Security Analysis

A100/100

Scanned 9/28/2026

Install to Claude Code

$npx -y skills add galleonlabs/crypto-defi-skills --skill uniswap-v3-liquidity --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Uniswap V3 Liquidity?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Uniswap V3 Liquidity
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/galleonlabs-uniswap-v3-liquidity/badge)](https://www.skillsdirectory.com/skills/galleonlabs-uniswap-v3-liquidity)

More formats (shields.io, HTML) on the badges page.

Files
SKILL.md
---
name: uniswap-v3-liquidity
description: "Use when managing a Uniswap v3 NFT position: choose usable ticks, mint or increase liquidity, collect fees, remove liquidity, or move a range. Resolves position inventory and fee accounting with exact manager calls; excludes v4 and gauge custody."
license: MIT
compatibility: "Read-only EVM RPC and official protocol APIs or UI. Optional Node.js 20 for offline helpers. No signer included."
metadata:
  author: "Galleon Labs"
  version: "0.6.0"
---

# Uniswap v3 Liquidity

Produce a position decision: keep, collect, increase, reduce, or replace the range. Include exact pool identity, inventory, usable ticks, costs, and an unsigned action sequence. Start with the user's token ID or pair and chain; do not require a wallet for public range analysis.

## Read the position before choosing a range

1. Resolve the chain's v3 factory and NonfungiblePositionManager from official deployments. Read their bytecode, `factory()` and pool identity at one block. A token ID without a manager and chain is ambiguous.
2. Existing NFT: read `ownerOf(tokenId)` and `positions(tokenId)`. Resolve the pool with `getPool(token0,token1,fee)`. Read pool `slot0()`, `tickSpacing()`, `liquidity()` and both token decimals. Preserve raw amounts as integer strings. A vault owning the NFT changes the withdrawal path; stop the direct-owner recipe and identify its share/redemption interface.
3. New position: establish address-sorted token0/token1 before expressing a price. Human token1 per token0 is `1.0001^tick * 10^(decimals0-decimals1)`. Inverting the display pair reverses the price bounds; it does not reverse protocol token order.
4. Pick the horizon and inventory constraints before ticks. Snap the lower tick down and upper tick up to spacing, remaining within usable TickMath bounds. The active interval is `tickLower <= currentTick < tickUpper`. Below range inventory is token0; at/above upper it is token1. Pool-wide liquidity is not the NFT's liquidity.
5. Use the official v3 SDK `Pool` and `Position.fromAmounts` for exact token composition and mint amounts, with the observed sqrt price and raw budgets. Do not price the required ratio from USD weights or floating-point token arithmetic.

## Choose the smallest operation

| User objective | Manager sequence | Completion evidence |
| --- | --- | --- |
| Claim fees | Simulate `collect` from owner, then prepare bounded collect | Recipient deltas and Collect event |
| Add capital to same range | Approvals as needed, `increaseLiquidity` | Same NFT, larger liquidity, actual debits |
| Reduce exposure | `decreaseLiquidity`, then `collect` | Smaller liquidity and received principal plus fees |
| Move range | Decrease, collect, optionally swap inventory, mint new NFT | Old and new IDs reconciled, residual assets reported |
| Close NFT | Full decrease, collect, then optional `burn` | Zero liquidity and owed tokens before burn |

`tokensOwed0/1` is checkpointed accounting, not necessarily current claimable fees. Simulate collection or calculate current inside fee growth with the matching SDK and block. A prior decrease adds principal to owed tokens: never label all collected tokens as income. Decreasing liquidity alone does not deliver tokens to the wallet. Increasing liquidity never changes ticks.

## Prepare and reconcile

Read [recipes](references/recipes.md) only for the selected operation. Bind recipient, max spends, minimum outputs, deadline, manager, allowance amounts and gas budget. Prefer official SDK calldata or the official UI; no new signing runtime. Simulate from the actual owner with the final calldata and value. Multi-step output-dependent swaps and remints stay deferred until inputs are known or the entire atomic call is simulated.

Changing range can crystallize inventory loss and pay swaps, gas and price impact. Compare modeled incremental fees over the user's horizon with those costs, and show the HOLD baseline. No headline APR implies a profitable rebalance.

This skill returns an unsigned plan unless an existing authorized wallet tool has explicit authority for the exact action. Never infer trade authority from installation or research. Reconcile a previously submitted hash before any resend. Completion requires a successful receipt, the manager's post-state, and recipient balance/event evidence at an identified block.

## Offline range probe

From this installed skill directory, run `node scripts/ticks.mjs '{"lower":-121,"upper":119,"spacing":60,"current":120}'`. It snaps integer tick bounds outward and identifies inventory side. It rejects invalid bounds and does not discover token order, choose a profitable range, or calculate mint amounts.

## Worked output

Synthetic equal-decimal pair, spacing 60, current tick 0, requested ticks -121..119: usable enclosing range is -180..120. An existing range -120..0 is out of range at tick 0 and holds token1 principal. Decision: do not increase it to recenter; price a replacement range first. If simulated collect is 25 token1 after a decrease credited 20 principal, at most 5 is fee income before rounding and previous owed balances. Return `plan-only`, old token ID, proposed ticks, cost estimate and missing simulation; do not fabricate a mint ID.

## Sources and maintenance

Primary sources checked 2026-09-27. [Protocol recipes and sources](references/recipes.md) contain the concrete calls. Recheck deployments and API schemas before preparing financial actions; documentation access alone proves no live position or transaction.

Attribution

galleonlabsgalleonlabs
View sourceMore from galleonlabs →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Ultra-compressed communication mode that cuts output tokens while keeping technical accuracy. Levels: lite, full, ultra and the wenyan variants. Use for /caveman, "caveman mode", "talk like caveman", "be brief" or "less tokens".

1074701 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

695601 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3351 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

691 votes

math-skill

A comprehensive mathematical reasoning skill for AI assistants — handles arithmetic to research-level problems with rigorous step-by-step reasoning, systematic verification, and transparent uncertainty handling

381 votes
View all in ai-agents →