agentleFS
MindrallyMindrally/skills/three-js/SKILL.md

three-js

Skill275 starsChanged 35 days agoApache-2.0View on GitHub

Expert guidance for Three.js and React Three Fiber development with modern React, TypeScript, and performance best practices

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

20 rules. About 0 are common, 19 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈19

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Write concise, technical responses with accurate React examples

    line 15
  2. Distinctive:

    Use functional, declarative programming.

    line 16
  3. Distinctive:

    Prefer iteration and modularization over code duplication

    line 17
  4. Distinctive:

    Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasRendered)

    line 18
  5. Distinctive:

    Use lowercase with dashes for directories (e.g., components/auth-wizard)

    line 19
  6. Distinctive:

    Use "function" keyword for pure functions.

    line 24
  7. Distinctive:

    Use TypeScript for all code.

    line 25
  8. Distinctive:

    Avoid enums; use maps instead

    line 26
  9. Distinctive:

    Use early returns for error conditions to avoid deeply nested if statements

    line 32
  10. Distinctive:

    Place the happy path last in the function for improved readability

    line 33
  11. Distinctive:

    Use guard clauses to handle preconditions and invalid states early

    line 34
  12. Distinctive:

    Use functional components and interfaces

    line 40
  13. Distinctive:

    Use function, not const, for components

    line 42
  14. Distinctive:

    Use Next UI and Tailwind CSS for components and styling

    line 43
  15. Distinctive:

    Use dynamic loading for non-critical components

    line 48
  16. Distinctive:

    Use object pooling for frequently created/destroyed objects

    line 55
  17. Distinctive:

    Use appropriate texture sizes and formats

    line 60
  18. Distinctive:

    Use the useFrame hook for animations

    line 65
  19. Very specific:

    Use refs for direct Three.js object manipulation

    line 67
  20. Distinctive:

    Use drei library helpers for common 3D patterns

    line 69

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Three.js Development

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

Key Principles

  • Write concise, technical responses with accurate React examples
  • Use functional, declarative programming; avoid classes
  • Prefer iteration and modularization over code duplication
  • Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasRendered)
  • Use lowercase with dashes for directories (e.g., components/auth-wizard)
  • Favor named exports for components

JavaScript/TypeScript Standards

  • Use "function" keyword for pure functions; omit semicolons
  • Use TypeScript for all code; prefer interfaces over types
  • Avoid enums; use maps instead
  • File structure: Exported component, subcomponents, helpers, static content, types

Error Handling and Validation

  • Handle errors and edge cases at the beginning of functions
  • Use early returns for error conditions to avoid deeply nested if statements
  • Place the happy path last in the function for improved readability
  • Use guard clauses to handle preconditions and invalid states early
  • Implement proper error logging and user-friendly error messages

React Best Practices

Component Guidelines

  • Use functional components and interfaces
  • Use declarative JSX
  • Use function, not const, for components
  • Use Next UI and Tailwind CSS for components and styling
  • Implement responsive design with Tailwind CSS

Performance Optimization

  • Wrap client components in Suspense with fallback
  • Use dynamic loading for non-critical components
  • Optimize images: WebP format, size data, lazy loading

Three.js Specific Guidelines

Scene Management

  • Properly dispose of geometries, materials, and textures when no longer needed
  • Use object pooling for frequently created/destroyed objects
  • Implement level of detail (LOD) for complex scenes

Performance

  • Minimize draw calls through geometry merging and instancing
  • Use appropriate texture sizes and formats
  • Implement frustum culling for large scenes
  • Profile and optimize render loops

React Three Fiber

  • Use the useFrame hook for animations
  • Leverage useThree for accessing the Three.js context
  • Use refs for direct Three.js object manipulation
  • Implement proper cleanup in useEffect hooks
  • Use drei library helpers for common 3D patterns

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.