A comprehensive skill for learning physics engine concepts and implementations across multiple engines.
Helps users deeply understand physics simulation concepts and their implementations at the source code level. Designed for robotics researchers working on humanoid robots, whole-body control (WBC), reinforcement learning (RL), and Sim-to-Real transfer.
Trigger this skill when you want to:
- Learn about physics engine concepts (solvers, collision detection, constraints, integrators, etc.)
- Understand source code implementations in C++/CUDA/Python
- Compare implementations across different engines
- Deep dive into specific algorithms (GJK, EPA, PGS, LCP, ABA, CRBA)
- Connect theory to practice for robotics applications
Trigger phrases:
- "学习", "讲解", "理解", "explain", "teach me about" + physics topics
- "对比 Newton 和 MuJoCo 的求解器"
- "How does constraint solving work in PhysX?"
- "Show me the Jacobian mapping code in MuJoCo"
The skill covers the physics engine workspace at /home/fan/physics-engine:
- Newton — GPU-accelerated physics on NVIDIA Warp with MuJoCo Warp backend
- Genesis World — Unified multi-physics platform (rigid, FEM, MPM, SPH, PBD)
- MuJoCo — Google DeepMind's Multi-Joint dynamics with Contact (C/C++ core)
- MuJoCo Warp — GPU-accelerated MuJoCo for high-throughput parallel simulation
- Warp — NVIDIA Warp framework, foundation for Newton and MuJoCo Warp
- PhysX — NVIDIA's real-time physics SDK with ovphysx, Blast, Flow
- IsaacLab — External installation for RL environments
- Tailored for humanoid robotics researchers (29 DoF, 50Hz control loops)
- Prioritizes user's weak points: Jacobian mapping, LCP/PGS solvers, integrators
- Connects source code to practical scenarios (Sim-to-Real parameter tuning)
- Provides exact file paths with clickable links
- Shows line numbers for C/C++ implementations
- Extracts only critical 10-20 lines of code
- Explains math-to-code mapping explicitly
- Forward dynamics & free acceleration
- Collision detection (broad phase, narrow phase, GJK, EPA)
- Contact solving (Jacobian construction, PGS iteration, friction cone)
- Time integration (semi-implicit Euler, RK4)
- Sim-to-Real interfaces (domain randomization parameters)
- Side-by-side comparisons when needed
- Highlights design differences (soft contact vs hard constraint)
- Explains tradeoffs and use cases
Every explanation includes:
- ✅ Concise concepts (2-3 sentences)
- ✅ Clickable file links with line numbers
- ✅ Critical code snippets (10-20 lines)
- ✅ Design decisions (explains "why", not just "what")
- ✅ File index table for navigation
- ✅ Sim-to-Real connections when applicable
User: "讲解一下 MuJoCo 的接触求解器,特别是雅可比矩阵怎么映射的"
Skill output:
- Locates engine_solver.c with exact line numbers
- Shows Jacobian construction code (efc_J)
- Explains J_c^T * λ mapping from contact space to joint space
- Shows PGS iteration loop with friction cone projection
- Connects to Sim-to-Real: which parameters to tune for foot slip
- Provides file index with clickable links
This skill follows progressive disclosure principles:
physics-engine-tutor/
├── SKILL.md # Main skill (loaded when triggered)
├── README.md # This file
├── evals/
│ └── evals.json # Test cases for skill evaluation
├── references/ # Loaded on-demand
│ ├── topic-locations.md # Quick reference for finding topics
│ ├── explanation-templates.md # Templates for different explanation types
│ └── platform-compatibility.md # Cross-platform tool compatibility
└── scripts/ # Executable scripts (not loaded into context)
├── grade_evals.py # Grading script for evaluations
└── grade_eval_2.py # Additional grading utilities
- PhysX Solver Definitions — Fixed errors about TGS and PGS
- ✅ PGS = Projected Gauss-Seidel (not "Parallel")
- ✅ TGS = Temporal Gauss-Seidel (not "Time-step")
- Added comprehensive
references/physx-solvers.mdwith source code verification - All definitions verified against PhysX source code (PxSceneDesc.h, DySolverCore.cpp)
- MuJoCo Warp — GPU-accelerated MuJoCo implementation
- Warp — NVIDIA Warp framework and native kernels
- Enhanced C/C++ support — Better navigation for MuJoCo/PhysX source code
- PhysX Solver Comparison — Detailed PGS vs TGS technical comparison
- User context integration — Based on
learning_tutorial.mdguidance - Weak point focus — Prioritizes Jacobian mapping, PGS/TGS solver, integrator details
- Math-to-code mapping — Explicit connections between equations and implementations
- Line number precision — Exact locations for C/C++ code
- New workspace structure — Reflects current directory organization
- Enhanced topic locations — Added MuJoCo/PhysX/Warp source file references
- Learning path — Four-module progression from dynamics to Sim-to-Real
- PhysX reference — New comprehensive solver comparison document
Works across:
- Claude Code
- OpenAI Codex
- Gemini CLI
- Claude.ai
Tool names automatically adapt to platform conventions (see references/platform-compatibility.md).
- Concise and direct (no verbosity)
- All file paths are clickable links
- Mandatory file index table and design decisions
- Focus on "why" not just "what"
- Match user's language (Chinese/English)
- Provide exact line numbers for C/C++ code
- Show math-to-code mapping for key equations
Based on user feedback from iteration-1:
- ❌ Was too verbose → ✅ Now concise (2-3 sentences for concepts)
- ❌ Plain text file paths → ✅ Clickable markdown links
[file](path) - ❌ Missing file index → ✅ Required file index table
- ❌ Missing design rationale → ✅ Required design decisions section
- ❌ Large code dumps → ✅ Only 10-20 lines of critical code
- ❌ Scripts in workspace → ✅ Moved to
scripts/folder - ❌ No progressive disclosure → ✅ Organized into SKILL.md + references/
- ❌ Claude Code only → ✅ Cross-platform compatible
"我认为有点过于啰嗦,并且我需要对应文件的参考位置,以便于我直接点击到那个文件"
Translation: "I think it's too verbose, and I need clickable file reference locations so I can directly click to that file"
Solutions implemented:
- Mandatory conciseness requirements (2-3 sentences, 10-20 lines)
- ALL file paths must use
[filename](path)format for VSCode navigation - File index table is now REQUIRED
- Quality checklist enforces these requirements
Test cases in evals/evals.json verify:
- Conciseness (not verbose)
- Clickable file links (markdown format)
- File index table (required)
- Design decisions (required)
- Short code snippets (10-20 lines)
- Language matching (Chinese/English)
Run evaluations using the skill-creator workflow.
mujoco_skillkit— MuJoCo development and debuggingisaaclab-rl-skillkit— IsaacLab reinforcement learningmjlab-skillkit— mjlab project development
- Use the skill-creator workflow
- Run test cases from
evals/evals.json - Review outputs in the eval viewer
- Check benchmark results for pass rates
Located in scripts/:
grade_evals.py— Main grading scriptgrade_eval_2.py— Additional grading utilities
These scripts check assertions like:
- Conciseness
- Clickable links
- File index table presence
- Design decisions section
- Code snippet length
- Language matching
- Iteration 1: Initial version, 87.5% pass rate (21/24 assertions)
- Issues: Too verbose, plain text paths, missing file index
- User feedback: Need clickable links, less verbosity
- Version 2.0 (2026-05-31): Major update
- Added MuJoCo Warp, Warp, enhanced C/C++ support
- Integrated user context from learning_tutorial.md
- Enhanced weak point focus (Jacobian, PGS, integrators)
- Added math-to-code mapping examples
- Updated topic locations with C/C++ file references
When improving this skill:
- Keep SKILL.md under 300 lines
- Move detailed guidance to
references/ - Keep scripts in
scripts/(never load into context) - Test across platforms (Claude Code, Codex, Gemini)
- Run evaluations to verify improvements
- Update this README with changes
Last updated: 2026-05-31 Version: 2.0 (Major update with MuJoCo Warp, Warp, enhanced C/C++ support)
Part of the physics-engine workspace. See workspace CLAUDE.md for details.