v4hooks
AGENTS.md1 starsChanged 3 months agoMITView on GitHub
You are helping with v4hooks, a directory of Uniswap v4 hook example contracts (https://v4hooks.com). If a change affects how humans or agents use the site, update docs in the same commit: README.md, CONTRIBUTING.md, this file, SKILLS.md, public/skills.md, SECURITY.md. Add a page agents should see → edit scripts/generate-agent-files.mjs, then npm run build so public/llms.txt, public/llm-full.txt, and public/hooks.json match. CSS-only restyles do not need a doc pass.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository6 other files it gives its agents.
- .cursor/rules/confirm-commit-push.mdcCursor rule
- .cursor/rules/first-party-hooks.mdcCursor rule
- .cursor/rules/forge-tests.mdcCursor rule
- .cursor/rules/foundry-gates.mdcCursor rule
- .cursor/rules/sync-user-facing-docs.mdcCursor rule
- public/llms.txtllms.txt
The file
We split this AGENTS.md into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Do not clone Uniswap/hooklist.
- Distinctive: line 14
Do not invent Solidity or contract addresses (YAML excerpts must match a real file).
- Very specific: line 27
Add a hook listing: copy hooks/_template.yml to hooks/{slug}.yml, then npm run validate.
- Very specific: line 28
Add a first-party hook: write contracts/{Name}.sol + test/{Name}.t.sol, forge test, then add the YAML listing.
- Very specific: line 45
Commit .dev.vars or secrets.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
You are helping with v4hooks, a directory of Uniswap v4 hook example contracts (https://v4hooks.com).
What this repo is
- Source of truth:
hooks/*.yml— each file is a licensed Solidity excerpt + GitHub permalink - First-party examples:
contracts/*.sol+test/*.t.sol(Foundry). May rewrite legacy hooks for current v4. kind: pattern= implement this.kind: product= study a live protocol’s callbacksproperties:dynamic-fee|upgradeable|custom-swap-data|vanilla-swap- Site: Astro static pages in
src/pages - Ads API:
src/worker.ts+ D1v4hooks-ads - Do not clone Uniswap/hooklist. Link to it for addresses.
- Do not invent Solidity or contract addresses (YAML excerpts must match a real file).
Read first
README.md,CONTRIBUTING.md,schema/hook.schema.json- Generated at build:
public/llms.txt,public/llm-full.txt,public/hooks.json
Keep user-facing docs current
If a change affects how humans or agents use the site, update docs in the same commit: README.md, CONTRIBUTING.md, this file, SKILLS.md, public/skills.md, SECURITY.md. Add a page agents should see → edit scripts/generate-agent-files.mjs, then npm run build so public/llms.txt, public/llm-full.txt, and public/hooks.json match. CSS-only restyles do not need a doc pass.
Tasks
- Add a hook listing: copy
hooks/_template.ymltohooks/{slug}.yml, thennpm run validate. Files starting with_are not listings. - Add a first-party hook: write
contracts/{Name}.sol+test/{Name}.t.sol,forge test, then add the YAML listing. - Change copy/SEO: edit the page under
src/pagesand keep JSON-LD accurate. - Ads: Worker routes
/api/ads,/api/ads/intent,/api/ads/webhook. Min bid 5 USDC.
Commands
npm run validate
npm run build
forge build
forge testDo not
- Invent contract addresses or Solidity.
- Claim listings are audited or official Uniswap routing.
- Commit
.dev.varsor secrets.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

