Agent skill

Code React

by gridaco in gridaco/grida

React-specific code shape in the Grida editor. An agent skill from gridaco/grida.

Apache-2.0Auto-check passedDevelopment

Install Code React

skills CLI
$ npx skills add gridaco/grida --skill code-react -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install gridaco/grida code-react --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/gridaco/grida.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/code-react .claude/skills/code-react && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
code-react
GitHub stars
2.7k
Token cost
~1.6k tokens
SKILL.md length
866 words
Files
1
Skills in repo
29
Repo updated
First seen
Licence
Apache-2.0

At a glance

React-specific code shape in the Grida editor. An agent skill from gridaco/grida.

  • Works in 2 steps: Not testing it is honest. The hook calls → The spec would be longer than the code.…
  • Authoring React in editor/grida-canvas-react/
  • SKILL.md covers Hooks live at the edge, One data-testid per component… and The short version
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Code React is an agent skill from gridaco/grida. React-specific code shape in the Grida editor. Hooks cannot be tested or benchmarked and silently break tuned UX under layered composition, so they are barred from the engine and main system — load-bearing logic lives in classes and namespaces, hooks only as thin edge wires. data-testid follows component-root discipline: one per significant component, not scattered. Use when authoring React in editor/grida-canvas-react/, editor/components/, editor/scaffolds/, or editor/app/.

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Project scaffolding. It works with React. The licence is Apache-2.0.

When your agent uses it

  • Authoring React in editor/grida-canvas-react/
  • Editor/components/
  • Editor/scaffolds/

Example prompts

  • “/code-react”

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. Not testing it is honest. The hook calls
  2. The spec would be longer than the code. The hook is short

What it can do on your machine

Read from SKILL.md and the folder at commit fe26b13. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Code React loads about 1.6k tokens when it runs. Until then it costs about 125 tokens; SKILL.md has 866 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~125
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from gridaco/grida at commit fe26b13, republished under its Apache-2.0 licence (© gridaco). 866 words, ~1,552 tokens.

