reactuse
CLAUDE.md1.1k starsChanged 5 months agoUnlicenseView on GitHub
ReactUse is a collection of React hooks (@reactuses/core). The website is built with Astro (packages/website-astro). packages/website-astro/api/{hook}-README{,-zhHans,-zhHant}.md are generated from each hook's interface.ts by pnpm --filter @reactuses/core gend. The Astro site splices them into every doc page at the %%API%% marker (src/plugins/remark-api-inject.mjs), and packages/mcp reads them too. If you change an interface.ts, re-run gend and commit the result. The remark plugin drops the marker silently when a file is missing or stale, so the published API table just keeps showing the…
- Reads credentials
- Installs packages
- Sends data out
Adopted by
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Who's talking about childrentime/reactuse
- belentani7/ManosAbiertas“build(deps): bump the dev-dependencies group across 1 directory with 7 updates”GitHub · Nov 5, 2026
- belentani7/Belentani.cv-ai“fix(deps): bump the dev-dependencies group across 1 directory with 40 updates”GitHub · Nov 5, 2026
- younestsouli2019-bot/swarm-ops-project“build(deps): bump the minor-and-patch group with 45 updates”GitHub · Nov 5, 2026
- eemtijca/ludus“deps: bump the npm group with 2 updates”GitHub · Nov 2, 2026
- allocsys/news-market-ai“build(deps): bump the dashboard-minor-patch group across 1 directory with 8 updates”GitHub · Nov 2, 2026
The biggest 5 of 50 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 50
Talked about on GitHub (50 times).
On GitHub · 50
- Nov 5, 2026build(deps): bump the dev-dependencies group across 1 directory with 7 updates — belentani7/ManosAbiertas0 reactions
- Nov 5, 2026fix(deps): bump the dev-dependencies group across 1 directory with 40 updates — belentani7/Belentani.cv-ai0 reactions · 1 comment
- Nov 5, 2026build(deps): bump the minor-and-patch group with 45 updates — younestsouli2019-bot/swarm-ops-project0 reactions
- Nov 2, 2026deps: bump the npm group with 2 updates — eemtijca/ludus0 reactions · 1 comment
- Nov 2, 2026build(deps): bump the dashboard-minor-patch group across 1 directory with 8 updates — allocsys/news-market-ai0 reactions
45 more on GitHub
- Nov 2, 2026chore(deps): bump @reactuses/core from 6.3.1 to 6.6.1 — Ggboykxz/APEX0 reactions · 6 comments
- Nov 2, 2026build(deps): bump the dev-dependencies group across 1 directory with 6 updates — belentani7/ManosAbiertas0 reactions · 1 comment
- Nov 1, 2026Bump the web-demo-non-breaking group across 1 directory with 13 updates — akshay-mp/agent-timetravel0 reactions
- Nov 1, 2026deps: bump the npm group with 12 updates — eemtijca/caderno-aberto0 reactions
- Nov 1, 2026Bump the web-demo-non-breaking group across 1 directory with 13 updates — Raswanth01/agent-timetravel0 reactions
- Oct 27, 2026Bump @reactuses/core from 6.1.9 to 6.6.0 — 01BilalAhmad/distriflow0 reactions · 2 comments
- Oct 26, 2026build(deps): bump the dev-dependencies group across 1 directory with 43 updates — belentani7/ManosAbiertas0 reactions · 1 comment
- Oct 26, 2026deps: bump the npm group across 1 directory with 41 updates — eemtijca/ludus0 reactions · 3 comments
- Oct 26, 2026fix(deps): bump the dev-dependencies group across 1 directory with 39 updates — belentani7/Belentani.cv-ai0 reactions · 2 comments
- Oct 26, 2026build(deps): bump the dev-dependencies group across 1 directory with 37 updates — belentani7/ManosAbiertas0 reactions · 1 comment
- Oct 25, 2026fix(deps): bump the dev-dependencies group across 1 directory with 40 updates — belentani7/Belentani.cv-ai0 reactions · 3 comments
- Oct 25, 2026fix(deps): bump the dev-dependencies group across 1 directory with 39 updates — belentani7/Belentani.cv-ai0 reactions · 2 comments
- Oct 25, 2026deps: bump the npm group with 17 updates — eemtijca/caderno-aberto0 reactions
- Oct 24, 2026deps: bump @reactuses/core from 6.5.9 to 6.6.0 — simondalmasso/stracker0 reactions · 1 comment
- Oct 19, 2026deps: bump the npm group across 1 directory with 39 updates — eemtijca/ludus0 reactions · 2 comments
- Oct 19, 2026chore(deps): bump @reactuses/core from 6.5.9 to 6.6.0 — kanishka-namdeo/Unown0 reactions · 3 comments
- Oct 7, 2026build(deps): bump the npm-dependencies group across 1 directory with 37 updates — lagtastic-legends/zenodeck0 reactions · 4 comments
- Oct 1, 2026chore(deps): bump the npm group across 1 directory with 10 updates — eemtijca/ludus0 reactions · 2 comments
- Sep 30, 2026build(deps): bump the npm-dependencies group across 1 directory with 35 updates — lagtastic-legends/zenodeck0 reactions · 4 comments
- Sep 28, 2026chore(deps): bump the npm group with 9 updates — eemtijca/ludus0 reactions · 3 comments
- Sep 26, 2026build(deps): bump the production-dependencies group across 1 directory with 18 updates — prashantchataut/Nagarik-Watch0 reactions · 5 comments
- Sep 26, 2026build(deps): bump the production-dependencies group with 15 updates — prashantchataut/Nagarik-Watch0 reactions · 6 comments
- Sep 21, 2026deps(npm)(deps): bump the npm-production group across 1 directory with 45 updates — MANOFHATERS/autonomous-drug-repurposing0 reactions · 1 comment
- Sep 20, 2026chore(deps): bump the npm group with 10 updates — eemtijca/caderno-aberto0 reactions · 1 comment
- Sep 12, 2026build(deps): bump @reactuses/core from 6.5.5 to 6.5.6 — eemtijca/caderno-aberto0 reactions
- Sep 1, 2026chore(deps)(deps): bump @reactuses/core from 6.3.3 to 6.5.5 — Shri2242/Myntra-Ai-Review-discovery-Engine0 reactions · 2 comments
- Aug 24, 2026build(deps): bump @reactuses/core from 6.4.2 to 6.5.5 — qayyums3116/riphah_international_college0 reactions
- Aug 10, 2026Bump @reactuses/core from 6.4.0 to 6.5.0 — Mr-Python-in-China/cnoi-statement-generator0 reactions · 1 comment
- Aug 10, 2026deps(npm)(deps): bump the npm-production group across 1 directory with 34 updates — MANOFHATERS/autonomous-drug-repurposing0 reactions · 2 comments
- Jul 31, 2026chore(deps): bump @reactuses/core from 6.3.1 to 6.4.0 — LorenzaVolponi/giria-ai0 reactions · 1 comment
- Jul 11, 2026chore(deps): bump the frontend-group group across 1 directory with 32 updates — joneid-org/kalneslopene0 reactions · 1 comment
- Jul 5, 2026chore(deps): bump the frontend-group group across 1 directory with 31 updates — joneid-org/kalneslopene0 reactions · 1 comment
- Jul 4, 2026chore(deps): bump the frontend-group group across 1 directory with 32 updates — joneid-org/kalneslopene0 reactions · 1 comment
- Jul 1, 2026build(deps): bump @reactuses/core from 6.1.9 to 6.4.0 — kalelooz/planglade0 reactions · 4 comments
- Jun 29, 2026Bump @reactuses/core from 6.3.2 to 6.4.0 — Mr-Python-in-China/cnoi-statement-generator0 reactions · 1 comment
- Jun 29, 2026chore(deps)(deps): bump @reactuses/core from 6.3.3 to 6.4.0 — Shri2242/Ai-Review-Discovery-Engine0 reactions · 3 comments
- Jun 15, 2026deps(deps): bump the production-dependencies group across 1 directory with 59 updates — mohamedblueprintrak-design/BluePrint0 reactions · 4 comments
- Jun 1, 2026npm: bump the minor-updates group across 1 directory with 26 updates — nkpendyam/Kyro_IDE0 reactions · 1 comment
- May 26, 2026Bump the production-dependencies group across 1 directory with 44 updates — abduvali-web/ok0 reactions · 1 comment
- May 25, 2026chore(deps): bump @reactuses/core from 6.3.1 to 6.3.2 — Ggboykxz/APEX0 reactions · 4 comments
- May 22, 2026Bump @reactuses/core from 6.3.1 to 6.3.2 in /frontend — rawatharish27-commits/bookmyservice0 reactions · 2 comments
- May 18, 2026Bump @reactuses/core from 6.1.11 to 6.3.1 — Mr-Python-in-China/cnoi-statement-generator0 reactions · 1 comment
- May 8, 2026[Server Submission]: ReactUse MCP — 110+ React Hooks Discovery — cline/mcp-marketplace0 reactions
- May 8, 2026Add childrentime/reactuse MCP server 🤖🤖🤖 — punkpeye/awesome-mcp-servers0 reactions · 4 comments
- May 8, 2026Add ReactUse — 110+ React Hooks library — lukasmasuch/best-of-react0 reactions
In this repository8 other files it gives its agents.
- hook-docsSkill
- hook-testSkill
- new-hookSkill
- ping-indexnowSkill
- pr-descriptionSkill
- publish-hashnodeSkill
- publish-juejinSkill
- publish-mediumSkill
The file
Show its rules and text
We split this CLAUDE.md into the rules it gives an agent
13 rules. About 0 are common, 4 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 33
Understand first: Read the real source of the files you'll touch — and at least one similar existing hook — before writing.
- Very specific: line 92
Target a keyword you're already near page 1 on: Before writing, run python3 scripts/gsc-report.py 90 and pick a "临门一脚" query (rank 4–15, …
- Very specific: line 110
When linking to hook documentation in blog posts, always use the hook registry at scripts/hook-registry.json as the source of truth for …
- Very specific: line 113
Only link to hooks that exist in hook-registry.json.
- Very specific: line 114
Use the url field from the registry verbatim — it is already lowercase (https://reactuse.com/{category}/{hookname}/, no /docs/ or /hooks/ …
- Distinctive: line 119
After writing or editing a blog post, you must verify all hook links:
- Distinctive: line 123
If a hook does not exist in the registry, either remove the link or replace it with an existing hook.
- Distinctive: line 124
Run this verification for all locale versions (en, zh-Hans, zh-Hant) of the post.
- Very specific: line 143
After writing blog posts (3 locales in packages/website-astro/src/content/), always:
- Very specific: line 145
Create blog-external/post-N-{slug}/ with medium.md, devto.md, juejin.md
- Very specific: line 154
Medium: Use the publish-medium skill (opencli — pandoc converts the body to HTML, then a synthetic paste event injects it.
- Very specific: line 158
Hashnode: Use the publish-hashnode skill (opencli browser automation).
- Very specific: line 159
Juejin (掘金): Use the publish-juejin skill (opencli — ByteMD/CodeMirror editor takes markdown directly).
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
ReactUse - Project Guidelines
Project Overview
ReactUse is a collection of React hooks (@reactuses/core). The website is built with Astro (packages/website-astro).
Development
pnpm install # install dependencies
pnpm lint # eslint
pnpm test # jest, via @reactuses/coreGenerated API docs
packages/website-astro/api/{hook}-README{,-zhHans,-zhHant}.md are generated from each
hook's interface.ts by pnpm --filter @reactuses/core gend. The Astro site splices them
into every doc page at the %%API%% marker (src/plugins/remark-api-inject.mjs), and
packages/mcp reads them too.
If you change an interface.ts, re-run gend and commit the result. The remark plugin
drops the marker silently when a file is missing or stale, so the published API table just
keeps showing the old signature with no build error.
AI Agent System (.claude/)
This repo carries a small, Chromium-inspired AI agent system under .claude/ — sized for a
hooks library, not a 35M-line codebase. Map: .claude/README.md.
Engineering workflow (apply to any hook/code task):
- Understand first. Read the real source of the files you'll touch — and at least one similar existing hook — before writing. Don't infer behavior from names.
- Build, reusing what exists. This codebase has a shared util layer and strong conventions; reuse before writing. Browser APIs must be SSR-safe.
- Test. Jest, co-located
index.spec.ts(pnpm --filter @reactuses/core test <name>). - Verify.
pnpm lint+ tests green. Stay on task — no unrelated drive-by edits.
Where to look:
.claude/knowledge-base.md— task → file/utility router. Start here; it tells you which existing code already solves your task..claude/ai-policy.md— you own every line you ship; understand it before review.- Skills (auto-activate):
new-hook,hook-test,hook-docs,pr-description. - Commands:
/new-hook,/pre-pr,/pr-desc.
Secrets (.env, gitignored)
.env holds API tokens — never commit (it is gitignored):
DEVTO_API_KEY— dev.to publishingHASHNODE_PAT/HASHNODE_PUBLICATION_ID/HASHNODE_PUBLICATION_HOST— Hashnode publishingNETLIFY_AUTH_TOKEN— Netlify account PAT (DNS + site API). reactuse.com DNS is Netlify-managed (DNS zone under accountchildrentime). Use this token againsthttps://api.netlify.com/api/v1/dns_zonesto manage records — e.g. thegoogle-site-verificationTXT that verifies thesc-domain:reactuse.comGSC property (a domain property can only be verified by DNS TXT, not the<meta>tag inBaseLayout.astro).
SEO / 搜索数据分析
用 Google Search Console 数据做优化分析:python3 scripts/gsc-report.py [天数]。
输出概览、趋势、Top 关键词/页面,以及「临门一脚关键词」「高曝光低点击页面」两类优化机会。
配置、用法、优化打法见 GSC.md。
Website URL Structure
Hook documentation pages follow the pattern: https://reactuse.com/{category}/{hookname}/
Categories: browser, effect, element, state, integrations
There is NO /docs/ or /hooks/ prefix. The URL is derived from the file path under packages/website-astro/src/content/docs/.
URLs are all lowercase. The file is useGeolocation.mdx but the canonical URL is https://reactuse.com/browser/usegeolocation/ (lowercase). Never link to the camelCase form — it creates duplicate pages in Google's index. A Netlify edge function 301-redirects any camelCase path to lowercase as a safety net, but links should be lowercase at the source.
Blog Post Guidelines
Writing blog posts
- Blog posts live in
packages/website-astro/src/content/blog/(English), with translations inblog-zh-hans/andblog-zh-hant/.
Writing blog post titles (SEO — for NEW posts only)
Why this exists (2026-06 growth analysis): blog posts pull huge search impressions but near-zero CTR because they rank #9–17 with weak titles — e.g.
react-hooks-vs-vue-composableshad 13.8k impressions but 0.2% CTR. Meanwhile hook doc pages that matchuseXqueries convert at 9–44% CTR, and the developers who actually star the repo are English-speaking / international (only ~7% China). The funnel to GitHub stars is: English search → reactuse.com → star. Do NOT rewrite old posts — apply this only to new ones.
Title rules, in priority order:
- Lead with the concrete searched term — a specific hook name or exact phrase
(
useDebounce,useLocalStorage,useIntersectionObserver) in the first ~60 chars. Vague/clever titles earn impressions but no clicks. - Target a keyword you're already near page 1 on. Before writing, run
python3 scripts/gsc-report.py 90and pick a "临门一脚" query (rank 4–15, impressions ≥50); write the post to own it. A great post ranking #9 on a brand-new keyword wins nothing. - Match search intent, not cleverness — use real query shapes:
How to …,… in React,X vs Y, a year (2026),… with TypeScript. - One post = one primary keyword. The page must read as the answer to that one query.
- Add a click-earning differentiator — specificity / the problem solved
(e.g.
…(SSR-safe, TypeScript)). - Write English-first. zh-Hans / zh-Hant are translations; English is the star driver.
Examples:
- ✅
React useDebounce Hook: Debounce State & Callbacks (2026) - ✅
useLocalStorage in React: SSR-Safe Persistent State - ❌
React Hooks vs Vue Composables(broad/abstract → 13.8k impressions, 0.2% CTR in reality) - ❌
Mastering Reactivity Patterns(no searchable keyword)
Hook links in blog posts
When linking to hook documentation in blog posts, always use the hook registry at scripts/hook-registry.json as the source of truth for correct URLs.
Rules:
- Only link to hooks that exist in
hook-registry.json. Never invent hook names or guess URLs. - Use the
urlfield from the registry verbatim — it is already lowercase (https://reactuse.com/{category}/{hookname}/, no/docs/or/hooks/prefix). Never hand-build a camelCase URL. - Each hook belongs to exactly one category. Do not guess categories — look them up.
Verification checklist (REQUIRED before committing blog posts)
After writing or editing a blog post, you must verify all hook links:
- Extract every
reactuse.comURL from the blog post. - For each URL, confirm the hook name and category exist in
scripts/hook-registry.json. - If a hook does not exist in the registry, either remove the link or replace it with an existing hook.
- Run this verification for all locale versions (en, zh-Hans, zh-Hant) of the post.
External Blog Publishing
Directory structure
External platform copies are stored in blog-external/ with sequential numbering. Note this
directory is gitignored — the copies are a local staging area, not repo content:
blog-external/
post-N-{slug}/
medium.md # English, no frontmatter (publish-medium skill — pandoc→HTML→paste)
devto.md # English, with dev.to frontmatter (published: false)
juejin.md # Chinese (simplified), no frontmatter (publish-juejin skill)Publishing workflow
After writing blog posts (3 locales in packages/website-astro/src/content/), always:
- Create
blog-external/post-N-{slug}/withmedium.md,devto.md,juejin.md - Push the blog to GitHub FIRST. The English cross-posts (Medium/Hashnode/dev.to)
carry a
canonical_urlpointing atreactuse.com/blog/<slug>/. Commit + push the post so Netlify deploys the original before cross-posting — otherwise the canonical points at a 404. (Juejin is a zh-Hans translation on a standalone site, so it's not canonical-bound, but keep the same push-then-publish order.) - Only publish the first post of each batch to all 4 platforms — all three browser platforms
go through
opencli(same aspublish-hashnode); the user just needs to be logged in to each in the opencli-controlled Chrome:- Medium: Use the
publish-mediumskill (opencli — pandoc converts the body to HTML, then a synthetic paste event injects it; Medium's editor doesn't parse raw markdown). Note: Medium's native editor has no canonical field, so this copy doesn't return SEO weight — it's reach only. - dev.to: POST via API using
DEVTO_API_KEYfrom.env(setpublished: falseas draft); requires aUser-Agentheader — Forem's edge rejects requests without one - Hashnode: Use the
publish-hashnodeskill (opencli browser automation). The old GraphQL script was deleted on 2026-05-18 after Hashnode moved the API to a paid + allow-list plan - Juejin (掘金): Use the
publish-juejinskill (opencli — ByteMD/CodeMirror editor takes markdown directly). Replaces the old "copy manually" step; there's still no public API
- Medium: Use the
- The remaining posts are saved in
blog-external/for future publishing
dev.to API
curl -s -X POST https://dev.to/api/articles \
-H "api-key: $DEVTO_API_KEY" \
-H "Content-Type: application/json" \
-H "User-Agent: reactuse-blog-publisher/1.0" \
-d '{"article": {"title": "...", "body_markdown": "...", "published": false, "tags": ["react","javascript","webdev","tutorial"], "canonical_url": "https://reactuse.com/blog/<slug>/"}}'API key is in .env as DEVTO_API_KEY. Without a User-Agent header, Forem's Varnish edge returns 403 with an empty body.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

