reactuse: Skill for Claude Code

.claude/skills/hook-docs/SKILL.md

hook-docs is a skill for Claude Code from childrentime/reactuse. It costs 75 tokens per session (873 once invoked), scanned A, original, Unlicense.

A documentation guide for React hooks in the ReactUse website. It covers Markdown files with embedded components in three languages and explains how the site's pages and navigation are generated.

In plain words
What is it for?
Use it to document a hook, add English and Chinese pages, create live examples, and regenerate the list of documented hooks.
Why use it?
It helps documentation follow the website's required structure and keeps the hook registry up to date.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is childrentime/reactuse's own configuration. It tells Claude Code how to work on reactuse itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything reactuse configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is bash scripts/generate-hook-registry.sh.

About the project

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.

childrentime/reactuse · 1,068 stars · on GitHub · reactuse.com

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/childrentime/reactuse/main/.claude/skills/hook-docs/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/childrentime/reactuse

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 hook-docs

README.md
[![agentmods](https://agentmods.dev/badge/skills/childrentime/reactuse/hook-docs/github.svg)](https://agentmods.dev/skills/childrentime/reactuse/hook-docs)
Your own site
<a href="https://agentmods.dev/skills/childrentime/reactuse/hook-docs"><img src="https://agentmods.dev/badge/skills/childrentime/reactuse/hook-docs/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 hook-docs

Your own site · 80×15
<a href="https://agentmods.dev/skills/childrentime/reactuse/hook-docs"><img src="https://agentmods.dev/badge/skills/childrentime/reactuse/hook-docs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 75 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 873 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00075 $0.00873
Opus 5.5 $0.00030 $0.00349
Sonnet 5.5 $0.00015 $0.00175
Haiku 4.5 $0.00007 $0.00087

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

Security

Grade A, and why

hook-docs 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.

.claude/skills/hook-docs/SKILL.md · 101 lines

How it starts

The opening of the file, as written. The whole thing — 101 lines — stays where its author put it; the contents beside it link to each section on GitHub.

hook-docs — document a hook the ReactUse way

Docs live in the Astro site packages/website-astro. The sidebar and routes are built automatically from file paths — there is no routes.json or sidebar config to edit.

File locations (one per locale)

packages/website-astro/src/content/docs/{category}/useX.mdx          # English
packages/website-astro/src/content/docs-zh-hans/{category}/useX.mdx  # 简体中文
packages/website-astro/src/content/docs-zh-hant/{category}/useX.mdx  # 繁體中文

{category} is one of: browser, effect, element, state, integrations. The folder you choose is the category — it sets the registry entry and the canonical URL (https://reactuse.com/{category}/usex/, lowercase).

Frontmatter

Schema is in packages/website-astro/src/content.config.ts — only title is required; description, sidebar_label, sidebar_position are optional. Match the existing style:

---
title: useX – State Hook Usage & Examples
sidebar_label: useX
description: "useX is a React hook that … (one sentence, used as the meta description)."
---

Body structure

Follow the established shape (see content/docs/browser/useClipboard.mdx):

# useX

One-line summary of what it does.

A short paragraph explaining the hook, linking to the relevant MDN/spec page where useful.

### When to Use

- bullet of a concrete use case
- another

### Notes

- SSR safety / browser-support caveats
- any gotchas

## Usage

```tsx live
function Demo() {
  const [value, set] = useX(0);
  return <button onClick={() => set(value + 1)}>{value}</button>;
};

%%API%%


- The ` ```tsx live ` fence renders a live, editable demo. Write the demo **inline** — it is
  not imported from the hook's source.
- Keep `%%API%%` as the last line. It's replaced at build time with the generated API table
  (from the hook's `interface.ts` JSDoc); if no API doc exists yet it's silently removed.

## Translations

The zh-Hans / zh-Hant files mirror the English structure exactly — translate the prose and
the frontmatter `title`/`description`, keep the code demo identical.

Read the full file on GitHub · 101 lines

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. 2mo ago First seen · 101 lines · 75 tokens per session scan A e296d74be2fe

Subscribe to this mod's changes

hook-docs is a skill published in the GitHub repository childrentime/reactuse (1,068 stars, last pushed 8d ago), licensed Unlicense. It adds 75 tokens to every session and 873 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

hook-docs compared with skills from other repositories

hook-docs next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
hook-docschildrentime/reactuseSkill1.1k8d agoUnlicenseA75Claude Code
prism-componenttonone-ai/tononeSkill7723d agoMITA43Claude Code
juniors-best-practicesiberiacancode/agent-skillsSkill2327d agoMITA55Claude Code, Codex
react-hooks-best-practicessiberiacancode/agent-skillsSkill2327d agoMITA71Claude Code, Codex
reactusesiberiacancode/agent-skillsSkill2327d agoMITA50Claude Code, Codex
testing-best-practicessiberiacancode/agent-skillsSkill2327d agoMITA47Claude Code, Codex
fluencyloopbaokhang83/fluencyloopSkill472mo agoApache-2.0A98Claude Code