Skip to main content
skill CX Codex GP ChatGPT official · OpenAI

react-three-fiber-game — Codex skill: what it does, how to install

Structures React-hosted 3D browser games and scenes using React Three Fiber and the pmndrs stack.

Install into Codex · Skills CLI (Vercel) All methods and platforms ↓
npx skills add openai/plugins --skill react-three-fiber-game -a codex
Open on GitHub

What react-three-fiber-game does

This skill establishes architecture rules for 3D runtimes inside React applications. It integrates @react-three/fiber, three, @react-three/drei, and @react-three/rapier while keeping the Canvas isolated from high-frequency UI re-renders.

HUD elements, settings, and menus stay in the normal DOM tree by default. Gameplay logic lives outside render components because pushing frame-by-frame mutations through React state tanks performance. Scaffolds are intentionally restrained, avoiding clutter around the viewport.

Install this if your product shell or 3D configurator already relies on React. If your project demands a purely imperative WebGL runtime without React coordination, skip it.

What it helps with

  • separate high-frequency game loops from React component renders
  • render HUD overlays, menus, and inventory inside the standard DOM
  • integrate Rapier physics and Drei helpers without boilerplate
  • coordinate shared application state with the 3D scene boundary

Example prompts for the agent

  • Build a 3D scene using React Three Fiber and Rapier physics with a DOM HUD overlay.
  • Set up a Canvas root where per-frame updates bypass standard React component state.
  • Add a 3D product configurator coordinated with our existing React state.

How to install react-three-fiber-game

1Skills CLI (Vercel)

npx skills add openai/plugins --skill react-three-fiber-game -a codex

2Manually: put the files in place

.agents/skills/react-three-fiber-game/SKILL.md

For all projects use ~/.agents/skills/

From the same set201

The whole set →
supabase official supabase Guides the agent through database configuration and strict RLS policies in Supabase. CX Codex GP ChatGPT 8installs remotion-render official Remotion Exports videos and static stills from Remotion projects using CLI commands. CX Codex GP ChatGPT 3installs figma-create-new-file official Figma Creates blank Figma, FigJam, or Slides files inside draft folders. It resolves planKey and editor types before invoking Figma MCP tools. CX Codex GP ChatGPT 6installs swiftui-performance-audit official OpenAI Pinpoints SwiftUI runtime issues like frame drops, unresponsive taps, and excessive view body computations. Works code-first and guides Instruments profiling. CX Codex GP ChatGPT 109installs swiftui-liquid-glass official OpenAI This skill helps build and review SwiftUI Liquid Glass interfaces for iOS 26+. Use it when adopting the API or checking fallbacks, interaction, and design fit. CX Codex GP ChatGPT 121installs swiftui-ui-patterns official OpenAI This skill helps build and refactor SwiftUI interfaces, from navigation and state to layouts and controls. Use it for new screens or changes to an existing project. CX Codex GP ChatGPT 114installs swiftui-view-refactor official OpenAI Refactors SwiftUI view files into clean, testable structures with dedicated subview types and proper Observation ownership. CX Codex GP ChatGPT 113installs ios-memgraph-leaks official OpenAI Captures and inspects iOS leaks from a simulator process or .memgraph. Useful for tracing retained objects and checking a fix with before-and-after evidence. CX Codex GP ChatGPT 1,054installs

Similar

md-document Alireza Rezvani Converts long Markdown specs, RFCs, and plans into standalone interactive HTML documents with sticky navigation, live search, and design tokens. Claude Code 49installs frontend-design-review microsoft This skill reviews and creates frontend interfaces with checks for design quality, accessibility, and design-system use. Use it for UI reviews, PRs, and responsive layouts. Claude Code GitHub Copilot 237installs design-system Alireza Rezvani Captures brand identity via a 10-question wizard and validates WCAG 2.2 AA contrast. It derives 12 CSS tokens in HSL for markdown-html converters. Claude Code 33installs frontend-design official anthropics This skill guides intentional visual design for new interfaces and redesigns. Use it when a generic generated UI is not enough. Claude Code Claude.ai 1,025,790installs design-taste-frontend Leonxlnx This skill directs the design of public pages and work screens, then checks the result in a browser through screenshots. Use it when an interface feels generic or unfinished. Claude Code CX Codex Cursor +1 673,100installs prototype Matt Pocock Creates throwaway prototypes for checking state logic or exploring UI before committing the decision to the main codebase. Claude Code 986,201installs hyperframes heygen-com Instructs coding agents on creating, validating, and rendering HTML-based videos using the HyperFrames framework and CLI. Claude Code CX Codex Cursor +1 1,200,000installs hyperframes-cli heygen-com Controls HyperFrames video workflows from the CLI: audits layouts and contrast, edits timeline clips, captures snapshots, and renders locally or in cloud runtimes. Claude Code CX Codex Cursor +1 1,200,000installs

