ReactUse is a TypeScript library of reusable React Hooks for browser APIs, state, sensors, animations, and DOM interactions. React developers use it when building React applications that need these common behaviors. The catalogue skills and commands help coding agents discover or work with ReactUse hooks.
Borrowing it
Nothing to install: this file belongs to childrentime/reactuse. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/childrentime/reactuse/main/.claude/skills/new-hook/SKILL.mdgit clone --depth 1 https://github.com/childrentime/reactuseWrote 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.
[](https://agentmods.dev/skills/childrentime/reactuse/new-hook)<a href="https://agentmods.dev/skills/childrentime/reactuse/new-hook"><img src="https://agentmods.dev/badge/skills/childrentime/reactuse/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.
<a href="https://agentmods.dev/skills/childrentime/reactuse/new-hook"><img src="https://agentmods.dev/badge/skills/childrentime/reactuse/new-hook.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00082 | $0.01137 |
| Opus 5.5 | $0.00033 | $0.00455 |
| Sonnet 5.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 2mo 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.
- 2mo 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,068 stars, last pushed 8d ago), licensed Unlicense. It adds 82 tokens to every session and 1,137 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.
new-hook compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| new-hookchildrentime/reactuse | Skill | 1.1k | 8d ago | Unlicense | A | 82 | Claude Code |
| prism-componenttonone-ai/tonone | Skill | 77 | 23d ago | MIT | A | 43 | Claude Code |
| juniors-best-practicesiberiacancode/agent-skills | Skill | 23 | 27d ago | MIT | A | 55 | Claude Code, Codex |
| react-hooks-best-practicessiberiacancode/agent-skills | Skill | 23 | 27d ago | MIT | A | 71 | Claude Code, Codex |
| reactusesiberiacancode/agent-skills | Skill | 23 | 27d ago | MIT | A | 50 | Claude Code, Codex |
| testing-best-practicessiberiacancode/agent-skills | Skill | 23 | 27d ago | MIT | A | 47 | Claude Code, Codex |
| fluencyloopbaokhang83/fluencyloop | Skill | 47 | 2mo ago | Apache-2.0 | A | 98 | Claude Code |