Download SKILL.mdSave it as .claude/skills/code-react/SKILL.md (or your agent's skills folder).
name
code-react
description
React-specific code shape in the Grida editor. Hooks cannot be tested or benchmarked and silently break tuned UX under layered composition, so they are barred from the engine and main system — load-bearing logic lives in classes and namespaces, hooks only as thin edge wires. `data-testid` follows component-root discipline: one per significant component, not scattered. Use when authoring React in `editor/grida-canvas-react/`, `editor/components/`, `editor/scaffolds/`, or `editor/app/*`.

code-react

React in this repo is a thin layer over a framework-agnostic engine. These conventions protect that thinness — where logic is allowed to live, and where test landmarks land in the DOM — so the React layer stays replaceable and easy to read.

Hooks live at the edge

React hooks must not appear in the main system — the canvas engine, reducers, document model, font manager, presentation engine, command handlers, anything that represents domain state or compute logic. Hooks live only at the React edge: small use-* adapters that bridge engine state into components, plus component-local UI state.

The reason is that hooks cannot be tested, cannot be benchmarked, and cannot be reasoned about by inspection once their composition crosses more than a couple of layers. In a complex editor — where one render is a chain of conditional effects, memoized derivations, and re-entrant subscriptions — the execution order and re-render layering are the behavior. A subtle ordering change, a missed dep, a state read one tick later, and the user-visible UX shifts. Features you tuned will get silently dropped — no failing test, no benchmark regression, no noisy error to alert you. By the time someone notices, the regression is weeks deep and no bisect helps, because nothing was ever measurable.

The escape is not "test your hooks better," not "be more careful with deps," not "add a renderHook suite." It is don't use hooks for anything load-bearing in the first place. The rule is prevention, not discipline — discipline fails at the third layer of composition; prevention does not. Logic that matters lives in a class or namespace where the execution order is explicit, the contract is testable, and the hot path is benchmarkable. The hook is reduced to a wire — short enough that you can verify it by sight, and small enough that not testing it is honest.

A hook is acceptable in exactly two situations:

  1. Not testing it is honest. The hook calls useSyncExternalStore, useContext, or a useEffect lifecycle, with no branch and no derivation. The test would be tautological.
  2. The spec would be longer than the code. The hook is short enough that no test could catch a bug the code couldn't already reveal at sight.

If a hook fails both — branching logic, derivations, coordination across effects, anything you would want to benchmark or assert on — extract the logic out, test and benchmark it there, and reduce the hook to a three-line call site.

A pair of examples pins the boundary:

  • Fine. useState and hooks for component-local UI state — hover, focus, open/closed, the in-flight value of an input about to be committed. The spec is the code; not testing it is honest.
  • Never. Hooks for features layered on top of a rich-text or canvas runtime — a slash-menu, mention picker, inline toolbar plugin, anything that composes with the host editor's state machine. Even when the host (e.g. tiptap, lexical) is hook-friendly, your features run on an execution order you do not own. Build them as classes or namespaces against the host's imperative API; React renders the result.

The split is structural, not lint-enforced. The engine package must not import React. The React bindings consume the engine through its public surface — never the reverse — so the engine stays replaceable and the bindings stay verifiable by sight. A use-* that wires useSyncExternalStore, useContext, or a disposal useEffect to the engine is the entire allowed shape; anything more is engine logic in the wrong package.

Show full SKILL.md (294 more words)Show less

One data-testid per component root

Test IDs are landmarks, not scattered selectors. A significant component — a panel, a dialog, a workflow root, a complex isolated module — gets one data-testid on its outermost element. Internal children are located via semantic queries (findByRole, text) rooted at that landmark.

Apply to: panels, dialogs, popovers, major layout regions, complex modules. Skip for: Button, Input, Icon, primitive layout wrappers (Box, Flex, Stack), and any element a test can reach with a role or text query from the landmark above it.

Values are kebab-case, factful, and unique: sidebar-right-inspect-node-properties, popover-color-picker-rgba32f, dialog-export-settings. Avoid tying values to file names, UI copy strings, or styling concerns — those churn.

Why: a data-testid is a contract between the DOM and the component that rendered it. If every span has one, the contract is meaningless and tests start coupling to implementation details. One per landmark keeps the contract small and stable.

The full reference — with the apply/skip table and worked examples — lives in docs/contributing/react.md. The rule above is the load-bearing part.

The short version

  • Hooks cannot be tested, cannot be benchmarked, and silently shift UX under layered composition. Prevention is the rule, not discipline — discipline fails at the third layer.
  • Load-bearing logic lives in a class or namespace where it can be tested and benchmarked. Hooks are a wire to React, nothing more.
  • A hook is acceptable only when not testing it is honest, or when the spec would be longer than the code. Otherwise extract.
  • data-testid goes on the component root, not its children. Tests find the landmark, then use semantic queries.
  • kebab-case data-testid values, factful and unique; never tied to file names, copy, or styling.

See also code-ts for the TypeScript code shape this builds on, and docs/contributing/react.md for the canonical UI test ID reference.

© gridaco, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/code-react of gridaco/grida.

Open the folder on GitHubat commit fe26b13

Compare with similar skills

Code React next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Code React compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Code React this skillgridaco/grida2.7k—~1.6kAutomated safety check: PassApache-2.0
Nx Generatenomcopter/react-mosaic4.8k7 repos~1.9kAutomated safety check: PassCustom licence
Nextjs App Architecturejakubwarkusz/themes1231 repos~2.5kAutomated safety check: PassMIT
Add Integration Eventfullstackhero/dotnet-starter-kit6.8k—~1.1kAutomated safety check: PassMIT
Better FullstackMarve10s/Better-Fullstack754—~1.5kAutomated safety check: PassMIT
Pixijs Createpixijs/pixijs-skills348—~3.1kAutomated safety check: PassMIT

Similar skills

  • Nx Generate

    nomcopter/react-mosaic

    Generate code using nx generators. An agent skill from nomcopter/react-mosaic.

    4.8k GitHub starsUsed in 7 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Nextjs App Architecture

    jakubwarkusz/themes

    Build or audit Next.js 16 App Router apps using a next-beats-style React Server Components architecture.

    123 GitHub starsUsed in 1 repo~2.5k tokens
    DevelopmentAuto-check passed
  • Add Integration Event

    fullstackhero/dotnet-starter-kit

    Publish a cross-module integration event via the Outbox and handle it idempotently in another module.

    6.8k GitHub stars~1.1k tokensUpdated today
    DevelopmentAuto-check passed
  • Better Fullstack

    Marve10s/Better-Fullstack

    Scaffold, plan, or extend Better Fullstack projects with the generator, CLI, or MCP server.

    754 GitHub stars~1.5k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Pixijs Create

    pixijs/pixijs-skills

    A skill your agent uses when scaffolding a new PixiJS v8 project with the create-pixi CLI or adding PixiJS to an existing project.

    348 GitHub stars~3.1k tokensUpdated 7 days ago
    DevelopmentAuto-check passed
  • Portaljs Connect Ckan

    datopian/portaljs

    Wire a scaffolded PortalJS portal to a CKAN backend over its API.

    2.4k GitHub starsUsed in 1 repo~1.5k tokens
    DevelopmentAuto-check passed

More from gridaco/grida

All 29 skills in this repo
  • Desktop

    gridaco/grida

    Grida Desktop Electron shell and release-impact work: BrowserWindow, preload, window.grida, menus, protocol/deep links, file associations, Forge, path-scoped bridge security, Electron-only UI bugs…

    2.7k GitHub stars~3.2k tokensUpdated yesterday
    Auto-check: notes
  • Io Figma

    gridaco/grida

    Guides work on the Figma I/O package (@grida/io-figma, packages/grida-canvas-io-figma/).

    2.7k GitHub stars~2.2k tokensUpdated yesterday
    Auto-check: notes
  • Opt Library

    gridaco/grida

    Set up, download, verify, and seed the optional Grida Library developer corpus into local Supabase.

    2.7k GitHub stars~1.4k tokensUpdated yesterday
    Auto-check passed
  • Vision

    gridaco/grida

    Query images with a local Ollama vision model without loading the image into the main agent context.

    2.7k GitHub stars~1.5k tokensUpdated yesterday
    Auto-check passed
  • AI Models

    gridaco/grida

    Research, compare, and update shared AI model JSON for TypeScript, web, and Rust consumers.

    2.7k GitHub stars~5.7k tokensUpdated yesterday
    Auto-check passed
  • Agent System

    gridaco/grida

    Grida AI agent system work: @grida/daemon (DaemonServer, loopback HTTP perimeter, files/workspaces, secrets store, daemon discovery) and @grida/agent (the agent tenant: sessions, providers/BYOK…

    2.7k GitHub stars~3.4k tokensUpdated yesterday
    Auto-check passed

Works with

Categories

Questions about Code React

What does Code React do?

React-specific code shape in the Grida editor. An agent skill from gridaco/grida. Code React is an agent skill from gridaco/grida. React-specific code shape in the Grida editor.

When should I use Code React?

Code React fits situations like: authoring React in editor/grida-canvas-react/; editor/components/; editor/scaffolds/.

How do I install Code React in Claude Code?

Run `npx skills add gridaco/grida --skill code-react -a claude-code`. Or copy the skill folder (.agents/skills/code-react in gridaco/grida) into .claude/skills/code-react in your project. Claude Code loads it when a task matches its description.

How do I install Code React in Codex?

Run `npx skills add gridaco/grida --skill code-react -a codex`. Or copy the skill folder (.agents/skills/code-react in gridaco/grida) into .agents/skills/code-react in your project. Codex loads it when a task matches its description.

Can I use Code React in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add gridaco/grida --skill code-react -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/code-react, .gemini/skills/code-react, .github/skills/code-react and .opencode/skills/code-react in your project.

What does Code React need to run?

SKILL.md names no scripts, command-line tools or credentials: Code React is instructions for the agent only.

Does Code React access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Code React safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Code React use?

Code React is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Code React use?

About 1.6k tokens (SKILL.md is roughly 6.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Code React?

Skills that share tags, products or a category with Code React: Nx Generate (nomcopter/react-mosaic, 4.8k stars), Nextjs App Architecture (jakubwarkusz/themes, 123 stars), Add Integration Event (fullstackhero/dotnet-starter-kit, 6.8k stars) and Better Fullstack (Marve10s/Better-Fullstack, 754 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Code React?

gridaco (a GitHub organization) maintains it in gridaco/grida, which has 2,659 GitHub stars. The repository holds 29 skills in this directory. The repository was last updated on October 8, 2026.

Source: gridaco/grida on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.