Unity YAML Skill
Use this skill to interact with Unity files. All operations must be performed using the unity-yaml CLI via bun.
CLI Usage
The CLI is located at ${CLAUDE_PLUGIN_ROOT}/unity-yaml/dist/cli.js. Always run it with bun.
Core Commands
- •List Hierarchy:
bun ${CLAUDE_PLUGIN_ROOT}/unity-yaml/dist/cli.js list <file_path>- •Lists all GameObjects and components in a file.
- •Find Object:
bun ${CLAUDE_PLUGIN_ROOT}/unity-yaml/dist/cli.js find <file_path> <pattern> [--exact]- •Searches for GameObjects by name.
- •Inspect:
bun ${CLAUDE_PLUGIN_ROOT}/unity-yaml/dist/cli.js inspect <file_path> [identifier] [--properties]- •Gets detailed information about a specific GameObject or the whole file.
- •Get Details:
bun ${CLAUDE_PLUGIN_ROOT}/unity-yaml/dist/cli.js get <file_path> <object_id>- •Retrieves raw YAML data for a specific object.
- •Edit Property:
bun ${CLAUDE_PLUGIN_ROOT}/unity-yaml/dist/cli.js edit <file_path> <object_name> <property> <value>- •Safely modifies a property value while preserving GUIDs.
- •Search Docs:
bun ${CLAUDE_PLUGIN_ROOT}/unity-yaml/dist/cli.js search-docs <query>- •Searches indexed Unity documentation.
- •Index Docs:
bun ${CLAUDE_PLUGIN_ROOT}/unity-yaml/dist/cli.js index-docs <path_to_docs>- •Indexes a directory of markdown files or Unity docs.
Workflow
- •Discovery: Use
listorfindto locate the GameObjects you need to work with. - •Inspection: Use
inspect --propertiesto understand the current state of components. - •Modification: Use
editto make changes. - •Verification: Re-run
inspectto confirm the change was applied correctly.
Safety Guidelines
- •Preserve GUIDs: Never manually edit the YAML in a way that risks GUID corruption. Use the
editcommand. - •Batching: While individual commands are safe, always verify state between multiple edits.
- •Paths: Ensure file paths are relative to the project root or absolute.