# webphysics-avbd-engine

This skill helps wire a WebGPU physics engine into a project, including bodies, contacts, joints, springs, and render-state updates.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 460 installs · ★ 88
- Author: reason-machines
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/reason-machines/trending-skills/tree/HEAD/skills/webphysics-avbd-engine/SKILL.md
- Updated: 2026-10-09
- HTML: https://affpapa.org/en/nevibecode/skills/webphysics-avbd-engine

## What it does

The skill guides setup of `webphysics`, an experimental WebGPU engine for rigid and soft-body simulation. Its AVBD solver runs through GPU compute shaders and covers contacts, friction, joints, springs, sleeping, and diagnostics.

It maps the main pieces of the project: `PhysicsEngine.ts`, GPU code for broad and narrow collision phases, contact persistence, AVBD state, and the LBVH builder. An agent can use it to create a `GPUDevice`, initialize the engine, add bodies or constraints, step the simulation, and pass body transforms to a renderer.

The engine requires WebGPU in Chrome. It is a proof-of-concept rather than a production library.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill webphysics-avbd-engine -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/webphysics-avbd-engine/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/webphysics-avbd-engine/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill webphysics-avbd-engine -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/webphysics-avbd-engine/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill webphysics-avbd-engine -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/webphysics-avbd-engine/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install reason-machines/trending-skills webphysics-avbd-engine
```

2. **Manually: put the files in place**
- File: `.github/skills/webphysics-avbd-engine/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill webphysics-avbd-engine -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/reason-machines/trending-skills --path skills/webphysics-avbd-engine
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/webphysics-avbd-engine/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill webphysics-avbd-engine -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/reason-machines/trending-skills/tree/HEAD/skills/webphysics-avbd-engine/SKILL.md

## When to use it
- wire physics into a WebGPU project
- create rigid bodies with contact handling
- connect bodies with joints and springs
- feed simulated transforms into rendering
- configure an AVBD GPU solve

## Example prompts
- Set up `webphysics` in my WebGPU TypeScript project and add `PhysicsEngine.ts`.
- Create a static ground and falling boxes, then sync their transforms with `getBodyStates()`.
- Show how to configure contacts, distance joints, and springs for this simulation.

## Similar
- [babylonjs-engine](https://affpapa.org/en/nevibecode/skills/babylonjs-engine.md) — skill · 2500 installs
- [playcanvas-engine](https://affpapa.org/en/nevibecode/skills/playcanvas-engine.md) — skill · 2300 installs
- [web-shader-extractor](https://affpapa.org/en/nevibecode/skills/web-shader-extractor.md) — skill · 825 installs
- [threejs-gameplay-systems](https://affpapa.org/en/nevibecode/skills/threejs-gameplay-systems.md) — skill · 3300 installs
- [pixijs](https://affpapa.org/en/nevibecode/skills/pixijs.md) — skill · 6900 installs
- [pixijs-performance](https://affpapa.org/en/nevibecode/skills/pixijs-performance.md) — skill · 6000 installs

From the same set: [reason-machines/trending-skills](https://affpapa.org/en/nevibecode/by/reason-machines/trending-skills.md) — 186 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
