new-hook

new-hook is a skill for Claude Code, Codex from gaia-react/gaia. It costs 76 tokens per session (171 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 CodeCodex

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.

agentmods
npx agentmods add skills/gaia-react/gaia/new-hook
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, Codex.

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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 76 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 171 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00076 $0.00171
Opus 5 $0.00038 $0.00086
Sonnet 5 $0.00015 $0.00034
Haiku 4.5 $0.00008 $0.00017

Measured 4d ago against content hash 29b89e80396e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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.

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

What it actually says

new-hook

Trigger: user asks to create a custom React hook.

Workflow

  1. Confirm: name (use*), params, return type.
  2. Run: .gaia/cli/gaia scaffold hook <useFoo> [--params "a:string,b:number"] [--returns "ReturnType"].
  3. Verify: pnpm typecheck clean. Open and sanity-check.
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. 4d 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 (23 stars, last pushed today), licensed MIT. It adds 76 tokens to every session and 171 once invoked, about $0.0004 per session on Opus 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

Other skills, from other repositories

livecodes/framework-wrappers

Use SDK with React, Vue, Svelte, Solid, Preact, and Web Components. sdkReady callback pattern, reactive props, and framework-specific setup. Load this skill when embedding LiveCodes in a framework application.

live-codes/livecodes · 51 tokens

writing-react-native-storybook-stories

Create and edit React Native Storybook stories using Component Story Format (CSF). Use when writing .stories.tsx files, adding stories to React Native components, configuring Storybook addons (controls, actions, backgrounds, notes), setting up argTypes, decorators, parameters, or working with portable stories for…

storybookjs/react-native · 83 tokens

setup-react-native-storybook

Set up Storybook for React Native in Expo, React Native CLI, or Re.Pack projects. Use when adding Storybook to a project, configuring metro.config.js with withStorybook, creating .rnstorybook configuration files, setting up Storybook routes in Expo Router, configuring getStorybookUI, or adding the StorybookPlugin to a…

storybookjs/react-native · 102 tokens

upgrading-react-native-storybook

Incrementally upgrade React Native Storybook across the supported migration paths. Use when upgrading @storybook/react-native projects from 5.3.x to 6.5.x, 6.5.x to 7.6.x, 7.6.x to 8.3.x, 8.x to 9.x, or 9.x to 10.x. Detect the currently installed Storybook version, choose only the next migration step, update…

storybookjs/react-native · 151 tokens

webflow-to-react

Converts a Webflow HTML export into a maintainable React app with TanStack Start (SSR, TanStack Router conventions) using an idiomatic React-first approach. Sets up Storybook early, builds UI primitive + page-section SOT components with variant stories before composing routes. Use when the user has a Webflow export…

dmenchaca/webflow-to-react · 258 tokens

vercel-react-best-practices

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance…

bartstc/vite-ts-react-template · 67 tokens