Skip to main content
rule CX Codex

frontend-react — Claude Code rule: what it does, how to install

frontend-react — a React frontend rule for Claude and Claude that keeps UI edits small: explicit prop types, existing state patterns, routes left alone.

MIT ★ 1,198 updated 2026-10-23

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/rules/frontend-react.md
Open on GitHub

What frontend-react does

This rule file pins down how an agent should touch a React UI. Its header limits the scope to client/src/**/*.{ts,tsx,css} and client/public/**/*.tsx, so outside those globs it stays dormant — a different folder layout means editing the paths first.

Six instructions sit in the file. Don't rearrange the information hierarchy unless a redesign was asked for. Component props and API types stay explicit, never any. Loading, empty and error states follow whatever pattern nearby pages already use. Any new behaviour has to survive a delayed websocket push. Routes follow the current navigation model, and diffs stay narrow instead of restyling the whole screen.

The websocket clause only earns its place in an app that streams live updates. On a static page it adds nothing.

What it helps with

  • add a typed prop to a component without falling back to any
  • reuse the existing loading and error state pattern on a new page
  • keep the current information hierarchy through a small UI fix
  • wire a new route into the existing navigation model
  • hold a UI change to a narrow diff instead of a restyle

Example prompts for the agent

  • Add an onSelect prop to UserCard with an explicit type, no any.
  • Build the loading and error states for the reports page the way nearby components do it.
  • Fix the UI behaviour when websocket updates arrive late, leave the layout alone.

How to install frontend-react

Manually: put the files in place

.claude/rules/frontend-react.md

The paths frontmatter field limits the files

Step by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use

Questions about frontend-react

How to install frontend-react in Claude Code?

Create .claude/rules/frontend-react.md in your project and paste the rule text into it.

What does frontend-react do?

It sets the boundaries for React UI work: typed props and API calls, state handled like the pages around it, small diffs rather than a broad rewrite.

Which files does the rule cover?

client/src/**/*.{ts,tsx,css} and client/public/**/*.tsx — the header of the rule file carries that list.

Source text

frontend-react.md · MIT
---
paths:
  - "client/src/**/*.{ts,tsx,css}"
  - "client/public/**/*.tsx"
---

# Frontend Rules

- Preserve existing UI information hierarchy unless redesign is requested.
- Keep component props and API typing explicit; avoid implicit `any`.
- Match existing page/component patterns for loading, empty, and error states.
- When adding UI behavior, ensure it degrades safely if websocket updates are delayed.
- Keep routes consistent with current navigation model.
- Prefer focused UI diffs over broad stylistic rewrites.

© hoangsonww · MIT · hoangsonww/Claude-Code-Agent-Monitor

Similar IDE rules

All IDE rules for Frontend and UI →

From the same set155

The whole set →
ccam-analytics ccam-analytics is a Claude Code hook that streams session events to Agent Monitor for telemetry tracking. It triggers whenever a main session or subagent stops. CX Codex ★ 1,198repo stars docs-markdown docs-markdown — a markdown documentation rule: command samples must run, project paths start at the root, and architecture notes have to match what the code does. CX Codex +1 ★ 1,198repo stars integration-operator integration-operator is a Claude Code subagent that manages CCAM alerts, webhooks, push notifications, and SSH sources. It confirms changes first and hides secrets. CX Codex ★ 1,198repo stars backend-reviewer The backend-reviewer subagent reviews backend routes and hooks for regressions, data integrity risks, and missing tests. It works with Claude Code and Codex. CX Codex ★ 1,198repo stars platform-admin platform-admin manages settings, hooks, data imports, backups, and MCP for Claude Code Agent Monitor. Confirms writes before updating. CX Codex ★ 1,198repo stars frontend-reviewer The frontend-reviewer subagent reviews React UI changes for behavior regressions, state mismatches, and broken user flows. Use it after frontend edits. CX Codex ★ 1,198repo stars platform-status platform-status runs the CCAM diagnostics: hooks, config roots, dashboard version, MCP build state. Reports back without changing anything. CX Codex +1 ★ 1,198repo stars mcp-typescript Sets boundaries for TypeScript MCP servers: sends logs to stderr, keeps input schemas strict, and guards destructive actions. CX Codex +1 ★ 1,198repo stars

Project sponsors

Companies that keep this analytics open