file-tech-debt
Files a new tech-debt GitHub issue for an out-of-scope code-review finding. Builds the dedup key, skips an open or…
Applies GAIA's patterns and conventions for writing and editing React components and hooks. Use this skill whenever writing or reviewing React components, hooks, or event handlers, or deciding on component extraction. Also trigger when deciding whether a manual memo or "use no
Claude Code
$ npx -y skills add gaia-harness/gaia --skill react-code --agent claude-code
Codex
$ npx skills add gaia-harness/gaia --skill react-code -a codex -y
Cursor
$ npx skills add gaia-harness/gaia --skill react-code -a cursor -y
Gemini CLI
$ npx skills add gaia-harness/gaia --skill react-code -a gemini-cli -y
GitHub Copilot
$ npx skills add gaia-harness/gaia --skill react-code -a github-copilot -y
OpenCode
$ npx skills add gaia-harness/gaia --skill react-code -a opencode -y
Windsurf
$ npx skills add gaia-harness/gaia --skill react-code -a windsurf -y
name: react-code description: Applies GAIA's patterns and conventions for writing and editing React components and hooks. Use this skill whenever writing or reviewing React components, hooks, or event handlers, or deciding on component extraction. Also trigger when deciding whether a manual memo or "use no memo" is justified under React Compiler, debugging stale closures or infinite re-renders, weighing a new dependency against a web-platform API or a hand-rolled primitive, choosing a React 19 idiom, or reaching for React's form Actions instead of React Router's form handling.
Write and edit React components, pages, routes, hooks, and forms following project conventions.
Contents: Reach for the Platform First; Pre-Flight Gates; Memoization: compiler-first; Component Structure; Data Loading; Route-Page Architecture; References.
Before installing a package or hand-rolling a primitive, follow the reuse order in Simplicity First (`.claude/rules/coding-guidelines.md`). On the frontend:
Run each gate when its pattern appears in your changes.
**Before writing `useEffect`:** decide whether it should be an Effect at all. Lint (`react-you-might-not-need-an-effect`) reports the ones that should not: state derived from props or state, user-event logic, chained updates, notifying a parent, and resetting state on a prop change. An Effect is right when it synchronizes with an external system (browser API, third-party widget, network). Add cleanup (a fetch aborts its `AbortController`; a client that cannot cancel uses an `ignore` flag: `references/hook-patterns.md`).
**Before writing `useMemo`, `useCallback`, or `memo`:** don't; see `## Memoization: compiler-first`.
**`useState`:** for an absent initial value, prefer `undefined` over `null` (never-null convention): `useState<T>()` is already typed `T | undefined`.
**Before writing `<input>`, `<select>`, `<textarea>`, or `<input type="checkbox">`:**
| Native element | Use instead (`~/components/ui/...`) | | -------------------------------------- | ------------------------------------------------------------------------------------ | | `<input type="text">` (any text type) | `Input` (`input`) | | `<input type="checkbox">` | `Checkbox` (`checkbox`); a group is one `Checkbox` per option in a `FieldSet` | | `<input type="radio">` / radio group | `RadioGroup` and `RadioGroupItem` (`radio-group`) in a `FieldSet` | | `<select>` | `NativeSelect` and `NativeSelectOption` (`native-select`) | | `<textarea>` | `Textarea` (`textarea`) | | `<label>` | `FieldLabel` (`field`), or `Label` (`label`) outside a `Field` | | Field with label + error + description | `ConformField` around the ui control; a group uses the `field` parts | | `<button>` | `Button` (`button`) |
**Exceptions (native OK):** `<input type="hidden">`, `<input type="file">`, `<input type="range">`.
A raw ui control carries no label or error wiring. Put a single form control in `ConformField` and compose a group, as `references/conform-forms.md` shows (one pattern per control type). Render options from an array with `.map`.
**CRITICAL, `@conform-to/zod`:** Always import from `/v4` subpath. The default export targets Zod v3 and causes a runtime error that typecheck and build do NOT catch (lint flags the bare import).
// BAD, runtime error
import {parseWithZod} from '@conform-to/zod';
// GOOD
import {parseWithZod} from '@conform-to/zod/v4';See `references/conform-forms.md` for full Conform + Zod wiring. Beyond the import path, all Zod schemas use Zod 4 syntax, `wiki/dependencies/Zod.md` is the canonical Zod 3 → Zod 4 migration map (`z.strictObject`, top-level string formats, etc.).
**Before writing ANY user-visible string in JSX:**
Every string a user can see or hear, including `aria-label`, `alt`, `title` and placeholder attributes, must come from a `t()` call. Lint (`i18next/no-literal-string`) reports raw JSX text but not attributes, so `aria-label`, `alt`, `title`, and placeholders are yours to check. This applies to new components, new UI sections, and modifications that add visible text. The only exceptions are punctuation-only strings, single-character symbols, developer-facing content (console.log, comments, test assertions), and approximate skeleton-loader placeholder text standing in for a dynamic runtime value. Skeleton text that mirrors static `t()` content must still use `t()` (see the skeleton-loaders skill).
1. Add the translation key to the appropriate namespace file in `app/languages/en/` (and any other locale folders present, copying the English string verbatim as a placeholder) 2. Use `t('key')` in the component, never a string literal 3. **One `useTranslation()` per component**: never multiple calls for different namespaces 4. Use `{ns: 'other'}` as second arg to `t()` for cross-namespace access 5. Choose the most-used namespace for `useTranslation()` to m
Claude is raw power. GAIA is order and focus. A serious harness for Claude Code. It keeps Claude-shipped code production-grade as your team scales. The React frontend is handled. You build the rest of your app on top.
Files a new tech-debt GitHub issue for an out-of-scope code-review finding. Builds the dedup key, skips an open or…
Runs GAIA wiki maintenance (sync, consolidate, lint with fixes) in one command and lands it as one commit and PR. Trigger on…
Applies descriptive, self-documenting naming in any language (TypeScript, bash, workflow YAML, Dockerfiles). Use this skill…
Maintainer-only. Rewrites a version's GAIA CHANGELOG entries as plain-language public release notes for the marketing site…
Runs test-driven development with a red-green-refactor loop, an opt-in tool for logic where test-first helps. Use when the user…
Remediates dependencies in place of Dependabot version and security updates. Discovers outdated packages and open security…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.