new-hook

new-hook is a skill for Claude Code from gaia-react/gaia. It costs 79 tokens per session (263 once invoked), scanned A, original, MIT.

A scaffold for a reusable React hook, which is a named piece of shared state or browser-effect logic, together with a Vitest test file.

In plain words
What is it for?
It is for creating a `use...` hook with specified parameters and return values, then checking the project with a type check.
Why use it?
It gives a consistent starting structure when repeated React logic should be extracted and tested.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

Good fit It is for creating a use... hook with specified parameters and return values, then checking the project with a type check.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/gaia-react/gaia/new-hook
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add gaia-react/gaia --skill new-hook
Clone the repo
git clone --depth 1 https://github.com/gaia-react/gaia

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for new-hook

README.md
[![agentmods](https://agentmods.dev/badge/skills/gaia-react/gaia/new-hook/github.svg)](https://agentmods.dev/skills/gaia-react/gaia/new-hook)
Your own site
<a href="https://agentmods.dev/skills/gaia-react/gaia/new-hook"><img src="https://agentmods.dev/badge/skills/gaia-react/gaia/new-hook/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for new-hook

Your own site · 80×15
<a href="https://agentmods.dev/skills/gaia-react/gaia/new-hook"><img src="https://agentmods.dev/badge/skills/gaia-react/gaia/new-hook.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 79 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 263 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00079 $0.00263
Opus 5.5 $0.00032 $0.00105
Sonnet 5.5 $0.00016 $0.00053
Haiku 4.5 $0.00008 $0.00026

Measured 1mo ago against content hash e1925f4e33e0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

new-hook scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

frontend/.claude/skills/new-hook/SKILL.md · 16 lines

What it actually says

new-hook

Workflow

  1. Confirm: name (use-kebab or useCamel), params, return type.
  2. Run from the repo root: ./.gaia/cli/gaia scaffold hook <useFoo> [--params "a:string,b:number"] [--returns "ReturnType"].
  3. Verify: pnpm typecheck clean. Open and sanity-check.

The scaffold writes app/hooks/use-<kebab>.ts (named export useCamel) and app/hooks/tests/use-<kebab>.test.ts, which renders the hook with async renderHook from vitest-browser-react and runs in the browser Vitest project (real Chromium; run pnpm install:browsers once). A bare stub declares a void return.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · -2 lines e1925f4e33e0
  2. 1mo ago Changed · +1 tokens per session 60de814a5020
  3. 1mo ago Changed · +2 tokens per session 7be2fd7cb482
  4. 1mo ago Changed · +2 lines 1e5ad6356c5c
  5. 1mo ago Changed 287cdfc18ada
  6. 3mo ago First seen · 16 lines · 76 tokens per session scan A 29b89e80396e

Subscribe to this mod's changes

new-hook is a skill published in the GitHub repository gaia-react/gaia (26 stars, last pushed 1mo ago), licensed MIT. It adds 79 tokens to every session and 263 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

new-hook compared with skills from other repositories

new-hook next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
new-hookgaia-react/gaiaSkill261mo agoMITA79Claude Code
writing-react-native-storybook-storiesstorybookjs/react-nativeSkill1.3ktodayMITA83Claude Code
setup-react-native-storybookstorybookjs/react-nativeSkill1.3ktodayMITA102Claude Code
upgrading-react-native-storybookstorybookjs/react-nativeSkill1.3ktodayMITA151Claude Code
typescript-advanced-typesbartstc/vite-ts-react-templateSkill1243d agoMITA57Claude Code, Codex
writing-specbartstc/vite-ts-react-templateSkill1243d agoMITA69Claude Code, Codex
e2e-testingbartstc/vite-ts-react-templateSkill1243d agoMITA49Claude Code