hook
Skill52 starsChanged 49 days agoMITView on GitHub
Create a reusable React hook (useX). Triggers "create hook", "new hook", "custom hook", a useX-style name, or extracting logic out of a component.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- akachandan1/proofstacktheir own version, first seen Oct 11, 2026
- tance-mang/chinese-webnovel-skillstheir own version, first seen Jun 12, 2026
- frankxai/agentic-creator-ostheir own version, first seen Mar 28, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- tance-mang/chinese-webnovel-skills★ 97same name
- frankxai/agentic-creator-os★ 10same name
- akachandan1/proofstack★ 0same 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 repository27 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .claude/AGENTS.mdAGENTS.md
- auditSkill
- autoresearchSkill
- buildSkill
- case-studySkill
- ccSkill
- codexSkill
- componentSkill
- context-docSkill
- dr-initSkill
- dr-reviewSkill
- fixSkill
- freezeSkill
- handoffSkill
- harvestSkill
- orchestrateSkill
- poke-holesSkill
- proof-of-workSkill
- refactorSkill
- retroSkill
- review-batchSkill
- share-learningSkill
- shipSkill
- storiesSkill
- triageSkill
- zero-tech-debtSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
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
- Distinctive: line 9
Create a custom React hook following Darkroom conventions.
- Very specific: line 16
Prefer a matching project hook, including wrappers around hamo, over direct dependency calls or a new wrapper.
- Very specific: line 25
If no project abstraction fits, check runtime/platform APIs and installed dependencies.
- Distinctive: line 87
If this hook uses an external library, fetch docs first:
- Very specific: line 88
Use Context7 MCP (mcp__context7__resolve-library-id → get-library-docs) in Claude or when the user configured it in standalone Codex.
- Very specific: line 89
Run bun info <package> to check the latest version.
≈ “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
Create Custom Hook
Create a custom React hook following Darkroom conventions. The hook itself is stack-agnostic — what differs between satus and novus is the path alias.
Step 1 — Check existing abstractions
Apply the Laziness Ladder before scaffolding, even when the request proposes a
hook name. Search project hooks, utilities, and callers by behavior and related
terms; read matching implementations to check their contract and import path.
Prefer a matching project hook, including wrappers around hamo, over direct
dependency calls or a new wrapper. If one fits, use it and stop here.
For example, in Satus, search for useDeviceDetection, isDesktop, and media-query
usage before adding useIsDesktop or repeating a breakpoint string. When the local
contract matches the requirement, use const { isDesktop } = useDeviceDetection()
with the verified local import. Check breakpoint semantics and server/initial
render behavior; do not assume every media query means the same thing.
If no project abstraction fits, check runtime/platform APIs and installed
dependencies. For common hook behavior, check installed hamo hooks using the
documentation procedure below. Before creating a hook, name the implementations
checked and the behavior they lack; then continue only for that gap.
Step 2 — Detect stack
Read package.json:
dependencies.next→ satus / Next.js (path alias@/, hooks require a'use client'boundary)dependencies["react-router"]→ novus / React Router (path alias~/, components isomorphic)
Step 3 — Choose location
| Stack | Hook path |
| satus | lib/hooks/<name>.ts |
| novus | hooks/<name>.ts (novus puts hooks/ at the project root) |
Confirm by checking the existing lib/hooks/ or hooks/ directory structure if either pattern is unclear from package.json alone.
Step 4 — Emit template
// lib/hooks/<name>.ts (novus: hooks/<name>.ts)
'use client' // satus only, hooks live in the client boundary; novus is isomorphic, omit it
// Client Components can prerender on the server. Read browser APIs in effects
// or event handlers, with the same initial state on the server and browser.
import { useState, useEffect } from 'react'
interface Use<Name>Options {
// Hook configuration options
}
interface Use<Name>Return {
// Return type definition
}
export function use<Name>(options?: Use<Name>Options): Use<Name>Return {
// Implementation
return {
// Return values
}
}Conventions
- Type everything — options interface, return interface.
- Named export —
export function useX, not default. - Prefix with
use— React hook naming convention. - No memoization — React Compiler handles it automatically.
- Hydration-safe state — both stacks can render on the server. Use a
deterministic initial value for the server render and first browser render;
'use client'does not disable prerendering. Atypeof windowbranch in a lazy state initializer can still produce different markup and a hydration mismatch. ReadlocalStoragein an effect, and finish that read before enabling an effect that persists state, so initial defaults cannot overwrite stored values.
Before you start
If this hook uses an external library, fetch docs first:
- Use Context7 MCP (
mcp__context7__resolve-library-id→get-library-docs) in Claude or when the user configured it in standalone Codex. Otherwise use official docs through native browsing or inspect the pinned local package. cc-settings does not auto-run unpinned registry MCP packages in Codex. - Run
bun info <package>to check the latest version.
Arguments
$ARGUMENTS— Hook name (e.g., "useAuth", "useLocalStorage")
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.

