New hook
Scaffold a new custom React hook with a Vitest test file. Use this skill whenever the user asks to "create a hook", "make a useFoo hook", "scaffold a custom React hook", "add a hook under app/hooks", or describes a piece of reusable React state/effect logic that warrants extraction into a named `use*` hook.From its SKILL.md
npx -y skills add gaia-react/gaia --skill new-hookAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 21 stars21 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
- runs commandsInstructs the agent to run 2 commands, including `.gaia/cli/gaia scaffold hook <useFoo> [--params "a:string,b:number"] [--returns "ReturnType"]` and 1 more.
SKILL.md
0.6 KB, 82 tokens by cl100k_base, as published. Nobody here has run it
new-hook
Trigger: user asks to create a custom React hook.
Workflow
- Confirm: name (use*), params, return type.
- Run:
.gaia/cli/gaia scaffold hook <useFoo> [--params "a:string,b:number"] [--returns "ReturnType"]. - Verify:
pnpm typecheckclean. Open and sanity-check.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.