💡 摘要
一组增强Claude Code和Codex在React Three Fiber开发中的技能。
🎯 适合人群
🤖 AI 吐槽: “看起来很能打,但别让配置把人劝退。”
风险:Medium。建议检查:是否执行 shell/命令行指令;是否发起外网请求(SSRF/数据外发);文件读写范围与路径穿越风险。以最小权限运行,并在生产环境启用前审计代码与依赖。
React Three Fiber Skills for Claude Code & Codex
A collection of specialized skill files that enhance Claude Code and OpenAI Codex abilities to work with React Three Fiber (R3F) - the React renderer for Three.js.
Why These Skills?
LLM training data may contain outdated or incomplete R3F patterns. These skills provide:
- Accurate, up-to-date API references for R3F, Drei, and the ecosystem
- Idiomatic React patterns for 3D development
- Working code examples using hooks, JSX, and declarative patterns
- Performance best practices specific to React reconciliation
Available Skills
| Skill | Description |
|-------|-------------|
| r3f-fundamentals | Canvas setup, hooks (useFrame, useThree), JSX elements, events |
| r3f-geometry | Built-in geometries, custom BufferGeometry, instancing with Drei |
| r3f-materials | Material components, PBR, shader materials in R3F |
| r3f-lighting | Light components, shadows, Environment from Drei |
| r3f-textures | useTexture, useEnvironment, texture configuration |
| r3f-loaders | useGLTF, useLoader, Suspense patterns, asset preloading |
| r3f-animation | useFrame animations, useAnimations hook, spring physics |
| r3f-shaders | shaderMaterial, custom materials, uniforms in R3F |
| r3f-postprocessing | @react-three/postprocessing, EffectComposer, effects |
| r3f-interaction | Pointer events, controls, raycasting, KeyboardControls |
| r3f-physics | RigidBody, colliders, forces, joints, sensors with Rapier |
How It Works
Skills are automatically activated based on context. When you ask for R3F help, relevant skills load to provide accurate guidance. Both Claude Code and Codex use the same SKILL.md format with YAML frontmatter.
Example triggers:
- "Create a rotating cube in R3F" →
r3f-fundamentals,r3f-animation - "Add bloom effect" →
r3f-postprocessing - "Load a GLTF model" →
r3f-loaders - "Make an object clickable" →
r3f-interaction - "Add physics to falling cubes" →
r3f-physics
Installation
Quick Install
npx add-skill EnzeD/r3f-skills
This installs skills for your detected agent (Claude Code, Codex, OpenCode, or Cursor).
Manual Install
Copy the skills/ directory to your agent's skills location:
| Agent | Project | Global |
|-------|---------|--------|
| Claude Code | .claude/skills/ | ~/.claude/skills/ |
| Codex | .codex/skills/ | ~/.codex/skills/ |
Key Packages Covered
@react-three/fiber- Core R3F renderer@react-three/drei- Essential helpers and abstractions@react-three/postprocessing- Post-processing effects@react-three/rapier- Physics engine integrationthree- Underlying Three.js library
Version Compatibility
These skills are verified against:
- React Three Fiber 8.x
- Drei 9.x
- Three.js r160+
- React 18+
License
MIT - Use freely in your projects.
Contributing
Contributions welcome! Please ensure examples follow R3F idioms and best practices.
优点
- 提供最新的R3F模式
- 包含惯用的React示例
- 涵盖广泛的3D开发主题
- 安装过程简单
缺点
- 仅限于特定框架
- 可能需要对React的熟悉
- 并非所有技能对每个用户都相关
- 依赖外部库
相关技能
免责声明:本内容来源于 GitHub 开源项目,仅供展示和评分分析使用。
版权归原作者所有 EnzeD.
