
Uniswap v4 hook access control
Guides an agent to audit Uniswap v4 hook callbacks for missing caller and PoolKey checks
Uniswap v4 hook access control is an open-source agent skill for security. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.
- Scripts
- None
- Platforms
- Claude Code, Codex, Cursor
- GitHub stars
- 227
- Last commit
- License
- MIT
- Listing updated
Similar skills
About Uniswap v4 hook access control
This skill directs an agent to review a Uniswap v4 singleton hook for one specific weakness: callbacks such as beforeSwap, afterSwap, beforeAddLiquidity and donate that do not confirm the PoolManager is the caller or do not validate the supplied pool key. It lays out a method in which the agent enumerates the hook's callbacks and their permission flags, checks each one for both guards, and traces which internal accounting state can be changed by caller-controlled parameters.
The workflow ends with a proof-of-concept step on a forked chain, where the agent calls an unguarded callback directly with inflated values and compares the result against the same call routed through the PoolManager. It also suggests a formal invariant that hook accounting only advances through PoolManager calls with a registered pool key. The skill frames its output as leads for a fuller verification process rather than final findings, and asks that any finding be checked against existing advisories before reporting.
The skill is written for security specialists and expects a Solidity codebase, the Foundry toolchain (forge, cast, anvil), Slither for static analysis, and optionally halmos for symbolic checking.
When your agent uses it
Use when the target integrates a Uniswap v4 singleton hook and you must check each hook callback (beforeSwap, afterSwap, beforeAddLiquidity, donate) for the missing-caller-check class — a callback that fails to require msg.sender is the PoolManager or to validate the supplied PoolKey lets an attacker invoke it directly with forged accounting to mint unbacked tokens or drain the pool.
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
From a static check of its 1 file (3 KB) on GitHub on 3 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
Copy the skill folder to ~/.claude/skills/uniswap-v4-hook-access-control to use it in all your projects:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/mtarcure/claude-vibe-squad.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/uniswap-v4-hook-access-control &&
cp -R "$tmp/.agents/skills/uniswap-v4-hook-access-control" ~/.claude/skills/uniswap-v4-hook-access-control &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/uniswap-v4-hook-access-control inside it instead.
Copy the skill folder to ~/.agents/skills/uniswap-v4-hook-access-control to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/mtarcure/claude-vibe-squad.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/uniswap-v4-hook-access-control &&
cp -R "$tmp/.agents/skills/uniswap-v4-hook-access-control" ~/.agents/skills/uniswap-v4-hook-access-control &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/uniswap-v4-hook-access-control inside it instead.
Copy the skill folder to ~/.cursor/skills/uniswap-v4-hook-access-control to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/mtarcure/claude-vibe-squad.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/uniswap-v4-hook-access-control &&
cp -R "$tmp/.agents/skills/uniswap-v4-hook-access-control" ~/.cursor/skills/uniswap-v4-hook-access-control &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/uniswap-v4-hook-access-control inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/mtarcure/claude-vibe-squad.git --path .agents/skills/uniswap-v4-hook-access-controlOr copy the folder to ~/.gemini/skills/uniswap-v4-hook-access-control yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/uniswap-v4-hook-access-control:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/mtarcure/claude-vibe-squad.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/uniswap-v4-hook-access-control &&
cp -R "$tmp/.agents/skills/uniswap-v4-hook-access-control" ~/.copilot/skills/uniswap-v4-hook-access-control &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/uniswap-v4-hook-access-control inside it instead.
Get the folder:
git clone --depth 1 https://github.com/mtarcure/claude-vibe-squad.gitThen copy claude-vibe-squad/.agents/skills/uniswap-v4-hook-access-control into your agent's skills folder as uniswap-v4-hook-access-control. Agents that support SKILL.md read one folder per skill.
What it does
- Callback caller checks
- Verifies that each hook callback requires the PoolManager as the message sender.
- PoolKey validation review
- Checks whether callback parameters are tied to pools the hook is authorized for.
- Hook permission enumeration
- Lists the callbacks a deployed hook exposes by reading its permission bitmap.
- Accounting state tracing
- Identifies internal balances and supply changed by caller-supplied parameters.
- Fork-based proof of concept
- Describes a direct-call exploit test on a forked chain with a routed negative control.
- Invariant suggestion
- Proposes a forge or halmos invariant limiting accounting updates to registered pool calls.
Good for
- Audit a Uniswap v4 hook for missing PoolManager caller checks
- Check whether beforeSwap or donate can be called directly to mint tokens
- Review a v4 hook's PoolKey validation before a security submission
- Write a fork test showing a direct hook call drains a pool
Uniswap v4 hook access control FAQ
What does Uniswap v4 hook access control need to run?
It expects a Solidity project with Foundry tooling (forge, cast, anvil), Slither for enumerating callbacks, and optionally halmos for invariant checks.
Does Uniswap v4 hook access control change any code in my project?
The skill only describes an audit method. It asks the agent to read the hook, run analysis tools, and write a proof-of-concept test, without describing any automatic edits.
Which vulnerability does Uniswap v4 hook access control focus on?
It focuses on the missing-caller-check class in Uniswap v4 hook callbacks, where an attacker can invoke a callback directly with forged accounting to mint unbacked tokens or drain a pool.
How do I install Uniswap v4 hook access control in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/uniswap-v4-hook-access-control to use it in all your projects, or to .claude/skills/uniswap-v4-hook-access-control in one project.
Does Uniswap v4 hook access control run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Uniswap v4 hook access control?
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.
What are the best alternatives to Uniswap v4 hook access control?
The closest alternatives to Uniswap v4 hook access control are V4 security foundations, Defi amm security, Read only reentrancy check, Defi invariant check and Signature validation audit.
Where this comes from
- Description: from the skill's own SKILL.md.
More from mtarcure/claude-vibe-squad

Writes alt text, timed captions and transcripts for images, footage and audio
- Open source
- 227 GitHub stars
- Design and media

Guides building product agent system prompts with eval-backed boundaries and output
- Open source
- 227 GitHub stars
- AI models and LLM tooling

Guides authorized adversarial testing of autonomous LLM agents for injection and approval
- Open source
- 227 GitHub stars
- Security

Writes a typed game-event to audio-cue map that hands adaptive audio designs to engines
- Open source
- 227 GitHub stars
- Developer tools

Generates missing README, CHANGELOG, LICENSE and agent-context files at project delivery
- Open source
- 227 GitHub stars
- Developer tools

Builds and proves multi-step exploit chains from weak bug-bounty findings
- Open source
- 227 GitHub stars
- Security