Questions about react-three-fiber-game

How to install react-three-fiber-game in Codex?

Run npx skills add openai/plugins --skill react-three-fiber-game in your terminal or place the file at .agents/skills/react-three-fiber-game/SKILL.md.

What does react-three-fiber-game do?

It guides the architecture of browser 3D games in React, organizing pmndrs helpers, DOM overlays, and performance boundaries.

When should you avoid using this skill?

Skip it if the project is not built with React or if you need an imperative runtime with minimal React coordination.

Source text

SKILL.md · MIT
---
name: react-three-fiber-game
description: Build React-hosted 3D browser games with React Three Fiber. Use when the user wants pmndrs-based scene composition, shared React state, and 3D HUD integration inside a React app.
---

# React Three Fiber Game

## Overview

Use this skill when the 3D runtime lives inside a React application. This is the default React-native 3D path in the plugin and should be preferred over vanilla Three.js when the app shell, settings, storefront, editor surface, or surrounding product already uses React.

Recommended stack:

- `@react-three/fiber`
- `three`
- `@react-three/drei`
- `@react-three/rapier`
- `@react-three/postprocessing`
- `@react-three/a11y` when accessibility-sensitive interaction matters
- DOM overlays in the normal React tree

## Use This Skill When

- the project already uses React
- the 3D scene must share state with the rest of the app
- declarative scene composition is a net gain
- the team wants pmndrs helpers instead of building every helper layer by hand

## Do Not Use This Skill When

- the app is not React-based
- the project wants a cleaner imperative runtime with minimal React coordination
- the problem is asset packaging rather than runtime composition

## Best Fit Scenarios

- 3D configurators and tool-rich browser products
- React apps with embedded game or scene surfaces
- 3D menus, editors, or world maps in an existing React app
- 3D game UIs that depend on shared app state and non-canvas shells

## Core Rules

1. Keep simulation state outside render components.
   - React components should describe scene composition, not become the source of truth for gameplay rules.
2. Use React state and scene state deliberately.
   - Shared UI state can live in app state.
   - High-frequency simulation should not force the whole app through unnecessary React churn.
3. Use pmndrs helpers intentionally.
   - Drei for controls, loaders, helpers, environments, and common scene primitives.
   - `@react-three/rapier` for physics integration.
   - `@react-three/postprocessing` for optional effects.
   - `@react-three/a11y` when the interaction model benefits from accessible scene semantics.
4. Keep HUD, settings, and menus in DOM by default.
5. Keep starter scaffolds visually restrained.
   - Start with one compact objective or status surface and transient prompts.
   - Keep notes, maps, and multi-step checklists collapsed until opened.
   - Do not surround the `Canvas` with equally weighted glass cards.

## Architectural Guidance

- Use a dedicated scene root component that owns the `Canvas`.
- Keep camera rigs and control components isolated from gameplay systems.
- Keep loader and asset wrappers predictable.
- Keep DOM overlays and the 3D scene coordinated through explicit state boundaries.
- If a system needs tight imperative control, isolate it rather than forcing everything into declarative patterns.
- If the scene is immediately playable, keep the initial overlay budget low and let the world do more of the onboarding.

## Anti-Patterns

- Treating React components as the gameplay state store
- Pushing heavy per-frame mutation through broad app state
- Using R3F only because React is available, even when the project needs a cleaner imperative runtime
- Building HUD or inventory UI inside the 3D scene by default
- Shipping an initial scaffold with large cards occupying every side of the viewport

## References

- Shared architecture: `../web-game-foundations/SKILL.md`
- Frontend direction: `../game-ui-frontend/SKILL.md`
- 3D HUD layout patterns: `../../references/three-hud-layout-patterns.md`
- React Three Fiber stack: `../../references/react-three-fiber-stack.md`
- React starter: `../../references/react-three-fiber-starter.md`
- GLB loader starter: `../../references/gltf-loading-starter.md`
- Rapier starter: `../../references/rapier-integration-starter.md`
- 3D asset pipeline: `../../references/web-3d-asset-pipeline.md`
- WebGL debugging and perf: `../../references/webgl-debugging-and-performance.md`

© OpenAI · MIT · openai/plugins

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor