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.
npx agentmods add skills/childrentime/reactuse/new-hooknpx skills add childrentime/reactuse --skill new-hookgit clone --depth 1 https://github.com/childrentime/reactuseWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00082 | $0.01137 |
| Opus 5 | $0.00041 | $0.00568 |
| Sonnet 5 | $0.00016 | $0.00227 |
| Haiku 4.5 | $0.00008 | $0.00114 |
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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 110 lines — stays where its author put it; the contents beside it link to each section on GitHub.
new-hook — scaffold a hook the ReactUse way
Use this when adding a new hook to @reactuses/core. It encodes how hooks are actually
built in this repo today. Pair it with hook-test and hook-docs afterward.
There is no scaffolding script — hooks are created by hand. Follow the steps below.
Step 0 — Understand before writing (don't skip)
- Confirm the hook doesn't already exist:
ls packages/core/src/useX. - Read 1-2 similar existing hooks end to end (not just their names) to match style —
e.g. a state hook like
useCounter, a browser hook likeuseClipboard, an element hook likeuseEventListener. Note their return shape and which utils they reuse. - Check the knowledge base reuse cheat-sheet — much of what you
need (
useLatest,useUnmount,useEventListener,defaultWindow,isBrowser) is already written. Reuse before writing.
Step 1 — Create the hook folder
packages/core/src/useX/ with two (then three) files:
index.ts— the implementation, named exportexport const useX: UseX = ….interface.ts— the public typeUseXwith multilingual JSDoc.index.spec.ts— tests (hand off to the hook-test skill).
interface.ts template
Types live here (not inline), so the API-doc generator can read them. JSDoc is trilingual:
/**
* @title useX
* @returns_en What the hook returns, described for docs.
* @returns 返回值说明(简体)。
* @returns_zh-Hant 返回值說明(繁體)。
*/
export type UseX = (
/**
* @en The first argument, described.
* @zh 第一个参数说明。
* @zh-Hant 第一個參數說明。
* @defaultValue 0
*/
initial?: number,
) => readonly [number, (n: number) => void]
(See packages/core/src/useCounter/interface.ts for a full real example.)
index.ts template
import { useState, useCallback } from 'react'
import { isDev, isFunction } from '../utils/is'
import type { UseX } from './interface'
export const useX: UseX = (initial = 0) => {
if (isDev && initial != null && !isFunction(initial) && typeof initial !== 'number') {
console.error(`useX: \`initial\` expected number, got "${typeof initial}".`)
}
const [value, setValue] = useState(initial)
const set = useCallback((n: number) => setValue(n), [])
return [value, set] as const
}
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.
- 2d ago First seen · 110 lines · 82 tokens per session scan A 35ddc8e59129
new-hook is a skill published in the GitHub repository childrentime/reactuse (1,048 stars, last pushed 12d ago), licensed Unlicense. It adds 82 tokens to every session and 1,137 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.
Other skills, from other repositories
fluencyloop
FluencyLoop — stay fluent in code as AI writes it. Router/overview for the per-feature loop (design → build+teach → review), the optional up-front planning stage for large chunks, the woven-in constitution that grows from decisions, plus post-merge backfill. Use when the user mentions FluencyLoop, "fluency", the…
react-hooks-composition
Advanced React hooks composition patterns - SWR integration, debounced search, memoized contexts, state machines, and performance optimization.
migrate-radix-to-base
Migrates React projects and components from Radix UI to Base UI. Use when asked to migrate from radix, move to base-ui, convert radix primitives, or switch a shadcn project's base library. Handles single components ("migrate accordion") and whole projects.
flags
How to add or modify Next.js experimental feature flags end-to-end. Use when editing config-shared.ts, config-schema.ts, define-env-plugin.ts, next-server.ts, export/worker.ts, or module.compiled.js. Covers type declaration, zod schema, build-time injection, runtime env plumbing, and the decision between runtime…
openspec-update-change
Update an OpenSpec change by revising its existing planning artifacts and keeping them coherent with one another. Use when the user wants to revise a change's plan, fold new decisions into it, or reconcile its artifacts after an edit. Never edits code.
openspec-verify-change
Verify implementation matches change artifacts. Use when the user wants to validate that implementation is complete, correct, and coherent before archiving.