ワンクリックで
react-hooks
Resolves React hook violations (rules of hooks, useEffect dependencies, hook ordering).
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Resolves React hook violations (rules of hooks, useEffect dependencies, hook ordering).
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Standardized patterns for Git branching, worktrees, and lifecycle management.
Expertise in mobile responsiveness, specifically table patterns and standard UI component styling.
Security & Authentication Specialist - Expert in JWT, cookie-based auth, MFA, and generic security patterns
Systematic multi-perspective code review with consistent quality gates.
Systematic debugging with structured reproduction and root cause analysis.
Database, auth, and backend expertise for Supabase operations in [PROJECT_NAME]
| name | react-hooks |
| description | Resolves React hook violations (rules of hooks, useEffect dependencies, hook ordering). |
Handles common React hook patterns and violations across the codebase.
// WRONG - return before hooks
if (!isAuthenticated) {
return <Login />; // ❌ Hook call below is unreachable sometimes
}
const user = useUser(); // VIOLATION
// RIGHT - hooks always execute
const user = useUser();
if (!isAuthenticated) {
return <Login />;
}
// WRONG - missing dependency
const context = useContext(MyContext);
useEffect(() => {
doSomething(context);
}, []); // ❌ Missing `context`
// RIGHT - include all dependencies
useEffect(() => {
doSomething(context);
}, [context]);
// WRONG - context object changes on every render
const Provider = ({ children }) => {
const value = { user: currentUser }; // New object every render
return (
<MyContext.Provider value={value}> // ❌ Causes infinite loop
{children}
</MyContext.Provider>
);
};
// RIGHT - memoize context value
const Provider = ({ children }) => {
const value = useMemo(() => ({ user: currentUser }), [currentUser]);
return (
<MyContext.Provider value={value}>
{children}
</MyContext.Provider>
);
};
./scripts/log-skill.sh react-hooks