Threejs 3d sdk
Skill Sjika/threejs-3d-sdk/plugins/threejs-3d-sdk/skills/threejs-3d-sdk
Design, implement, audit, debug, optimize, and package business-neutral Three.js 3D modeling and drawing systems and reusable TypeScript SDKs. Use for scenes, render runtimes, viewers, editors, technical or data visualization, geometry, lines, labels, points, particles, animation, cameras, interaction, assets, textures, media, materials, lighting, shaders, post-processing, render targets, instancing, batching, WebGL, WebGPU, TSL, compute, XR, audio, DOM or SVG renderers, performance, disposal, recovery, or a project-specific 3D development proposal.From its SKILL.md
npx -y skills add Sjika/threejs-3d-sdk --skill threejs-3d-sdkAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 16 days oldThe repository was created 16 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
10.3 KB, ~1.9k tokens by cl100k_base, as published. Nobody here has run it
Three.js 3D SDK
Build the smallest professional 3D system that satisfies the measured scene. Keep reusable rendering mechanics free of product and domain semantics.
Start from evidence
- Read the nearest repository guidance and inspect the package manager, manifests, lockfile, build, tests, and installed
threerevision. - Trace the real path from input data or assets through scene construction, transient state, frame scheduling, rendering, interaction, and disposal.
- Run
node scripts/audit-three-project.mjs <project-root>for a fast lead map. Verify every reported lead in source; the script does not establish behavior. - Resolve APIs from the installed package exports and matching official Three.js documentation first. Then check release notes and the migration guide. Use format or platform specifications for interoperability claims and the owning library's documentation for optional dependencies. Never use a sharing article to establish an API signature.
- Read
references/coverage-index.md, then usereferences/capability-map.mdto route the request to the smallest correct capability set. - Read
references/scene-assessment.mdand produce a decision record before proposing architecture or editing production code.
Separate verified facts, assumptions, constraints, failed premises, and verification targets. Ask before expensive profiling, paid assets or services, external writes, deployment, or visible browser control unless already authorized.
Route capabilities quickly
Use this sequence for every task:
- Identify the observable result: render, model, load, animate, simulate, interact, edit, export, stream, diagnose, or recover.
- Select the default in
references/capability-map.md; escalate only when its stated trigger is present. - Open only the task-specific reference and live documentation for the installed revision.
- Implement one lifecycle-complete closure and retain typed access to the underlying Three.js objects.
- Run the validation listed for that capability plus the shared gates in
references/validation.md.
Do not load an optional library merely because it appears in the source notes. First prove the missing capability or measured bottleneck, then verify version compatibility, module side effects, worker/CSP requirements, bundle cost, license, disposal, and fallback.
Select the scene strategy
Choose from measured requirements, not fashion:
- Use on-demand rendering for mostly static scenes; use a continuous loop only for persistent animation, simulation, XR, or time-dependent shaders.
- Use ordinary meshes for independently changing objects,
InstancedMeshfor one geometry/material with many transforms, andBatchedMeshor merged geometry for compatible heterogeneous geometry. Preserve stable logical-id mappings for interaction. - Use
WebGLRendererfor mature WebGL 2 compatibility and existing GLSL orEffectComposerpipelines. TreatWebGPURenderer, node materials, and TSL as a separately verified architecture while the official guide calls the renderer experimental. - Prefer glTF 2.0 for runtime models. Treat geometry compression, texture compression, baking, LOD, streaming, and decoding as an offline/runtime asset pipeline with explicit compatibility tests.
- Add dynamic shadows, transparency, post-processing, high pixel ratio, GPU picking, spatial indexes, workers, or custom shaders only when the scene and evidence require their cost.
Use the matrices in references/scene-assessment.md for model viewer, editor, technical drawing, dense repeated geometry, streaming world, full-screen shader, and XR scenarios.
Freeze SDK boundaries
Read references/sdk-architecture.md before creating or changing reusable wrappers.
Keep these contracts explicit where applicable:
- renderer backend and capability contract;
- scene/world ownership and coordinate, unit, layer, and precision conventions;
- frame source, update phases, invalidation reasons, delta-time policy, and error behavior;
- asset request, progress, cancellation, cache key, decode, ownership, and release semantics;
- camera pose, controls, fit/framing, resize, and projection semantics;
- picking result, logical identity, hover/selection/drag gesture arbitration, and accessibility bridge;
- plugin identity, dependencies, order, setup, frame hooks, failure isolation, and reverse-order teardown;
- requested renderer, actual backend, capability/limit snapshot, asynchronous readiness, diagnostics, context/device-loss behavior, and quality degradation policy.
Keep product data and rules outside the SDK. Map them through project adapters into geometry, material, transform, visibility, identity, and interaction contracts. Never place project names, product vocabulary, or domain decisions in the global kernel.
Avoid a giant facade that mirrors all of Three.js. Expose the underlying Three.js objects as typed escape hatches, while owning only the lifecycle and guarantees the SDK declares.
Implement minimal closures
- Establish renderer, scene, camera, resize, frame scheduling, failure handling, and teardown first.
- Add one independently verifiable rendering closure at a time: geometry, asset, interaction, effect, streaming, or diagnostics.
- Keep immutable source data separate from transient interaction state and derived visual state.
- Batch writes, mark the matching buffer attributes dirty, recompute affected bounds, and update only changed instances or ranges.
- Use generation tokens or abort signals for asynchronous scene or asset replacement. Build into staging state and commit only the current generation.
- Track resource ownership at creation or acquisition time. Do not dispose a shared geometry, material, texture, render target, control, or renderer until its owning scope releases it.
- Remove listeners, observers, frame callbacks, timers, workers, GPU queries, controls, passes, render targets, resources, and DOM overlays symmetrically.
Read the task-specific references:
- Complete public-capability routing and live API resolution:
references/coverage-index.md - Fast routing across rendering, modeling, assets, animation, interaction, effects, editors, XR, debugging, and recovery:
references/capability-map.md - Renderer lifecycle, cameras, viewports, targets, readback, scene composition, and frame submission:
references/runtime-rendering.md - Geometry, curves, lines, text, sprites, helpers, measurements, and procedural work:
references/modeling-drawing.md - Clips, actions, mixers, skeletal animation, morph targets, skinning, and deformation:
references/animation-deformation.md - Camera, projection, controls, picking, gestures, and state-to-visual mapping:
references/interaction-camera.md - Models, loaders, color, PBR, lighting, shaders, effects, and backend migration:
references/assets-materials-effects.md - Image, compressed, data, array, 3D, depth, canvas, video, and external textures:
references/textures-data-media.md - Format selection, addon loaders and exporters, validation, and round trips:
references/extended-io.md - Points, particles, sprites, volume data, simulation, and GPU-driven drawing:
references/particles-volumes.md - WebGPU renderer, node materials, TSL, render pipelines, storage, compute, and readback:
references/webgpu-tsl-compute.md - XR, audio, CSS/SVG renderers, workers, OffscreenCanvas, and physics adapters:
references/platform-specialized.md - Draw-call strategy, LOD, scheduling, profiling, ownership, disposal, and recovery:
references/performance-lifecycle.md
Use the SDK starter
Create a clean TypeScript SDK package only after the contracts are decision-complete:
node scripts/scaffold-sdk.mjs <target-directory> --name <package-name> --three-range <project-three-range>
The script refuses non-empty targets and never overwrites files. The starter supplies a small runtime, render-driver boundary, coalesced frame scheduler, dependency-checked plugin registry, explicit disposable scope, pointer normalization, and WebGL diagnostics. Extend it in the target project; do not turn the global starter into a project-specific framework.
Verify at the changed boundary
Read references/validation.md. Record every applicable gate as PASS, FAIL, BLOCKED, NOT_RUN, or NOT_APPLICABLE with a reason.
At minimum:
- Run typecheck, lint, focused tests, direct package build, and the original failing path plus a nearby non-failing path.
- Render representative success, empty, loading, partial, error, resize, high-DPI, and cleanup states where applicable.
- For visual or interaction changes, compare rendered evidence with the approved design across required viewports and input methods.
- Measure CPU frame time, GPU frame time when available, input latency, draw calls, primitives, active resources, asset/decode time, and memory trend against the frozen budgets.
- Exercise repeated mount/unmount or scene replacement, cancellation, context loss/restoration, and degradation/rollback where applicable.
A lower-level pass never overrides a missing visual, integration, performance, compatibility, or lifecycle gate.
Deliver the development proposal
Lead with:
- recommended strategy and why it fits the measured scene;
- controlling evidence, assumptions, constraints, and explicit non-goals;
- renderer, scene, asset, interaction, extension, ownership, and diagnostics contracts;
- minimal verifiable implementation closures and dependency order;
- normal, edge, failure, compatibility, performance, visual, accessibility, and recovery acceptance;
- alternatives rejected with concrete tradeoffs;
- gate ledger, blockers, and decisions still required.
Use references/source-notes.md to rank source authority and trace pattern provenance. Recheck live official sources for consequential or drift-prone decisions.
What ships with it: 32 files
140.9 KB alongside SKILL.md, 12 of them executable
agents/
- openai.yaml300 B
assets/
- sdk-template/package.json556 B
- sdk-template/src/contracts.tsruns1.7 KB
- sdk-template/src/disposable-scope.tsruns1.6 KB
- sdk-template/src/extension-registry.tsruns1.8 KB
- sdk-template/src/frame-scheduler.tsruns2.6 KB
- sdk-template/src/index.tsruns668 B
- sdk-template/src/pointer.tsruns1.2 KB
- sdk-template/src/runtime.tsruns5.3 KB
- sdk-template/src/webgl-diagnostics.tsruns511 B
- sdk-template/src/webgl-driver.tsruns1.6 KB
- sdk-template/tests/sdk.test.mjsruns4.5 KB
- sdk-template/tsconfig.json462 B
references/
- animation-deformation.md5.6 KB
- assets-materials-effects.md7.8 KB
- capability-map.md12.2 KB
- coverage-index.md5.5 KB
- extended-io.md4.6 KB
- interaction-camera.md5.2 KB
- modeling-drawing.md4.9 KB
- particles-volumes.md4.7 KB
- performance-lifecycle.md5.4 KB
- platform-specialized.md5.9 KB
- runtime-rendering.md5.6 KB
- scene-assessment.md4.4 KB
- sdk-architecture.md6.5 KB
- source-notes.md11.6 KB
- textures-data-media.md5.2 KB
- validation.md4.4 KB
- webgpu-tsl-compute.md5.3 KB
scripts/
- audit-three-project.mjsruns8.8 KB
- scaffold-sdk.mjsruns4.2 KB
Gives 0 of the 12 instructions most performance cost skills give in ~1.9k tokens
Counted across 803 of the 1,058 authors here whose files we hold, read 2026-08-07
- Keep skill files under 500 lines or tokensin 82 of 803, across 16 files
- Use imperative form in instructionsin 80 of 803, across 9 files
- Draft assertions while test runs are in progressin 75 of 803, across 9 files
- Create two to three realistic test promptsin 74 of 803, across 9 files
- Write skill descriptions to be pushyin 72 of 803, across 7 files
- Save test cases to evals JSONin 72 of 803, across 6 files
- Ask questions about edge cases and input formatsin 72 of 803, across 7 files
- Save timing data immediately when runs completein 70 of 803, across 5 files
- Include all trigger conditions in the skill descriptionin 69 of 803, across 3 files
- Launch all test runs in a single turn or simultaneouslyin 69 of 803, across 3 files
- Capture intent before writing a skillin 67 of 803, across 1 file
- Import directly instead of barrel filesin 52 of 803, across 15 files
Said here and by no other author read
- build the smallest professional system
- keep rendering free of domain semantics
- inspect manifests and installed three revision
- trace input to disposal path
- resolve apis from installed package exports
- read coverage and capability maps
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.