RE

react-native-r3f

High-quality, declarative 3D web component development with React Three Fiber.

Install

mkdir -p .claude/skills/react-native-r3f && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/18402" && unzip -o skill.zip -d .claude/skills/react-native-r3f && rm skill.zip

Installs to .claude/skills/react-native-r3f

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Expert guidance for React Three Fiber development with React, Vite, Tailwind CSS, and three.js
94 charsno explicit “when” trigger
Advanced

Key capabilities

  • Write concise, technical responses with accurate React examples
  • Employ functional, declarative programming paradigms
  • Prioritize iteration and modularity
  • Use TypeScript for all code
  • Implement error handling at function entry points
  • use Next UI and Tailwind CSS for styling

How it works

The skill provides expert guidance for React Three Fiber development, emphasizing functional components, TypeScript, and specific best practices for R3F hooks and performance. It uses `function` keyword for pure functions and component declarations.

Inputs & outputs

You give it
React Three Fiber development task
You get back
React Three Fiber components following best practices and standards

When to use react-native-r3f

  • Building 3D React components
  • Implementing complex 3D scenes
  • Optimizing R3F performance

About this skill

React Native R3F (React Three Fiber)

You are an expert in React, Vite, Tailwind CSS, three.js, React Three Fiber, and Next UI.

Core Principles

  • Write concise, technical responses with accurate React examples
  • Employ functional, declarative programming paradigms; avoid class-based approaches
  • Prioritize iteration and modularity over code duplication
  • Use descriptive variable names incorporating auxiliary verbs (e.g., isLoading, hasError)
  • Directory naming: lowercase with dashes (e.g., components/auth-wizard)
  • Favor named exports for all components

JavaScript/TypeScript Standards

  • Use function keyword for pure functions; omit semicolons
  • TypeScript mandatory for all code; prefer interfaces over type aliases
  • Avoid enums; use maps instead
  • File organization: exported component -> subcomponents -> helpers -> static content -> types
  • Omit unnecessary braces in single-line conditionals

Error Handling

  • Address errors and edge cases at function entry points
  • Employ early returns for error conditions
  • Position happy path logic last for enhanced readability
  • Use guard clauses for preconditions and invalid states

React-Specific Practices

  • Functional components exclusively
  • Use function syntax, not const, for component declarations
  • Leverage Next UI and Tailwind CSS for styling
  • Implement responsive design throughout
  • Wrap client components in Suspense with fallbacks
  • Use dynamic loading for non-critical components
  • Return expected errors as values; avoid try/catch for anticipated errors
  • Implement error boundaries using error.tsx and global-error.tsx

React Three Fiber Best Practices

  • Use declarative 3D scene composition with React components
  • Leverage hooks like useFrame, useThree, useLoader for animations and scene access
  • Implement proper cleanup in useEffect for 3D resources
  • Use drei library helpers for common 3D patterns
  • Optimize performance with instancing for repeated geometries
  • Handle window resize and device pixel ratio appropriately

Example Component Structure

import { Canvas } from '@react-three/fiber'
import { OrbitControls, Environment } from '@react-three/drei'
import { Suspense } from 'react'

interface SceneProps {
  isAnimating: boolean
}

function Scene({ isAnimating }: SceneProps) {
  return (
    <Canvas>
      <Suspense fallback={null}>
        <ambientLight intensity={0.5} />
        <directionalLight position={[10, 10, 5]} />
        <mesh>
          <boxGeometry args={[1, 1, 1]} />
          <meshStandardMaterial color="orange" />
        </mesh>
        <OrbitControls />
        <Environment preset="studio" />
      </Suspense>
    </Canvas>
  )
}

export { Scene }

When not to use it

  • When class-based React components are required.
  • When type aliases are preferred over interfaces in TypeScript.

Limitations

  • The skill exclusively uses functional components.
  • The skill mandates TypeScript for all code.
  • The skill avoids enums, preferring maps instead.

How it compares

This skill enforces specific React and R3F best practices like functional components, TypeScript, and performance optimizations, unlike a generic approach that might not adhere to these standards.

Compared to similar skills

react-native-r3f side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
react-native-r3f (this skill)04moNo flagsAdvanced
rendering-animate-svg136moNo flagsBeginner
nextjs-developer3282moNo flagsAdvanced
frontend-developer273moNo flagsIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

rendering-animate-svg

TheOrcDev

Wrap animated SVG elements in a div to enable hardware acceleration. Apply when animating SVG icons or elements, especially in 8-bit retro components with pixel art animations.

1348

nextjs-developer

zenobi-us

Expert Next.js developer mastering Next.js 14+ with App Router and full-stack features. Specializes in server components, server actions, performance optimization, and production deployment with focus on building fast, SEO-friendly applications.

328531

frontend-developer

sickn33

Build React components, implement responsive layouts, and handle client-side state management. Masters React 19, Next.js 15, and modern frontend architecture. Optimizes performance and ensures accessibility. Use PROACTIVELY when creating UI components or fixing frontend issues.

2782

nextjs-app-router-patterns

wshobson

Master Next.js 14+ App Router with Server Components, streaming, parallel routes, and advanced data fetching. Use when building Next.js applications, implementing SSR/SSG, or optimizing React Server Components.

347

frontend-ui-dark-ts

microsoft

Build dark-themed React applications using Tailwind CSS with custom theming, glassmorphism effects, and Framer Motion animations. Use when creating dashboards, admin panels, or data-rich interfaces with a refined dark aesthetic.

430

router-query-integration

MadAppGang

Use when setting up route loaders or optimizing navigation performance. Integrates TanStack Router with TanStack Query for optimal data fetching. Covers route loaders with query prefetching, ensuring instant navigation, and eliminating request waterfalls.

14

Search skills

Search the agent skills registry