/ahooks:ahooksfrom ahooks
Expert on all 76+ ahooks React hooks: state management, data fetching, performance, DOM utilities, and advanced patterns. Use when working with ahooks or learning React hooks best practices.
Ships in ahooks. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
This skill provides comprehensive expertise for the ahooks React hooks library, covering all 76+ hooks with detailed documentation, examples, and best practices.
import { useRequest, useMount, useSetState } from 'ahooks';
const MyComponent = () => {
const { data, loading, error } = useRequest('/api/data');
const [state, setState] = useSetState({ count: 0 });
useMount(() => {
console.log('Component mounted');
});
return <div>{data}</div>;
};
useSetState, useToggle, useBoolean for complex stateuseRequest for API calls with caching, retry, pollinguseDebounce, useThrottle for optimizationuseMount, useUnmount, useUpdateEffect for component lifecycleThis skill organizes hooks into 9 main categories:
State utilities for complex state handling. See: state-hooks.md
Component lifecycle and effect management. See: effect-hooks.md
API calls, pagination, infinite scroll, and data caching. See: request-hooks.md
Debounce, throttle, memoization, and RAF optimizations. See: performance-hooks.md
Event listeners, sizing, scrolling, and UI interactions. See: dom-hooks.md
Local storage, session storage, cookies, and URL state. See: dom-hooks.md
Network status, visibility, keyboard events, and browser features. See: dom-hooks.md
Intervals, timeouts, and countdown utilities. See: advanced-hooks.md
WebSockets, history management, reactive data, and complex patterns. See: advanced-hooks.md
// Most commonly used hooks
import {
useRequest, // Data fetching
useMount, // Component mount
useUnmount, // Component unmount
useSetState, // State management
useDebounce, // Performance
useThrottle, // Performance
useEventListener // DOM events
} from 'ahooks';
references/advanced-hooks.md (opens in a new tab)references/best-practices.md (opens in a new tab)references/dom-hooks.md (opens in a new tab)references/effect-hooks.md (opens in a new tab)references/migration-guide.md (opens in a new tab)references/performance-hooks.md (opens in a new tab)references/request-hooks.md (opens in a new tab)references/state-hooks.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub whinc/my-claude-plugins --plugin ahooksOther plugins' skills for the same job