/smart
AI-powered scene queries, layout and auto-binding. AI 驱动的场景查询、布局与自动绑定。
$ npx -y skills add Besty0728/Unity-Skills --skill smart --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/smart
Context preview
The summary Claude sees to decide when to auto-load this skill.
AI-powered scene queries, layout and auto-binding. AI 驱动的场景查询、布局与自动绑定。
SKILL.md
smart.SKILL.mdname: unity-smart
description: AI-powered scene queries, layout and auto-binding. AI 驱动的场景查询、布局与自动绑定。
Triggers
- Querying scene objects by condition or proximity
- Auto-arranging objects
- Auto-wiring references
- 按条件或邻近关系查询场景对象、自动排布对象、自动连线引用
Unity Smart Skills
Operating Mode
- **Approval**:本模块 Mixed —— 只读查询 skill `smart_scene_query` / `smart_scene_query_spatial`(标 `ReadOnly = true`, `Mode = SkillMode.SemiAuto`)可直接执行;其余布局/绑定/变换类 skill (`smart_scene_layout` / `smart_reference_bind` / `smart_align_to_ground` / `smart_distribute` / `smart_snap_to_grid` / `smart_randomize_transform` / `smart_select_by_component`) 为 `SkillMode.FullAuto`,需用户 grant 单次执行返结果。
- **Auto / Bypass**:直接执行。
- **含 NeverInSemi 高危 skill**:`smart_replace_objects`(Operation.Modify|Delete,会替换并删除原对象)。该 skill 在 Approval/Auto 下返 `MODE_FORBIDDEN`,仅 Bypass 或 Allowlist 命中可调。
**DO NOT** (common hallucinations):
- `smart_create` / `smart_build` do not exist → smart skills are query/layout tools, not creation tools
- `smart_search` / `smart_query` do not exist → use `smart_scene_query` (component property filters) or `smart_scene_query_spatial` (spatial region filters)
- `smart_move` does not exist → use `smart_snap_to_grid` or `smart_align_to_ground`
**Routing**:
- For creating objects → use `gameobject` module
- For simple object search → use `gameobject_find` or `scene_find_objects`
- For complex scene queries (SQL-like) → `smart_scene_query` (this module)
Skills
smart_scene_query
Find objects based on component property values (SQL-like).
| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | `componentName` | string | Yes | - | Component type (Light, Camera, MeshRenderer) | | `propertyName` | string | Yes | - | Property to query (intensity, enabled, etc.) | | `op` | string | No | "==" | ==, !=, >, <, >=, <=, contains | | `value` | string | No | null | Value to compare | | `limit` | int | No | 50 | Max results | | `query` | string | No | null | Unsupported shorthand; if provided alone returns a guidance error |
**Example**:
# Find all lights with intensity > 2
call_skill("smart_scene_query", componentName="Light", propertyName="intensity", op=">", value="2")---
smart_scene_layout
Organize selected objects into a layout.
| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | `layoutType` | string | No | "Linear" | Linear, Grid, Circle, Arc | | `axis` | string | No | "X" | X, Y, Z, -X, -Y, -Z | | `spacing` | float | No | 2.0 | Space between items (or radius) | | `columns` | int | No | 3 | For Grid layout | | `arcAngle` | float | No | 180 | For Arc layout (degrees) | | `lookAtCenter` | bool | No | false | Rotate to face center |
**Example**:
# Arrange selected objects in a circle
call_skill("smart_scene_layout", layoutType="Circle", spacing=5)---
smart_reference_bind
Auto-fill a List/Array field with matching objects.
| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | `targetName` | string | Yes | - | Target GameObject | | `componentName` | string | Yes | - | Component on target | | `fieldName` | string | Yes | - | Field to fill | | `sourceTag` | string | No | null | Find by tag | | `sourceName` | string | No | null | Find by name contains | | `appendMode` | bool | No | false | Append instead of replace |
**Example**:
# Fill GameManager.spawns with all SpawnPoint tagged objects
call_skill("smart_reference_bind", targetName="GameManager", componentName="GameController", fieldName="spawns", sourceTag="SpawnPoint")---
`smart_scene_query_spatial`
Find objects within a sphere/box region, optionally filtered by component.
| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | `x` | float | Yes | - | Center X coordinate | | `y` | float | Yes | - | Center Y coordinate | | `z` | float | Yes | - | Center Z coordinate | | `radius` | float | No | 10 | Search sphere radius | | `componentFilter` | string | No | null | Only include objects with this component | | `limit` | int | No | 50 | Max results |
**Returns:** `{ success, count, center, radius, results }`
---
`smart_align_to_ground`
Raycast selected objects downward to align them to the ground. Requires objects selected in Hierarchy first.
| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | `maxDistance` | float | No | 100 | Maximum raycast distance | | `alignRotation` | bool | No | false | Align rotation to surface normal |
**Returns:** `{ success, aligned, total }`
---
`smart_distribute`
Evenly distribute selected objects between first and last positions. Requires at least 3 objects selected in Hierarchy first.
| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | `axis` | string | No | "X" | X, Y, Z, -X, -Y, -Z |
**Returns:** `{ success, distributed, axis }`
---
`smart_snap_to_grid`
Snap selected objects to a grid.
| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | `gridSize` | float | No | 1 | Grid cell size |
**Returns:** `{ success, snapped, gridSize }`
---
`smart_randomize_transform`
Randomize position/rotation/scale of selected objects within ranges.
| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | `posRange` | float | No | 0 | Position randomization range | | `rotRange` | float | No | 0 | Rotation randomization range (degrees) | | `scaleMin` | float | No | 1 | Minimum uniform scale | | `scaleMax` | float | No | 1 | Maximum uniform scale |
**Returns:** `{ success, randomized }`
---
`smart_replace_objects`
Replace selected objects with a prefab (preserving transforms)
Read more
name: unity-smart description: AI-powered scene queries, layout and auto-binding. AI 驱动的场景查询、布局与自动绑定。
Triggers
- Querying scene objects by condition or proximity
- Auto-arranging objects
- Auto-wiring references
- 按条件或邻近关系查询场景对象、自动排布对象、自动连线引用
Unity Smart Skills
Operating Mode
- **Approval**:本模块 Mixed —— 只读查询 skill `smart_scene_query` / `smart_scene_query_spatial`(标 `ReadOnly = true`, `Mode = SkillMode.SemiAuto`)可直接执行;其余布局/绑定/变换类 skill (`smart_scene_layout` / `smart_reference_bind` / `smart_align_to_ground` / `smart_distribute` / `smart_snap_to_grid` / `smart_randomize_transform` / `smart_select_by_component`) 为 `SkillMode.FullAuto`,需用户 grant 单次执行返结果。
- **Auto / Bypass**:直接执行。
- **含 NeverInSemi 高危 skill**:`smart_replace_objects`(Operation.Modify|Delete,会替换并删除原对象)。该 skill 在 Approval/Auto 下返 `MODE_FORBIDDEN`,仅 Bypass 或 Allowlist 命中可调。
**DO NOT** (common hallucinations):
- `smart_create` / `smart_build` do not exist → smart skills are query/layout tools, not creation tools
- `smart_search` / `smart_query` do not exist → use `smart_scene_query` (component property filters) or `smart_scene_query_spatial` (spatial region filters)
- `smart_move` does not exist → use `smart_snap_to_grid` or `smart_align_to_ground`
**Routing**:
- For creating objects → use `gameobject` module
- For simple object search → use `gameobject_find` or `scene_find_objects`
- For complex scene queries (SQL-like) → `smart_scene_query` (this module)
Skills
smart_scene_query
Find objects based on component property values (SQL-like).
| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | `componentName` | string | Yes | - | Component type (Light, Camera, MeshRenderer) | | `propertyName` | string | Yes | - | Property to query (intensity, enabled, etc.) | | `op` | string | No | "==" | ==, !=, >, <, >=, <=, contains | | `value` | string | No | null | Value to compare | | `limit` | int | No | 50 | Max results | | `query` | string | No | null | Unsupported shorthand; if provided alone returns a guidance error |
**Example**:
# Find all lights with intensity > 2
call_skill("smart_scene_query", componentName="Light", propertyName="intensity", op=">", value="2")---
smart_scene_layout
Organize selected objects into a layout.
| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | `layoutType` | string | No | "Linear" | Linear, Grid, Circle, Arc | | `axis` | string | No | "X" | X, Y, Z, -X, -Y, -Z | | `spacing` | float | No | 2.0 | Space between items (or radius) | | `columns` | int | No | 3 | For Grid layout | | `arcAngle` | float | No | 180 | For Arc layout (degrees) | | `lookAtCenter` | bool | No | false | Rotate to face center |
**Example**:
# Arrange selected objects in a circle
call_skill("smart_scene_layout", layoutType="Circle", spacing=5)---
smart_reference_bind
Auto-fill a List/Array field with matching objects.
| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | `targetName` | string | Yes | - | Target GameObject | | `componentName` | string | Yes | - | Component on target | | `fieldName` | string | Yes | - | Field to fill | | `sourceTag` | string | No | null | Find by tag | | `sourceName` | string | No | null | Find by name contains | | `appendMode` | bool | No | false | Append instead of replace |
**Example**:
# Fill GameManager.spawns with all SpawnPoint tagged objects
call_skill("smart_reference_bind", targetName="GameManager", componentName="GameController", fieldName="spawns", sourceTag="SpawnPoint")---
`smart_scene_query_spatial`
Find objects within a sphere/box region, optionally filtered by component.
| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | `x` | float | Yes | - | Center X coordinate | | `y` | float | Yes | - | Center Y coordinate | | `z` | float | Yes | - | Center Z coordinate | | `radius` | float | No | 10 | Search sphere radius | | `componentFilter` | string | No | null | Only include objects with this component | | `limit` | int | No | 50 | Max results |
**Returns:** `{ success, count, center, radius, results }`
---
`smart_align_to_ground`
Raycast selected objects downward to align them to the ground. Requires objects selected in Hierarchy first.
| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | `maxDistance` | float | No | 100 | Maximum raycast distance | | `alignRotation` | bool | No | false | Align rotation to surface normal |
**Returns:** `{ success, aligned, total }`
---
`smart_distribute`
Evenly distribute selected objects between first and last positions. Requires at least 3 objects selected in Hierarchy first.
| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | `axis` | string | No | "X" | X, Y, Z, -X, -Y, -Z |
**Returns:** `{ success, distributed, axis }`
---
`smart_snap_to_grid`
Snap selected objects to a grid.
| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | `gridSize` | float | No | 1 | Grid cell size |
**Returns:** `{ success, snapped, gridSize }`
---
`smart_randomize_transform`
Randomize position/rotation/scale of selected objects within ranges.
| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | `posRange` | float | No | 0 | Position randomization range | | `rotRange` | float | No | 0 | Rotation randomization range (degrees) | | `scaleMin` | float | No | 1 | Minimum uniform scale | | `scaleMax` | float | No | 1 | Maximum uniform scale |
**Returns:** `{ success, randomized }`
---
`smart_replace_objects`
Replace selected objects with a prefab (preserving transforms)
REST API-based AI-driven Unity Editor Automation Engine Let AI control Unity scenes directly through Skills 🎉 We are now indexed by DeepWiki! Got questions? Check out the AI-generated docs → The current official maintenance baseline is Unity 2022.3+.
Other skills on unity-skills.
- /addressables-design
Source-anchored design rules for Unity Addressables 1.22.3/2.9.1. 为 Unity Addressables 1.22.3/2.9.1 提供源码锚定的设计规则。
Open skill - /adr
Record Unity architecture decisions (ADR) with rationale. 记录 Unity 架构决策(ADR)与理由。
Open skill - /animator
Edit Unity Animator Controllers and drive runtime parameters. 编辑 Unity Animator Controller 并驱动运行时参数。
Open skill - /architecture
Advise on Unity gameplay and system architecture. 为 Unity 游戏与系统架构提供建议。
Open skill - /asmdef
Advise on Unity assembly definitions (asmdef). 为 Unity 程序集定义(asmdef)提供建议。
Open skill - /asset
Manage Unity AssetDatabase operations. 管理 Unity AssetDatabase 操作。
Open skill

