Agent skill

Unity Physics

by Besty0728 in Besty0728/Unity-Skills

Run Unity physics queries and configure physics. An agent skill from Besty0728/Unity-Skills.

MITAuto-check passedGame Development

Install Unity Physics

skills CLI
$ npx skills add Besty0728/Unity-Skills --skill unity-physics -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Besty0728/Unity-Skills unity-physics --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Besty0728/Unity-Skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/'SkillsForUnity/unity-skills~/skills/physics' .claude/skills/unity-physics && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
unity-physics
GitHub stars
1.8k
Token cost
~2.1k tokens
SKILL.md length
861 words
Files
1
Skills in repo
82
Repo updated
First seen
Licence
MIT

At a glance

Run Unity physics queries and configure physics. An agent skill from Besty0728/Unity-Skills.

  • Game Development work in your project
  • SKILL.md covers Triggers, Operating Mode, Skills and Minimal Example, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Unity Physics is an agent skill from Besty0728/Unity-Skills. Run Unity physics queries and configure physics

Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Game Development. The repository describes itself as: AI automation skills specifically designed for Unity. The licence is MIT.

When your agent uses it

  • Game Development work in your project

Example prompts

  • “/unity-physics”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit ec8aa7c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Unity Physics loads about 2.1k tokens when it runs. Until then it costs about 15 tokens; SKILL.md has 861 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~15
When it runs · the whole SKILL.md, loaded when a task matches
~2.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Besty0728/Unity-Skills at commit ec8aa7c, republished under its MIT licence (© Besty0728). 861 words, ~2,114 tokens.

