new-hook
Skill1.1k starsChanged 5 months agoUnlicenseView on GitHub
Scaffold a new React hook in @reactuses/core with the repo's real conventions (interface.ts + multilingual JSDoc, SSR-safe browser access, shared-util reuse, 3-part public export). Triggers on "add a hook", "new hook", "scaffold a hook", "create a useXxx", or when implementing a new piece of hook functionality in packages/core.
2 other projects use a version of this.
Adopted by
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Most recently taken up by
- AcKeskin/contexturetheir own version, first seen Nov 1, 2026
- jajupmochi/agent-harnesstheir own version, first seen Jul 10, 2026
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
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- AcKeskin/contexture★ 2same name
- jajupmochi/agent-harness★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository8 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- hook-docsSkill
- hook-testSkill
- ping-indexnowSkill
- pr-descriptionSkill
- publish-hashnodeSkill
- publish-juejinSkill
- publish-mediumSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 9
Use this when adding a new hook to @reactuses/core.
- Very specific: line 17
Read 1-2 *similar* existing hooks end to end (not just their names) to match style — e.g.
- Very specific: line 20
Check the knowledge base reuse cheat-sheet — much of what you need (useLatest, useUnmount, useEventListener, defaultWindow, isBrowser) is …
- Very specific: line 107
Verify: pnpm --filter @reactuses/core test useX and pnpm lint.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill 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
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
}Step 2 — Wire it into the public API
Edit packages/core/src/index.ts — all three parts, or the hook/types won't ship:
import { useX } from './useX' // 1. with the other imports
export {
// …
useX, // 2. inside the export { } block
}
export * from './useX/interface' // 3. with the other `export *` linesConventions to follow
- SSR-safety is mandatory. Guard any
window/document/navigatoraccess withdefaultWindow/defaultDocument(../utils/browser) orisBrowser/isNavigator(../utils/is). For subscribed external state, use theuse-sync-external-store/shimpattern with a server fallback (seeuseColorMode,useLocationSelector). - Reuse utilities — don't hand-roll
addEventListener(useuseEventListener), stale closures (useLatest), or unmount cleanup (useUnmount). - Return shape: a tuple with
as const, or an explicitly typed object. Be consistent with the closest existing hook. - Dev-time validation of arguments behind
if (isDev) { … console.error(…) }. - Stay on task — don't refactor neighbors or fix unrelated lint while you're here.
Step 3 — Then
- Tests → hook-test skill.
- Docs → hook-docs skill (+
bash scripts/generate-hook-registry.sh). - Verify:
pnpm --filter @reactuses/core test useXandpnpm lint.
Or run /new-hook <useName> "<description>" <category> to do the whole pipeline at once.
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.

