@hiremate/react
v1.0.2
Published
React & Next.js coding rules for Claude Code and Cursor
Readme
@hiremate/react
React & Next.js coding rules for Claude Code and Cursor. Installs as a global system prompt so AI always follows your team's patterns, plus a /review command to check new changes.
What it does
- Always-on rules — Claude Code reads them automatically in every session (like a system prompt)
/reviewcommand — checks your current git diff against the rules, flags violations by file and line- Cursor support — same rules as
.mdcfile for Cursor
Install
npx @hiremate/react initThis writes to:
~/.claude/CLAUDE.md— global rules for Claude Code (merged, doesn't overwrite your existing content)~/.claude/commands/review.md— the/reviewslash command.cursor/rules/react-rules.mdc— Cursor rules in the current project- Cursor global settings (
settings.json) — rules apply to all Cursor projects automatically
Update
When the team pushes new rules:
npx @hiremate/react@latest initThe script finds the existing block in your CLAUDE.md by markers and replaces only it — your other CLAUDE.md content stays untouched.
Uninstall
npx @hiremate/react uninstallRemoves the rules block from ~/.claude/CLAUDE.md and deletes ~/.claude/commands/review.md.
Usage
Automatic (always-on)
After init, Claude Code and Cursor follow the rules automatically when writing or editing code. No extra steps.
/review command (Claude Code)
Run after making changes:
/reviewChecks git diff --staged (or git diff HEAD if nothing staged) and outputs violations grouped by file:
## src/components/Modal.tsx
src/components/Modal.tsx:14 — CRITICAL: barrel import, use lucide-react/dist/esm/icons/x
src/components/Modal.tsx:38 — HIGH: aria-label missing on close button
## src/lib/utils.ts
✓ passYou can also point it at a specific file:
/review src/components/Modal.tsxWhat's covered
Always flagged
- Sequential
awaitwherePromise.allis possible - Barrel file imports (
lucide-react,@mui/material, etc.) anyoras anyin TypeScript.sort()mutating props or state (use.toSorted())window/documentaccess outside SSR guards
Flagged unless clearly intentional
- Unnecessary client-side state that could live on the server
- Missing
aria-labelon icon-only buttons count && <Component>where count is a number (renders "0")useEffectwith object dependency instead of primitive
Suggested
- State lifted higher than needed
- Prop drilling more than 2 levels
- Missing
autocompleteon form inputs
Requirements
- Node.js 18+
- Claude Code or Cursor
