Claude Code Skills·Claude Skills·The open SKILL.md registry for Claude
ClaudSkills / Product / ux-research

Ref Patterns

Category: Product  ·  Sub-category: ux-research  ·  Last updated:
type:reviewtype:integration
Use when designing or reviewing React ref usage: refs vs state (mutable handle vs reactive value), `useRef` for DOM access and mutable instance values, ref callbacks, `forwardRef` for passing refs through boundaries (and the React 19 ref-as-prop change), `useImperativeHandle` for controlled imperative surfaces, ref forwarding through compound-component primitives (Radix Slot / Headless UI), and the rule that refs are an escape hatch for DOM access, non-React library integration, focus management, animation, and imperative APIs — never a substitute for state. Do NOT use for hook discipline (use hooks-patterns), component layering (use component-architecture), state ownership (use state-management), client/server boundary (use client-server-boundary), or form-state patterns (use form-ux-architecture).

What this skill does

Ref Patterns is a community-contributed Claude Code skill in the ux-research sub-category. It ships as a SKILL.md file that Claude Code auto-discovers under ~/.claude/skills/ref-patterns/ and loads when your prompt matches the skill's trigger.

When to invoke it: Use when designing or reviewing React ref usage: refs vs state (mutable handle vs reactive value), `useRef` for DOM access and mutable instance values, ref callbacks, `forwardRef` for passing refs through boundaries (and the React 19 ref-as-prop change), `useImperativeHandle` for controlled imperative surfaces, ref forwarding through compound-component primitives (Radix Slot / Headless UI), and the rule that refs are an escape hatch for DOM access, non-React library integration, focus management, animation, and imperative APIs — never a substitute for state. Do NOT use for hook discipline (use hooks-patterns), component layering (use component-architecture), state ownership (use state-management), client/server boundary (use client-server-boundary), or form-state patterns (use form-ux-architecture).

Who uses this skill

The Ref Patterns Claude Code skill is built for product managers, product designers, and cross-functional teams planning, shipping, and measuring product features. It's part of ClaudSkills (also referred to as Claude Skills or Claude Code Skills) — the open community-curated registry of 69,000+ SKILL.md files for Anthropic's Claude Code agent and the wider Claude ecosystem (Claude API, Claude Agent SDK).

How to install

Free

Manual install (2 steps)

mkdir -p ~/.claude/skills/ref-patterns
curl -L https://claudskills.com/skills/ref-patterns/SKILL.md \
  -o ~/.claude/skills/ref-patterns/SKILL.md

Or just download SKILL.md directly and drop it into ~/.claude/skills/ref-patterns/. Claude Code auto-discovers it on next session.

Skills live at ~/.claude/skills/ref-patterns/SKILL.md on macOS/Linux, or %USERPROFILE%\.claude\skills\ref-patterns\SKILL.md on Windows. See the full install guide for step-by-step instructions.

Pro

One-click install via the desktop app

The ClaudSkills desktop app installs any skill directly into ~/.claude/skills/ with one click — no terminal required. Pro starts at $9/mo or $149 lifetime.

Pro

For the full experience including quality scoring and one-click install features for each skill — upgrade to Pro.

Attribution & license

More Product skills

Browse all Product skills in the ClaudSkills registry, or explore these other picks from the same category:

Browse all Product skills → Top 100 skills
Part of ClaudSkills — the open registry for Claude Skills & Claude Code Skills.  ·  What's New  ·  Install guide  ·  About  ·  llms.txt

Part of Acreator Store — Adam Lankamer's AI tools: PerfectStudio · Ucaption · UTagger · AutoXPoster · TestYourSkills · AutomationFlows · Au Naturel