/harness-claude:react-hooks-patternfrom harness-claude
Reuses stateful logic across React components via custom hooks. Use for shared data fetching, form state, or media queries.
Claude never picks this skill on its own
Its frontmatter has no description. Without a description, Claude Code leaves it out of the list Claude chooses from. Typing /harness-claude:react-hooks-pattern still runs it.
What the skill costs in Claude's context, stage by stage
No description Claude Code can read, so Claude's list leaves it out: only you can start it.
SKILL.md joins the conversation and stays.
Reuse stateful logic across components via custom hooks
use (e.g., useWindowSize, useFetch, useForm).useState, useEffect, useCallback, etc.).useMediaQuery not useEventListener).useEffect.hooks/ directory.// Good: descriptive name, typed return, minimal surface area
function useWindowSize(): { width: number; height: number } {
const [size, setSize] = useState({ width: window.innerWidth, height: window.innerHeight });
useEffect(() => {
const handler = () => setSize({ width: window.innerWidth, height: window.innerHeight });
window.addEventListener('resize', handler);
return () => window.removeEventListener('resize', handler);
}, []);
return size;
}
Custom hooks were introduced in React 16.8 to solve the code reuse problem that previously required higher-order components or render props. The key insight: hooks are just functions, and the use prefix is a convention that enables lint rules (react-hooks/rules-of-hooks) to enforce hook semantics.
Trade-offs:
use naming convention is enforced by ESLint, not the runtime — calling a hook outside a component or another hook will cause runtime errors, not type errorsuse prefix conventionWhen NOT to use:
Related patterns:
useXxx() wrapperhttps://patterns.dev/react/hooks-pattern
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub intense-visions/harness-engineering --plugin harness-claudeRead when SKILL.md points to them.
793 skills in this plugin
/a11y-aria-patternsARIA Patterns> Apply ARIA roles, states, and properties correctly to enhance assistive technology support for custom widgets/a11y-color-contrastColor Contrast and Color Independence> Ensure sufficient color contrast ratios and never use color as the sole means of conveying information/a11y-form-patternsAccessible Form Patterns> Build accessible forms with proper labeling, grouped controls, inline validation, and clear error communicationOther plugins' skills for the same job