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.
npx agentmods add skills/impertio-studio/three.js-claude-skill-package/threejs-impl-physicsnpx skills add Impertio-Studio/Three.js-Claude-Skill-Package --skill threejs-impl-physicsgit clone --depth 1 https://github.com/Impertio-Studio/Three.js-Claude-Skill-PackageWrote 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.
[](https://agentmods.dev/skills/impertio-studio/three.js-claude-skill-package/threejs-impl-physics)<a href="https://agentmods.dev/skills/impertio-studio/three.js-claude-skill-package/threejs-impl-physics"><img src="https://agentmods.dev/badge/skills/impertio-studio/three.js-claude-skill-package/threejs-impl-physics.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00107 | $0.03277 |
| Opus 5 | $0.00053 | $0.01639 |
| Sonnet 5 | $0.00021 | $0.00655 |
| Haiku 4.5 | $0.00011 | $0.00328 |
Grade A, and why
threejs-impl-physics 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 6d 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.
How it starts
The opening of the file, as written. The whole thing — 397 lines — stays where its author put it; the contents beside it link to each section on GitHub.
threejs-impl-physics
Quick Reference
Engine Selection Decision Tree
| Criterion | cannon-es | Rapier |
|---|---|---|
| Scene size | < 100 bodies | 100–10,000+ bodies |
| Determinism needed | No | Yes (cross-platform) |
| CCD (fast objects) | Limited | Full support |
| Bundle size budget | ~100 KB | ~300–600 KB (WASM) |
| Initialization | Synchronous | Async (MUST await init()) |
| Prototyping speed | Faster (simpler API) | Slower (builder pattern) |
| R3F integration | @react-three/cannon |
@react-three/rapier |
Rule: ALWAYS use Rapier for production applications requiring determinism, CCD, or > 100 bodies. Use cannon-es for prototyping and simple scenes.
Critical Warnings
NEVER forget to call world.step() in the animation loop — physics bodies will NOT move without it.
NEVER use mesh.position.copy(body.position) with Rapier — Rapier returns plain {x, y, z} objects, NOT CANNON.Vec3. ALWAYS use mesh.position.set(pos.x, pos.y, pos.z).
NEVER use Rapier APIs before await RAPIER.init() completes — ALL Rapier classes are undefined until WASM loads.
NEVER use Trimesh / trimesh colliders on dynamic bodies — triangle meshes are STATIC only in both engines. Use ConvexPolyhedron / convexHull for dynamic concave geometry.
NEVER create physics bodies without corresponding Three.js meshes unless intentionally creating invisible colliders — orphaned bodies waste simulation budget.
cannon-es
World Setup
import * as CANNON from 'cannon-es';
const world = new CANNON.World();
world.gravity.set(0, -9.82, 0);
world.broadphase = new CANNON.SAPBroadphase(world);
world.solver.iterations = 10;
world.allowSleep = true;
ALWAYS set world.allowSleep = true — sleeping bodies skip simulation and dramatically improve performance.
ALWAYS use SAPBroadphase for scenes with > 20 bodies. NaiveBroadphase is O(n^2).
Body Types
| Type | Mass | Behavior |
|---|---|---|
CANNON.Body.DYNAMIC |
> 0 | Affected by forces and collisions |
CANNON.Body.STATIC |
0 | Immovable, infinite mass |
CANNON.Body.KINEMATIC |
0 | Moved programmatically, pushes dynamic bodies |
What ships with it
4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 6d ago First seen · 397 lines · 107 tokens per session scan A aac5193dad33
threejs-impl-physics is a skill published in the GitHub repository Impertio-Studio/Three.js-Claude-Skill-Package (11 stars, last pushed 1mo ago), licensed MIT. It adds 107 tokens to every session and 3,277 once invoked, about $0.0005 per session on Opus 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-08-30.
Other skills, from other repositories
unreal-mcp
Automate Unreal Engine editor scenes, actors, and renders.
sceneview-web
Build 3D and WebXR (AR/VR) experiences in the browser with SceneView for Web — Filament.js (WebGL2/WASM) wrapped in a Kotlin/JS DSL and a plain-JavaScript API on window.sceneview. Use whenever the user asks for "3D in the browser", "a web model viewer", "WebXR AR/VR", or any browser 3D/AR app where the dependency is…
sceneview
Build 3D and AR apps with the SceneView SDK in Jetpack Compose, SwiftUI (iOS/macOS/visionOS via SceneViewSwift), Web (Filament.js), Flutter and React Native. Use whenever the user asks for "3D in Compose", "AR with ARCore in Compose", a model viewer, or any cross-platform 3D/AR app where the dependency is…
hz-unity-meta-mixed-reality-utility-kit
Meta XR Mixed Reality Utility Kit (MRUK) (com.meta.xr.mrutilitykit) for Unity XR development. Use when working with Scene API data (rooms, walls, floors, furniture), spawning prefabs on scene anchors, placing virtual objects in the real world, world locking to prevent anchor drift, raycasting against room geometry…
hz-vr-debug
Debugs Meta Quest and Horizon OS VR/MR applications using the metavr CLI — view logs, capture screenshots, diagnose common issues. Use when troubleshooting crashes, errors, or unexpected behavior on Quest devices.
reversing-unity-il2cpp
Reverse engineer Unity games and apps built with IL2CPP or Mono, using Il2CppDumper, Il2CppInspector, and dnSpy. Use when an APK or IPA contains global-metadata.dat, libil2cpp.so, UnityFramework, or Assembly-CSharp.dll, when jadx shows only UnityPlayerActivity, or when the target is described as a Unity build.