threejs-nextjs-skill

threejs-nextjs-skill is a skill for Claude Code, Codex from darellchua2/opencode-config-template. It costs 55 tokens per session (1,082 once invoked), scanned A, original, Apache-2.0.

A guidance skill for combining Three.js, a JavaScript 3D graphics library, with Next.js and React applications. It covers version differences, server-side rendering, WebGL, shader files, and related libraries.

In plain words
What is it for?
Use it when building or debugging 3D websites, interactive graphics, WebXR experiences, or React Three Fiber projects with Next.js.
Why use it?
It helps avoid integration problems such as browser-only 3D code running on the server, page hydration mismatches, bundling errors, and lost WebGL contexts.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions OpenCode.

Good fit Use it when building or debugging 3D websites, interactive graphics, WebXR experiences, or React Three Fiber projects with Next.js.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/darellchua2/opencode-config-template/threejs-nextjs-skill
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add darellchua2/opencode-config-template --skill threejs-nextjs-skill
Clone the repo
git clone --depth 1 https://github.com/darellchua2/opencode-config-template

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for threejs-nextjs-skill

README.md
[![agentmods](https://agentmods.dev/badge/skills/darellchua2/opencode-config-template/threejs-nextjs-skill/github.svg)](https://agentmods.dev/skills/darellchua2/opencode-config-template/threejs-nextjs-skill)
Your own site
<a href="https://agentmods.dev/skills/darellchua2/opencode-config-template/threejs-nextjs-skill"><img src="https://agentmods.dev/badge/skills/darellchua2/opencode-config-template/threejs-nextjs-skill/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for threejs-nextjs-skill

Your own site · 80×15
<a href="https://agentmods.dev/skills/darellchua2/opencode-config-template/threejs-nextjs-skill"><img src="https://agentmods.dev/badge/skills/darellchua2/opencode-config-template/threejs-nextjs-skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,082 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium MCP Rug Pull · line 837
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00055 $0.01082
Opus 5.5 $0.00022 $0.00433
Sonnet 5.5 $0.00011 $0.00216
Haiku 4.5 $0.00006 $0.00108

Measured 2mo ago against content hash 79e68d622620, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

threejs-nextjs-skill scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/threejs-nextjs-skill/SKILL.md · 37 lines

How it starts

The opening of the file, as written. The whole thing — 37 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Three.js + Next.js Integration Guidance

Provenance: built for the chronic friction of Three.js + Next.js App Router / React 19 — three.js ships 10–12 breaking releases/year, R3F v8/v9 is the React 18/19 split, drei lags three by months, and Next 16's default Turbopack breaks Webpack-era GLSL patterns.

CRITICAL: Version detection first (MANDATORY)

Never give version-specific code before confirming versions. Ask the user to run: npm ls three @react-three/fiber @react-three/drei @react-three/xr + grep -E 'three|react|next' package.json; or detect from files (package.json → npm ls → require('three').REVISION; monorepos: per-workspace). Generic architectural guidance (e.g. "use 'use client'") is safe without versions; concrete imports/JSX are not.

Version matrix (verified Jul 2026 — refresh with npm view <pkg> version before relying on it): three 0.185.1 (addons at three/addons/*; WebGPURenderer+TSL present) · @react-three/fiber 9.6.1 (v9 = React 19, v8 = React 18) · @react-three/drei 10.7.7 (stale, compatibility risk — uses three-stdlib; test before upgrading three past drei's tested range) · @react-three/xr 6.6.30 (v6 createXRStore() + <XR store>; v5 API entirely different) · next 16 (Turbopack default) · react 19 (StrictMode double-mounts → WebGL context loss in non-R3F code).

Version-sensitive areas: addons path (three/examples/jsm ≤0.155 → three/addons 0.156+) · WebGLRenderer vs WebGPURenderer not interchangeable · R3F v8/v9 JSX element mappings differ · GLSL via raw-loader = Webpack-only (≤Next 15), breaks under Turbopack · TSL replaces GLSL on the WebGPU path.

Pitfall catalog (identifier → one-line rule)

SSR: three-in-server-component — every file transitively importing three/@react-three/*/WebXR MUST start 'use client'; load via next/dynamic(..., { ssr: false }) · next-image-inside-drei-html — drei <Html> portals bypass Next's Image optimizer: use plain <img> inside <Html>, or hoist <Image> out of the scene. Hydration: hydration-mismatch-canvas — Canvas dimensions are runtime-computed; skip SSR or render a static placeholder · StrictMode double-mounts → guard context-loss listeners. Bundler (Turbopack): raw-loader GLSL imports fail — use ?.glsl type modules or inline template literals; Webpack-only config must be rewritten for Turbopack. Resource management: persistent-canvas-route-changes — unmount Canvas or lose WebGL state on route change · missing-dispose-memory-leak — imperative useThree()/raw Three objects need explicit .dispose() (JSX-created objects are managed by R3F); material clone leak: .clone() materials must be re-registered with the manager · line-not-disposed-in-overlay-cleanup (provenance: canvastekk-frontend-nextjs/LEARNINGS) — overlay THREE.Lines removed from the scene graph still hold GPU memory until geometry.dispose() + material dispose · perspectivecamera-cast-after-swap (same provenance) — raycaster must receive the CURRENT camera after any camera swap, never an init-time capture.

Read the full file on GitHub · 37 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago Changed · -863 lines 79e68d622620
  2. 3mo ago First seen · 900 lines · 55 tokens per session scan A d50376730b59

Subscribe to this mod's changes

threejs-nextjs-skill is a skill published in the GitHub repository darellchua2/opencode-config-template (6 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 55 tokens to every session and 1,082 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

threejs-nextjs-skill compared with skills from other repositories

threejs-nextjs-skill next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
threejs-nextjs-skilldarellchua2/opencode-config-templateSkill62mo agoApache-2.0A55Claude Code, Codex
build-ghost-appTryGhost/GhostSkill56ktodayMITA44Claude Code, Codex
material-ui-tailwindmui/material-uiSkill99ktodayMITA67Claude Code, Codex
fuzzy-rankingTanStack/tableSkill29kyesterdayMITA62Claude Code, Codex
r3f-best-practiceszebbern/claude-code-guideSkill4.7ktodayMITA74Claude Code, Codex
git-safetytamagui/tamaguiSkill14ktodayMITA42Claude Code
onchainkitalsk1992/CloddsBotSkill3.2k22d agoMITA24Claude Code, Codex