Download SKILL.mdSave it as .claude/skills/unity-physics/SKILL.md (or your agent's skills folder).
name
unity-physics
description
Run Unity physics queries and configure physics

Before calling any skill in this module: if you are about to call a skill with parameters guessed from its name or description, STOP — read this file (or fetch its schema via GET /skills/recommend?includeSchema=true) first. If you already have the parameter definitions from recommend/schema, you may proceed straight to dryRun.

Triggers

  • Casting rays
  • Testing overlaps
  • Querying colliders
  • Adjusting gravity/physics settings
  • 发射射线、检测重叠、查询碰撞体、调整重力/物理设置

Physics Skills

Editor-time physics queries (raycast / overlap), gravity, PhysicMaterial assets, and layer collision matrix.

Operating Mode

  • Approval:查询类 skill(physics_raycast / physics_check_overlap / physics_get_gravity / physics_get_layer_collision 等,源码标 SkillMode.SemiAuto)直接执行;变更类(physics_set_gravity / physics_create_material / physics_set_material / physics_set_layer_collision,标 SkillMode.FullAuto)需用户 grant,grant 后服务端一步执行返结果。
  • Auto / Bypass:所有 skill 直接执行;Auto 走 AI 自我评估,Bypass 全放行。
  • 本模块不含 Delete / PlayMode / Reload / 高危 skill,无 Bypass-only 拦截项。
  • 注意:所有 skill 都在编辑器线程同步运行。真实物理模拟(积分、碰撞响应)仅在 Play mode 下推进;本模块只做单帧 query + 资产/全局设置写入,不会启动模拟。

DO NOT (common hallucinations):

  • physics_add_rigidbody / physics_add_collider do not exist → use component_add with componentType "Rigidbody"/"BoxCollider"/etc.
  • physics_simulate does not exist → physics simulation runs during Play mode; this module does not step the simulation
  • Raycast results use world-space coordinates

Routing:

  • For adding physics components → use component module
  • For physics material → use physics_create_material (this module)
  • For layer collision matrix → physics_set_layer_collision (this module)

Skills

physics_raycast

Cast a ray and get hit info. Parameters:

  • originX, originY, originZ (float): Origin point.
  • dirX, dirY, dirZ (float): Direction vector.
  • maxDistance (float, optional): Max distance (default 1000).
  • layerMask (int, optional): Layer mask (default -1).

Returns: { hit: true, collider: "Cube", distance: 5.2, ... }

physics_check_overlap

Check for colliders in a sphere. Parameters:

  • x, y, z (float): Center point.
  • radius (float): Sphere radius.
  • layerMask (int, optional): Layer mask.
physics_get_gravity

Get global gravity setting. Parameters: None.

physics_set_gravity

Set global gravity setting. Parameters:

  • x, y, z (float): Gravity vector (e.g. 0, -9.81, 0).
physics_raycast_all

Cast a ray and return ALL hits (penetrating).

ParameterTypeRequiredDefaultDescription
originXfloatYes-Ray origin X
originYfloatYes-Ray origin Y
originZfloatYes-Ray origin Z
dirXfloatYes-Direction X
dirYfloatYes-Direction Y
dirZfloatYes-Direction Z
maxDistancefloatNo1000Max ray distance
layerMaskintNo-1Layer mask filter

Returns: { count, hits: [{ objectName, instanceId, path, point, normal, distance }] }

physics_spherecast

Cast a sphere along a direction and get hit info.

ParameterTypeRequiredDefaultDescription
originXfloatYes-Origin X
originYfloatYes-Origin Y
originZfloatYes-Origin Z
dirXfloatYes-Direction X
dirYfloatYes-Direction Y
dirZfloatYes-Direction Z
radiusfloatYes-Sphere radius
maxDistancefloatNo1000Max cast distance
layerMaskintNo-1Layer mask filter

Returns: { hit, objectName, instanceId, point, distance }

physics_boxcast

Cast a box along a direction and get hit info.

ParameterTypeRequiredDefaultDescription
originXfloatYes-Origin X
originYfloatYes-Origin Y
originZfloatYes-Origin Z
dirXfloatYes-Direction X
dirYfloatYes-Direction Y
dirZfloatYes-Direction Z
halfExtentXfloatNo0.5Box half extent X
halfExtentYfloatNo0.5Box half extent Y
halfExtentZfloatNo0.5Box half extent Z
maxDistancefloatNo1000Max cast distance
layerMaskintNo-1Layer mask filter

Returns: { hit, objectName, instanceId, point, distance }

Show full SKILL.md (369 more words)Show less
physics_overlap_box

Check for colliders overlapping a box volume.

ParameterTypeRequiredDefaultDescription
xfloatYes-Box center X
yfloatYes-Box center Y
zfloatYes-Box center Z
halfExtentXfloatNo0.5Box half extent X
halfExtentYfloatNo0.5Box half extent Y
halfExtentZfloatNo0.5Box half extent Z
layerMaskintNo-1Layer mask filter

Returns: { count, colliders: [{ objectName, path, isTrigger }] }

physics_create_material

Create a PhysicMaterial asset.

ParameterTypeRequiredDefaultDescription
namestringNo"New PhysicMaterial"Material name
savePathstringNo"Assets"Save directory path
dynamicFrictionfloatNo0.6Dynamic friction value
staticFrictionfloatNo0.6Static friction value
bouncinessfloatNo0Bounciness value

Returns: { success, path }

physics_set_material

Set PhysicMaterial on a collider (supports name/instanceId/path).

ParameterTypeRequiredDefaultDescription
materialPathstringYes-Asset path of the PhysicMaterial
namestringNonullGameObject name
instanceIdintNo0GameObject instance ID
pathstringNonullGameObject hierarchy path

Returns: { success, gameObject, material, collider } — material is the resolved asset path read back from the collider, and collider is the collider component's type name (e.g. BoxCollider).

physics_get_layer_collision

Get whether two layers collide.

ParameterTypeRequiredDefaultDescription
layer1intYes-First layer index
layer2intYes-Second layer index

Returns: { layer1, layer2, collisionEnabled }

physics_set_layer_collision

Set whether two layers collide.

ParameterTypeRequiredDefaultDescription
layer1intYes-First layer index
layer2intYes-Second layer index
enableCollisionboolNotrueWhether to enable collision

Returns: { success, layer1, layer2, collisionEnabled }


Minimal Example

python
import unity_skills

# Raycast from position downward, check for hits
result = unity_skills.call_skill("physics_raycast",
    originX=0, originY=5, originZ=0,
    dirX=0, dirY=-1, dirZ=0,
    maxDistance=10
)
if result.get("hit"):
    print(f"Hit: {result['hitObjectName']} at distance {result['distance']}")

Exact Signatures

Exact names, parameters, defaults, and returns are defined by GET /skills/schema or unity_skills.get_skill_schema(), not by this file.

Common Errors

Full transport-level codes (COMPILING/RATE_LIMIT etc.) → ../../references/protocol-error-codes.md

ErrorTriggerFix
SEMANTIC_INVALIDAn invalid value was supplied, such as a zero direction vector, a name containing path separators, or an out-of-range parameter.Provide a non-zero direction, remove path separators from the material name, and clamp values to the valid range.
TARGET_NOT_FOUNDThe target GameObject has no Collider, or the requested PhysicMaterial asset could not be loaded.Add a collider via component_add or verify the material path with asset_find, then retry.
MISSING_PARAMA required parameter is missing, such as name in physics_create_material.Provide the parameter named in the error; use mode=dryRun for the schema.

© Besty0728, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in SkillsForUnity/unity-skills~/skills/physics of Besty0728/Unity-Skills.

Open the folder on GitHubat commit ec8aa7c

Compare with similar skills

Unity Physics next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Unity Physics compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Unity Physics this skillBesty0728/Unity-Skills1.8k—~2.1kAutomated safety check: PassMIT
Image to Three.js Modelimg2threejs/img2threejs18k1 repos~8.2kAutomated safety check: PassApache-2.0
Web CloneJane-xiaoer/claude-skill-web-clone1k2 repos~2.7kAutomated safety check: PassMIT
Threejs Game Directormajidmanzarpour/threejs-game-skills2.4k—~2.2kAutomated safety check: PassMIT
Game Asset Generatorhtdt/godogen7.1k—~2.8kAutomated safety check: PassMIT
Threejs Gameplay Systemsvalkor-ai/loom1.2k1 repos~1.4kAutomated safety check: PassApache-2.0

Similar skills

  • Image to Three.js Model

    img2threejs/img2threejs

    Rebuilds the object in a reference image as a procedural, animation-ready Three.js model written entirely in code, using staged sculpting with quality checks.

    18k GitHub starsUsed in 1 repo~8.2k tokens
    Game DevelopmentAuto-check passed
  • Web Clone

    Jane-xiaoer/claude-skill-web-clone

    网站复刻 / 克隆方法论。USE WHEN 用户说 复刻网站、克隆网站、clone website、抄个站、仿站、 照着这个站做一个、reproduce site、还原某个网页效果、把这个站搬下来改成我的、 复刻某个交互/WebGL/Canvas/Three.js 效果。提供「先拿真源码 → 判路径 → 逆向拆解 → 搭工程 → 替换内容」的可移植决策树,覆盖静态站 /…

    1k GitHub starsUsed in 2 repos~2.7k tokens
    Game DevelopmentAuto-check passed
  • Threejs Game Director

    majidmanzarpour/threejs-game-skills

    Entrypoint for building, upgrading, and finishing Three.js browser games.

    2.4k GitHub stars~2.2k tokensUpdated 10 days ago
    Game DevelopmentAuto-check passed
  • Generates game art from text prompts: PNG images, GLB 3D models, rigged characters, animations and sprites, with background removal.

    7.1k GitHub stars~2.8k tokensUpdated 6 days ago
    Game DevelopmentAuto-check passed
  • Build and iterate playable Three.js game systems: starter scaffold, architecture, design briefs, core loops, level and encounter design, entities, input, camera, collision and physics, scoring…

    1.2k GitHub starsUsed in 1 repo~1.4k tokens
    Game DevelopmentAuto-check passed
  • Uloop Execute Dynamic Code

    CyberAgentGameEntertainment/NovaShader

    Execute C with Unity APIs when existing uloop tools cannot inspect or edit enough.

    1.6k GitHub starsUsed in 1 repo~1.9k tokens
    Game DevelopmentAuto-check passed

More from Besty0728/Unity-Skills

All 82 skills in this repo
  • Unity Skills

    Besty0728/Unity-Skills

    Automate the Unity Editor through a local REST API — scripts, scenes, prefabs, assets, materials, lighting, tests and hundreds of other Editor operations.

    1.8k GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Unity Animator

    Besty0728/Unity-Skills

    Edit Unity Animator Controllers and drive runtime parameters

    1.8k GitHub stars~2.4k tokensUpdated today
    Auto-check passed
  • Unity Architecture

    Besty0728/Unity-Skills

    Advise on Unity gameplay and system architecture. An agent skill from Besty0728/Unity-Skills.

    1.8k GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Unity Batch

    Besty0728/Unity-Skills

    Unified batch and async-job orchestration. An agent skill from Besty0728/Unity-Skills.

    1.8k GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Unity Behavior

    Besty0728/Unity-Skills

    Drive Unity Behavior behavior graphs and blackboard variables

    1.8k GitHub stars~3k tokensUpdated today
    Auto-check passed
  • Unity Console

    Besty0728/Unity-Skills

    Capture and query the Unity Editor console. An agent skill from Besty0728/Unity-Skills.

    1.8k GitHub stars~1.8k tokensUpdated today
    Auto-check passed

Questions about Unity Physics

What does Unity Physics do?

Run Unity physics queries and configure physics. An agent skill from Besty0728/Unity-Skills. Unity Physics is an agent skill from Besty0728/Unity-Skills.

When should I use Unity Physics?

Unity Physics fits situations like: game Development work in your project.

How do I install Unity Physics in Claude Code?

Run `npx skills add Besty0728/Unity-Skills --skill unity-physics -a claude-code`. Or copy the skill folder (SkillsForUnity/unity-skills~/skills/physics in Besty0728/Unity-Skills) into .claude/skills/unity-physics in your project. Claude Code loads it when a task matches its description.

How do I install Unity Physics in Codex?

Run `npx skills add Besty0728/Unity-Skills --skill unity-physics -a codex`. Or copy the skill folder (SkillsForUnity/unity-skills~/skills/physics in Besty0728/Unity-Skills) into .agents/skills/unity-physics in your project. Codex loads it when a task matches its description.

Can I use Unity Physics in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Besty0728/Unity-Skills --skill unity-physics -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/unity-physics, .gemini/skills/unity-physics, .github/skills/unity-physics and .opencode/skills/unity-physics in your project.

What does Unity Physics need to run?

SKILL.md names no scripts, command-line tools or credentials: Unity Physics is instructions for the agent only. Our summary lists: Python 3.

Does Unity Physics access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Unity Physics safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Unity Physics use?

Unity Physics is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Unity Physics use?

About 2.1k tokens (SKILL.md is roughly 8.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Unity Physics?

Skills that share tags, products or a category with Unity Physics: Image to Three.js Model (img2threejs/img2threejs, 18k stars), Web Clone (Jane-xiaoer/claude-skill-web-clone, 1k stars), Threejs Game Director (majidmanzarpour/threejs-game-skills, 2.4k stars) and Game Asset Generator (htdt/godogen, 7.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Unity Physics?

Besty0728 (a GitHub user) maintains it in Besty0728/Unity-Skills, which has 1,815 GitHub stars. The repository holds 82 skills in this directory. The repository was last updated on October 7, 2026.

Source: Besty0728/Unity-Skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.