ahooks — Claude Code skill: what it does, how to install
Reference skill for the ahooks React library: provides recipes, TypeScript patterns, and guidance for over 76 custom hooks.
no license 1 installs ★ 15 updated 2026-01-21
npx skills add whinc/my-claude-plugins --skill ahooks -a claude-codeWhat ahooks does
This skill supplies your coding assistant with deep knowledge of the ahooks ecosystem. It details hook signatures and implementation patterns across 9 categories, covering state management (useSetState, useBoolean), component lifecycle, browser APIs, storage, and debounced events.
The tool shines when designing complex UI workflows. It explains how to structure server requests with polling or caching via useRequest, connect table pagination, or sync component state with browser storage.
Your project must have the actual ahooks package installed in node_modules for generated imports to run without errors.
What it helps with
- configure API queries with pagination, retry logic, and caching using
useRequest - migrate bulky component state from standard
useStatetouseSetStateoruseToggle - optimize heavy re-renders and rapid input events using
useDebounceoruseThrottle - handle DOM events, scroll metrics, and interval timers without manual cleanup boilerplate
Example prompts for the agent
- Show how to set up server pagination and result caching with
useRequest. - Refactor this complex form state from
useStatetouseSetState. - How do I debounce an input search field using
useDebounce?
How to install ahooks
1Skills CLI (Vercel)
npx skills add whinc/my-claude-plugins --skill ahooks -a claude-code2Manually: put the files in place
~/.claude/skills/ahooks/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/ahooks/
1Skills CLI (Vercel)
npx skills add whinc/my-claude-plugins --skill ahooks -a codex2Manually: put the files in place
.agents/skills/ahooks/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add whinc/my-claude-plugins --skill ahooks -a cursor2Manually: put the files in place
.cursor/skills/ahooks/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install whinc/my-claude-plugins plugins/ahooks/skills/ahooks2Manually: put the files in place
.github/skills/ahooks/SKILL.md1Skills CLI (Vercel)
npx skills add whinc/my-claude-plugins --skill ahooks -a gemini-cli2Platform CLI
gemini skills install https://github.com/whinc/my-claude-plugins --path plugins/ahooks/skills/ahooksManually: put the files in place
.devin/skills/ahooks/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add whinc/my-claude-plugins --skill ahooks -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about ahooks
How to install ahooks in Claude Code?
Run npx skills add whinc/my-claude-plugins --skill ahooks -a claude-code in your terminal.
What does the ahooks skill do?
It gives your assistant instant reference material for all 76+ ahooks utilities, including lifecycle helpers and TypeScript typings.
Does this skill require network access during code generation?
No, reference files and patterns are bundled locally inside the installed skill directory.