physics-3d-collision — Claude Code skill: fixing Unity physics
A diagnostic skill for Unity PhysX: explains why collision and trigger callbacks stay silent, objects slip through each other, or a raycast misses.
npx skills add Unity-Technologies/skills --skill physics-3d-collision -a claude-codeWhat physics-3d-collision does
The skill covers the usual breakages in Unity 3D physics on MonoBehaviour. Collision and trigger callbacks never arrive, bodies tunnel through one another, a ray finds nothing, a MeshCollider acts up. You get a diagnosis instead of a tour of the project files.
It ships as a checklist of quick verdicts. One entry settles the two-kinematic-trigger case: the pairing is legal and does raise OnTriggerEnter, so the search moves to the layer collision matrix, where the script sits, and the method signature OnTriggerEnter(Collider other). Another handles a ragdoll that flies apart on frame one — overlapping colliders are the cause, so shrink them.
Scope is stated up front. Questions about 2D physics or DOTS/Unity Physics get a best-effort reply, not the main treatment. With the Editor connected, the skill edits the script itself rather than asking whether to go ahead. If no 2D or DOTS specialist is installed, expect the answer to carry that caveat.
What it helps with
- trace why two kinematic triggers never fire
OnTriggerEnter - stop objects from passing through each other
- fix a raycast that keeps missing its target
- calm a ragdoll that launches on the first frame
- check method signature and script placement when callbacks stay silent
Example prompts for the agent
- My objects pass through each other and
OnCollisionEnternever runs — what's wrong? - Two kinematic triggers aren't raising
OnTriggerEnter, check the setup - The ragdoll explodes on frame 1 with no forces applied, find the cause
How to install physics-3d-collision
1Skills CLI (Vercel)
npx skills add Unity-Technologies/skills --skill physics-3d-collision -a claude-code2Manually: put the files in place
~/.claude/skills/physics-3d-collision/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/physics-3d-collision/
1Skills CLI (Vercel)
npx skills add Unity-Technologies/skills --skill physics-3d-collision -a codex2Manually: put the files in place
.agents/skills/physics-3d-collision/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add Unity-Technologies/skills --skill physics-3d-collision -a cursor2Manually: put the files in place
.cursor/skills/physics-3d-collision/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install Unity-Technologies/skills physics-3d-collision2Manually: put the files in place
.github/skills/physics-3d-collision/SKILL.md1Skills CLI (Vercel)
npx skills add Unity-Technologies/skills --skill physics-3d-collision -a gemini-cli2Platform CLI
gemini skills install https://github.com/Unity-Technologies/skills --path skills/physics-3d-collisionManually: put the files in place
.devin/skills/physics-3d-collision/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add Unity-Technologies/skills --skill physics-3d-collision -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about physics-3d-collision
How do I install physics-3d-collision in Claude Code?
Run npx skills add Unity-Technologies/skills --skill physics-3d-collision -a claude-code. The skill lands in ~/.claude/skills/physics-3d-collision/SKILL.md.
What does physics-3d-collision do?
It diagnoses Unity PhysX collision and trigger trouble and returns the cause with a fix. Silent callbacks, tunneling bodies, missed raycasts and misbehaving MeshCollider all fall under it.
Does it cover 2D physics or DOTS?
Only on a best-effort basis, with a note that those are outside its main scope. A dedicated 2D or DOTS skill, if installed, should take the question instead.