[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6KGXGHBA61PWF3ZGPBASE80":3,"skill-same:01M6KGXGHBA61PWF3ZGPBASE80":78},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":56,"commitSha":57,"skillDirectory":58,"forksCount":59,"repositoryHtmlUrl":60,"repositoryHomepageUrl":6,"ownerHtmlUrl":61,"ownerBlogUrl":6,"ownerDescription":62,"updatedAt":63,"install":64,"resources":77},"01M6KGXGHBA61PWF3ZGPBASE80","unity-script",null,"C# script CRUD and analysis — create, read, replace, append, search, rename, move, delete Unity scripts and surface compile feedback \u002F Domain Reload state. Triggers: script, C# code, csharp, MonoBehaviour, ScriptableObject, Editor, EditorWindow, namespace, class, create script, read script, write code, edit script, replace text, find in scripts, regex search, rename script, move script, append code, delete script, batch create, compile feedback, compile errors, Domain Reload, code generation, code template, script_create, script_create_batch, script_replace, script_append, script_read, script_rename, script_move, script_delete, script_get_compile_feedback, 脚本, C# 代码, 创建脚本, 批量创建, 读取脚本, 修改脚本, 替换脚本, 查找替换, 搜索脚本, 重命名脚本, 移动脚本, 追加代码, 删除脚本, 编写代码, 生成脚本, 代码模板, 编译反馈, 编译错误, 域重载, 重编译.","dyCuong03\u002Funity-agent-team","dyCuong03","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F137050365?v=4","01M6KFXC85HQHXZJC2VC1KY6EZ","CuongND","01M6KFXCCHP6CD5MTA8NECJC36",8,"MIT","https:\u002F\u002Fgithub.com\u002FdyCuong03\u002Funity-agent-team\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Funity-skills\u002Fskills\u002Fscript\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"unity script","script","unity","read","at","errors","move","scripts","get","write","create","text","template","crud","analysis","server","batch","search","code","delete","2026-11-10 10:12:30",false,"---\nname: unity-script\ndescription: \"C# script CRUD and analysis — create, read, replace, append, search, rename, move, delete Unity scripts and surface compile feedback \u002F Domain Reload state. Triggers: script, C# code, csharp, MonoBehaviour, ScriptableObject, Editor, EditorWindow, namespace, class, create script, read script, write code, edit script, replace text, find in scripts, regex search, rename script, move script, append code, delete script, batch create, compile feedback, compile errors, Domain Reload, code generation, code template, script_create, script_create_batch, script_replace, script_append, script_read, script_rename, script_move, script_delete, script_get_compile_feedback, 脚本, C# 代码, 创建脚本, 批量创建, 读取脚本, 修改脚本, 替换脚本, 查找替换, 搜索脚本, 重命名脚本, 移动脚本, 追加代码, 删除脚本, 编写代码, 生成脚本, 代码模板, 编译反馈, 编译错误, 域重载, 重编译.\"\nplatforms: [unity-editor, claude-code]\ntask-categories: [scripting, editor-automation]\nuse-when: |-\n  Load when the task requires: C# script CRUD and analysis — create, read, replace, append, search, rename, move, delete Unity scripts and surface compile feedback \u002F Domain Reload state. Unity Editor must be running with the unity-skills REST server reachable at http:\u002F\u002Flocalhost:8090.\ndo-not-use-when: |-\n  Do not load when Unity Editor is not running locally. Do not load when unity-skills REST server is unreachable at http:\u002F\u002Flocalhost:8090.\nmetadata:\n  source: https:\u002F\u002Fgithub.com\u002FBesty0728\u002FUnity-Skills\n  version: 1.9.2\n  tier: 2\n\n---\n\n# Unity Script Skills\n\n> **BATCH-FIRST**: Use `script_create_batch` when creating 2+ scripts.\n> **DESIGN-FIRST**: Before creating gameplay scripts, actively consider coupling, performance, and maintainability. In an existing project, load `..\u002Fproject-scout\u002FSKILL.md` first. If the user is asking for architecture or refactoring advice, load `..\u002Farchitecture\u002FSKILL.md` and then `..\u002Fpatterns\u002FSKILL.md`, `..\u002Fasync\u002FSKILL.md`, `..\u002Finspector\u002FSKILL.md`, `..\u002Fperformance\u002FSKILL.md`, `..\u002Fscript-roles\u002FSKILL.md`, `..\u002Fscene-contracts\u002FSKILL.md`, `..\u002Ftestability\u002FSKILL.md`, or `..\u002Fscriptdesign\u002FSKILL.md` as needed.\n\n## Operating Mode\n\n- **Approval**(默认): 只读类 skill（`script_read` \u002F `script_list` \u002F `script_find_in_file` \u002F `script_get_info` \u002F `script_get_compile_feedback`，标 `SkillMode.SemiAuto`）直接执行；写型 skill（`script_create` \u002F `script_create_batch` \u002F `script_replace` \u002F `script_append` \u002F `script_rename` \u002F `script_move` \u002F `script_delete`，默认 `SkillMode.FullAuto`）需用户 grant，grant 后服务端一步执行返结果。\n- **Auto \u002F Bypass**: 直接执行。\n- **本模块含 Delete \u002F Reload 类高危 skill**：`script_create` \u002F `script_create_batch` \u002F `script_replace` \u002F `script_append` \u002F `script_delete` 会触发 Domain Reload（且多标 `RiskLevel=high`），`script_delete` 同时是 Delete 操作 —— 这些 skill 在 Approval \u002F Auto 下被 `IsForbiddenInSemi` 自动拦截，**仅 Bypass 或 Allowlist 命中可执行**。\n\n**DO NOT** (common hallucinations):\n- `script_edit` \u002F `script_update` do not exist → use `script_replace` for find-and-replace\n- `script_write` does not exist → use `script_create` (new file) or `script_replace` (modify existing)\n- `scriptName` parameter must NOT include `.cs` extension\n- Templates only accept: MonoBehaviour, ScriptableObject, Editor, EditorWindow\n\n**Routing**:\n- To modify existing script content → `script_replace` (find\u002Freplace) or `script_append` (add lines)\n- To read script → `script_read`\n- To check compile errors → `script_get_compile_feedback`\n- To analyze script API → use `perception` module's `script_analyze`\n\n## Skills Overview\n\n| Single Object | Batch Version | Use Batch When |\n|---------------|---------------|----------------|\n| `script_create` | `script_create_batch` | Creating 2+ scripts |\n\n**No batch needed**:\n- `script_read` - Read script content\n- `script_delete` - Delete script\n- `script_find_in_file` - Search in scripts\n- `script_append` - Append content to script\n- `script_get_compile_feedback` - Check compile errors for one script after Unity finishes compiling\n- `create_script()` in `scripts\u002Funity_skills.py` now waits for Unity to come back once and refreshes compile feedback automatically after script creation.\n\n---\n\n## Skills\n\n### script_create\nCreate a C# script from template.\n\n| Parameter | Type | Required | Default | Description |\n|-----------|------|----------|---------|-------------|\n| `scriptName` | string | Yes | - | Script class name |\n| `folder` | string | No | \"Assets\u002FScripts\" | Save folder |\n| `template` | string | No | \"MonoBehaviour\" | Template type |\n| `namespaceName` | string | No | null | Optional namespace |\n\n**Templates**: MonoBehaviour, ScriptableObject, Editor, EditorWindow\n\n**Returns**: `{success, status, path, jobId, className, namespaceName, designReminder, serverAvailability?}`\n\nPoll the returned `jobId` (or call `script_get_compile_feedback`) to obtain compile diagnostics — they are not embedded in the synchronous response. `serverAvailability` carries the transient-unavailable hint when Unity is about to reload the script domain.\n\n### script_create_batch\nCreate multiple scripts in one call.\n\n**Returns**: `{success, totalItems, successCount, failCount, results: [{success, path, className}], compilation?}`\n\nBefore batch creation, decide whether each script should be:\n- a thin `MonoBehaviour` bridge\n- a `ScriptableObject` configuration asset\n- or a plain C# domain\u002Fservice class generated from a custom template\n\n```python\nunity_skills.call_skill(\"script_create_batch\", items=[\n    {\"scriptName\": \"PlayerController\", \"folder\": \"Assets\u002FScripts\u002FPlayer\", \"template\": \"MonoBehaviour\"},\n    {\"scriptName\": \"EnemyAI\", \"folder\": \"Assets\u002FScripts\u002FEnemy\", \"template\": \"MonoBehaviour\"},\n    {\"scriptName\": \"GameSettings\", \"folder\": \"Assets\u002FScripts\u002FData\", \"template\": \"ScriptableObject\"}\n])\n```\n\n### script_read\nRead script content.\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `scriptPath` | string | Yes | Script asset path |\n\n**Returns**: `{path, lines, content}`\n\n### script_delete\nDelete a script.\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `scriptPath` | string | Yes | Script to delete |\n\n**Returns**: `{success, status, deleted, jobId, serverAvailability?}`\n\n### script_find_in_file\nSearch for patterns in scripts.\n\n| Parameter | Type | Required | Default | Description |\n|-----------|------|----------|---------|-------------|\n| `pattern` | string | Yes | - | Search pattern |\n| `folder` | string | No | \"Assets\" | Search folder |\n| `isRegex` | bool | No | false | Use regex |\n| `limit` | int | No | 50 | Max results |\n\n**Returns**: `{pattern, matchCount, matches: [{file, line, content}]}`\n\n### script_append\nAppend content to a script.\n\n| Parameter | Type | Required | Default | Description |\n|-----------|------|----------|---------|-------------|\n| `scriptPath` | string | Yes | - | Script path |\n| `content` | string | Yes | - | Content to append |\n| `atLine` | int | No | end | Line number to insert at |\n\n### script_get_compile_feedback\nGet compile diagnostics related to one script.\n\n| Parameter | Type | Required | Default | Description |\n|-----------|------|----------|---------|-------------|\n| `scriptPath` | string | Yes | - | Script path |\n| `limit` | int | No | 20 | Max diagnostics |\n\n---\n\n## Example: Efficient Script Setup\n\n```python\nimport unity_skills\n\n# BAD: 3 API calls + 3 Domain Reloads\nunity_skills.call_skill(\"script_create\", scriptName=\"PlayerController\", folder=\"Assets\u002FScripts\u002FPlayer\")\n# Wait for Domain Reload...\nunity_skills.call_skill(\"script_create\", scriptName=\"EnemyAI\", folder=\"Assets\u002FScripts\u002FEnemy\")\n# Wait for Domain Reload...\nunity_skills.call_skill(\"script_create\", scriptName=\"GameManager\", folder=\"Assets\u002FScripts\u002FCore\")\n# Wait for Domain Reload...\n\n# GOOD: 1 API call + 1 Domain Reload\nunity_skills.call_skill(\"script_create_batch\", items=[\n    {\"scriptName\": \"PlayerController\", \"folder\": \"Assets\u002FScripts\u002FPlayer\"},\n    {\"scriptName\": \"EnemyAI\", \"folder\": \"Assets\u002FScripts\u002FEnemy\"},\n    {\"scriptName\": \"GameManager\", \"folder\": \"Assets\u002FScripts\u002FCore\"}\n])\n# Wait for Domain Reload once...\n```\n\n## Important: Domain Reload And Compile Feedback\n\nAfter creating or editing scripts, Unity triggers a Domain Reload (recompilation). Use the returned `compilation` field first. If `isCompiling=true`, wait for Unity to finish and then call `script_get_compile_feedback`.\n\n```python\nimport time\n\nresult = unity_skills.call_skill(\"script_create\", scriptName=\"MyScript\")\ntime.sleep(5)  # Wait for Unity to recompile if result[\"compilation\"][\"isCompiling\"] is true\nfeedback = unity_skills.call_skill(\"script_get_compile_feedback\", scriptPath=result[\"path\"])\nunity_skills.call_skill(\"component_add\", name=\"Player\", componentType=\"MyScript\")\n```\n\n## Best Practices\n\n1. Use meaningful script names matching class name\n2. Organize scripts in logical folders\n3. Before creating gameplay code, decide the class role first: MonoBehaviour, ScriptableObject, or plain C# helper\u002Fservice\n4. Actively reduce coupling: prefer explicit dependencies, small responsibilities, and event-driven notifications over hidden globals\n5. Actively consider performance: avoid unnecessary `Update`, repeated `Find`, reflection in hot paths, and avoidable allocations\n6. Actively consider maintainability: clear naming, explicit ownership, Inspector-friendly fields, and simple module boundaries\n7. Avoid giant boilerplate\u002Ftemplate dumps. Start from the smallest structure that solves the current need\n8. Do not default to UniTask or a global event bus unless the project context justifies them\n9. Avoid cryptic abbreviations in class, field, and method names unless they are already a project convention\n10. Use templates for correct base class\n11. Wait for compilation after creating scripts\n12. After script edits, call `script_get_compile_feedback` and fix reported errors\n13. Use regex search for complex patterns\n14. **Use batch creation to minimize Domain Reloads**\n\n---\n\n## Additional Skills\n\n### `script_replace`\nFind and replace content in a script file.\n\n| Parameter | Type | Required | Default | Description |\n|-----------|------|----------|---------|-------------|\n| `scriptPath` | string | Yes | - | Script asset path |\n| `find` | string | Yes | - | Text or pattern to find |\n| `replace` | string | Yes | - | Replacement text |\n| `isRegex` | bool | No | false | Use regex matching |\n| `checkCompile` | bool | No | true | Check compilation after replace |\n| `diagnosticLimit` | int | No | 20 | Max compile diagnostics |\n\n**Returns:** `{ success, status, path, jobId, replacements, serverAvailability? }`\n\n### `script_list`\nList C# script files in the project.\n\n| Parameter | Type | Required | Default | Description |\n|-----------|------|----------|---------|-------------|\n| `folder` | string | No | \"Assets\" | Folder to search in |\n| `filter` | string | No | null | Filter string for path matching |\n| `limit` | int | No | 100 | Max results |\n\n**Returns:** `{ count, scripts: [{ path, name }] }`\n\n### `script_get_info`\nGet script info (class name, base class, methods).\n\n| Parameter | Type | Required | Default | Description |\n|-----------|------|----------|---------|-------------|\n| `scriptPath` | string | Yes | - | Script asset path |\n\n**Returns:** `{ path, className, baseClass, namespaceName, isMonoBehaviour, publicMethods, publicFields }`\n\n### `script_rename`\nRename a script file.\n\n| Parameter | Type | Required | Default | Description |\n|-----------|------|----------|---------|-------------|\n| `scriptPath` | string | Yes | - | Script asset path |\n| `newName` | string | Yes | - | New script name (without extension) |\n| `checkCompile` | bool | No | true | Check compilation after rename |\n| `diagnosticLimit` | int | No | 20 | Max compile diagnostics |\n\n**Returns:** `{ success, status, path, jobId, oldPath, newName, serverAvailability? }`\n\n### `script_move`\nMove a script to a new folder.\n\n| Parameter | Type | Required | Default | Description |\n|-----------|------|----------|---------|-------------|\n| `scriptPath` | string | Yes | - | Script asset path |\n| `newFolder` | string | Yes | - | Destination folder. Must already exist. |\n| `checkCompile` | bool | No | true | Check compilation after move |\n| `diagnosticLimit` | int | No | 20 | Max compile diagnostics |\n\n**Returns:** `{ success, status, path, jobId, oldPath, newPath, serverAvailability? }`\n\n---\n## Exact Signatures\n\nExact names, parameters, defaults, and returns are defined by `GET \u002Fskills\u002Fschema` or `unity_skills.get_skill_schema()`, not by this file.\n","# Unity Script Skills\n\n> **BATCH-FIRST**: Use `script_create_batch` when creating 2+ scripts.\n> **DESIGN-FIRST**: Before creating gameplay scripts, actively consider coupling, performance, and maintainability. In an existing project, load `..\u002Fproject-scout\u002FSKILL.md` first. If the user is asking for architecture or refactoring advice, load `..\u002Farchitecture\u002FSKILL.md` and then `..\u002Fpatterns\u002FSKILL.md`, `..\u002Fasync\u002FSKILL.md`, `..\u002Finspector\u002FSKILL.md`, `..\u002Fperformance\u002FSKILL.md`, `..\u002Fscript-roles\u002FSKILL.md`, `..\u002Fscene-contracts\u002FSKILL.md`, `..\u002Ftestability\u002FSKILL.md`, or `..\u002Fscriptdesign\u002FSKILL.md` as needed.\n\n## Operating Mode\n\n- **Approval**(默认): 只读类 skill（`script_read` \u002F `script_list` \u002F `script_find_in_file` \u002F `script_get_info` \u002F `script_get_compile_feedback`，标 `SkillMode.SemiAuto`）直接执行；写型 skill（`script_create` \u002F `script_create_batch` \u002F `script_replace` \u002F `script_append` \u002F `script_rename` \u002F `script_move` \u002F `script_delete`，默认 `SkillMode.FullAuto`）需用户 grant，grant 后服务端一步执行返结果。\n- **Auto \u002F Bypass**: 直接执行。\n- **本模块含 Delete \u002F Reload 类高危 skill**：`script_create` \u002F `script_create_batch` \u002F `script_replace` \u002F `script_append` \u002F `script_delete` 会触发 Domain Reload（且多标 `RiskLevel=high`），`script_delete` 同时是 Delete 操作 —— 这些 skill 在 Approval \u002F Auto 下被 `IsForbiddenInSemi` 自动拦截，**仅 Bypass 或 Allowlist 命中可执行**。\n\n**DO NOT** (common hallucinations):\n- `script_edit` \u002F `script_update` do not exist → use `script_replace` for find-and-replace\n- `script_write` does not exist → use `script_create` (new file) or `script_replace` (modify existing)\n- `scriptName` parameter must NOT include `.cs` extension\n- Templates only accept: MonoBehaviour, ScriptableObject, Editor, EditorWindow\n\n**Routing**:\n- To modify existing script content → `script_replace` (find\u002Freplace) or `script_append` (add lines)\n- To read script → `script_read`\n- To check compile errors → `script_get_compile_feedback`\n- To analyze script API → use `perception` module's `script_analyze`\n\n## Skills Overview\n\n| Single Object | Batch Version | Use Batch When |\n|---------------|---------------|----------------|\n| `script_create` | `script_create_batch` | Creating 2+ scripts |\n\n**No batch needed**:\n- `script_read` - Read script content\n- `script_delete` - Delete script\n- `script_find_in_file` - Search in scripts\n- `script_append` - Append content to script\n- `script_get_compile_feedback` - Check compile errors for one script after Unity finishes compiling\n- `create_script()` in `scripts\u002Funity_skills.py` now waits for Unity to come back once and refreshes compile feedback automatically after script creation.\n\n---\n\n## Skills\n\n### script_create\nCreate a C# script from template.\n\n| Parameter | Type | Required | Default | Description |\n|-----------|------|----------|---------|-------------|\n| `scriptName` | string | Yes | - | Script class name |\n| `folder` | string | No | \"Assets\u002FScripts\" | Save folder |\n| `template` | string | No | \"MonoBehaviour\" | Template type |\n| `namespaceName` | string | No | null | Optional namespace |\n\n**Templates**: MonoBehaviour, ScriptableObject, Editor, EditorWindow\n\n**Returns**: `{success, status, path, jobId, className, namespaceName, designReminder, serverAvailability?}`\n\nPoll the returned `jobId` (or call `script_get_compile_feedback`) to obtain compile diagnostics — they are not embedded in the synchronous response. `serverAvailability` carries the transient-unavailable hint when Unity is about to reload the script domain.\n\n### script_create_batch\nCreate multiple scripts in one call.\n\n**Returns**: `{success, totalItems, successCount, failCount, results: [{success, path, className}], compilation?}`\n\nBefore batch creation, decide whether each script should be:\n- a thin `MonoBehaviour` bridge\n- a `ScriptableObject` configuration asset\n- or a plain C# domain\u002Fservice class generated from a custom template\n\n```python\nunity_skills.call_skill(\"script_create_batch\", items=[\n    {\"scriptName\": \"PlayerController\", \"folder\": \"Assets\u002FScripts\u002FPlayer\", \"template\": \"MonoBehaviour\"},\n    {\"scriptName\": \"EnemyAI\", \"folder\": \"Assets\u002FScripts\u002FEnemy\", \"template\": \"MonoBehaviour\"},\n    {\"scriptName\": \"GameSettings\", \"folder\": \"Assets\u002FScripts\u002FData\", \"template\": \"ScriptableObject\"}\n])\n```\n\n### script_read\nRead script content.\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `scriptPath` | string | Yes | Script asset path |\n\n**Returns**: `{path, lines, content}`\n\n### script_delete\nDelete a script.\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `scriptPath` | string | Yes | Script to delete |\n\n**Returns**: `{success, status, deleted, jobId, serverAvailability?}`\n\n### script_find_in_file\nSearch for patterns in scripts.\n\n| Parameter | Type | Required | Default | Description |\n|-----------|------|----------|---------|-------------|\n| `pattern` | string | Yes | - | Search pattern |\n| `folder` | string | No | \"Assets\" | Search folder |\n| `isRegex` | bool | No | false | Use regex |\n| `limit` | int | No | 50 | Max results |\n\n**Returns**: `{pattern, matchCount, matches: [{file, line, content}]}`\n\n### script_append\nAppend content to a script.\n\n| Parameter | Type | Required | Default | Description |\n|-----------|------|----------|---------|-------------|\n| `scriptPath` | string | Yes | - | Script path |\n| `content` | string | Yes | - | Content to append |\n| `atLine` | int | No | end | Line number to insert at |\n\n### script_get_compile_feedback\nGet compile diagnostics related to one script.\n\n| Parameter | Type | Required | Default | Description |\n|-----------|------|----------|---------|-------------|\n| `scriptPath` | string | Yes | - | Script path |\n| `limit` | int | No | 20 | Max diagnostics |\n\n---\n\n## Example: Efficient Script Setup\n\n```python\nimport unity_skills\n\n# BAD: 3 API calls + 3 Domain Reloads\nunity_skills.call_skill(\"script_create\", scriptName=\"PlayerController\", folder=\"Assets\u002FScripts\u002FPlayer\")\n# Wait for Domain Reload...\nunity_skills.call_skill(\"script_create\", scriptName=\"EnemyAI\", folder=\"Assets\u002FScripts\u002FEnemy\")\n# Wait for Domain Reload...\nunity_skills.call_skill(\"script_create\", scriptName=\"GameManager\", folder=\"Assets\u002FScripts\u002FCore\")\n# Wait for Domain Reload...\n\n# GOOD: 1 API call + 1 Domain Reload\nunity_skills.call_skill(\"script_create_batch\", items=[\n    {\"scriptName\": \"PlayerController\", \"folder\": \"Assets\u002FScripts\u002FPlayer\"},\n    {\"scriptName\": \"EnemyAI\", \"folder\": \"Assets\u002FScripts\u002FEnemy\"},\n    {\"scriptName\": \"GameManager\", \"folder\": \"Assets\u002FScripts\u002FCore\"}\n])\n# Wait for Domain Reload once...\n```\n\n## Important: Domain Reload And Compile Feedback\n\nAfter creating or editing scripts, Unity triggers a Domain Reload (recompilation). Use the returned `compilation` field first. If `isCompiling=true`, wait for Unity to finish and then call `script_get_compile_feedback`.\n\n```python\nimport time\n\nresult = unity_skills.call_skill(\"script_create\", scriptName=\"MyScript\")\ntime.sleep(5)  # Wait for Unity to recompile if result[\"compilation\"][\"isCompiling\"] is true\nfeedback = unity_skills.call_skill(\"script_get_compile_feedback\", scriptPath=result[\"path\"])\nunity_skills.call_skill(\"component_add\", name=\"Player\", componentType=\"MyScript\")\n```\n\n## Best Practices\n\n1. Use meaningful script names matching class name\n2. Organize scripts in logical folders\n3. Before creating gameplay code, decide the class role first: MonoBehaviour, ScriptableObject, or plain C# helper\u002Fservice\n4. Actively reduce coupling: prefer explicit dependencies, small responsibilities, and event-driven notifications over hidden globals\n5. Actively consider performance: avoid unnecessary `Update`, repeated `Find`, reflection in hot paths, and avoidable allocations\n6. Actively consider maintainability: clear naming, explicit ownership, Inspector-friendly fields, and simple module boundaries\n7. Avoid giant boilerplate\u002Ftemplate dumps. Start from the smallest structure that solves the current need\n8. Do not default to UniTask or a global event bus unless the project context justifies them\n9. Avoid cryptic abbreviations in class, field, and method names unless they are already a project convention\n10. Use templates for correct base class\n11. Wait for compilation after creating scripts\n12. After script edits, call `script_get_compile_feedback` and fix reported errors\n13. Use regex search for complex patterns\n14. **Use batch creation to minimize Domain Reloads**\n\n---\n\n## Additional Skills\n\n### `script_replace`\nFind and replace content in a script file.\n\n| Parameter | Type | Required | Default | Description |\n|-----------|------|----------|---------|-------------|\n| `scriptPath` | string | Yes | - | Script asset path |\n| `find` | string | Yes | - | Text or pattern to find |\n| `replace` | string | Yes | - | Replacement text |\n| `isRegex` | bool | No | false | Use regex matching |\n| `checkCompile` | bool | No | true | Check compilation after replace |\n| `diagnosticLimit` | int | No | 20 | Max compile diagnostics |\n\n**Returns:** `{ success, status, path, jobId, replacements, serverAvailability? }`\n\n### `script_list`\nList C# script files in the project.\n\n| Parameter | Type | Required | Default | Description |\n|-----------|------|----------|---------|-------------|\n| `folder` | string | No | \"Assets\" | Folder to search in |\n| `filter` | string | No | null | Filter string for path matching |\n| `limit` | int | No | 100 | Max results |\n\n**Returns:** `{ count, scripts: [{ path, name }] }`\n\n### `script_get_info`\nGet script info (class name, base class, methods).\n\n| Parameter | Type | Required | Default | Description |\n|-----------|------|----------|---------|-------------|\n| `scriptPath` | string | Yes | - | Script asset path |\n\n**Returns:** `{ path, className, baseClass, namespaceName, isMonoBehaviour, publicMethods, publicFields }`\n\n### `script_rename`\nRename a script file.\n\n| Parameter | Type | Required | Default | Description |\n|-----------|------|----------|---------|-------------|\n| `scriptPath` | string | Yes | - | Script asset path |\n| `newName` | string | Yes | - | New script name (without extension) |\n| `checkCompile` | bool | No | true | Check compilation after rename |\n| `diagnosticLimit` | int | No | 20 | Max compile diagnostics |\n\n**Returns:** `{ success, status, path, jobId, oldPath, newName, serverAvailability? }`\n\n### `script_move`\nMove a script to a new folder.\n\n| Parameter | Type | Required | Default | Description |\n|-----------|------|----------|---------|-------------|\n| `scriptPath` | string | Yes | - | Script asset path |\n| `newFolder` | string | Yes | - | Destination folder. Must already exist. |\n| `checkCompile` | bool | No | true | Check compilation after move |\n| `diagnosticLimit` | int | No | 20 | Max compile diagnostics |\n\n**Returns:** `{ success, status, path, jobId, oldPath, newPath, serverAvailability? }`\n\n---\n## Exact Signatures\n\nExact names, parameters, defaults, and returns are defined by `GET \u002Fskills\u002Fschema` or `unity_skills.get_skill_schema()`, not by this file.\n",{"name":5,"metadata":44,"use-when":48,"platforms":49,"description":7,"do-not-use-when":52,"task-categories":53},{"tier":45,"source":46,"version":47},2,"https:\u002F\u002Fgithub.com\u002FBesty0728\u002FUnity-Skills","1.9.2","Load when the task requires: C# script CRUD and analysis — create, read, replace, append, search, rename, move, delete Unity scripts and surface compile feedback \u002F Domain Reload state. Unity Editor must be running with the unity-skills REST server reachable at http:\u002F\u002Flocalhost:8090.",[50,51],"unity-editor","claude-code","Do not load when Unity Editor is not running locally. Do not load when unity-skills REST server is unreachable at http:\u002F\u002Flocalhost:8090.",[54,55],"scripting","editor-automation","main","fe4746b9f07e6c7c2b6d3932002183af9b9f6fa2",".claude\u002Fskills\u002Funity-skills\u002Fskills\u002Fscript",0,"https:\u002F\u002Fgithub.com\u002FdyCuong03\u002Funity-agent-team","https:\u002F\u002Fgithub.com\u002FdyCuong03","Game developer","2026-07-25 22:22:25",{"source":8,"skillName":5,"commands":65,"prompt":75,"zipAvailable":76},[66,69,72],{"tool":67,"command":68},"npx","npx skills add dyCuong03\u002Funity-agent-team --skill unity-script",{"tool":70,"command":71},"bunx","bunx skills add dyCuong03\u002Funity-agent-team --skill unity-script",{"tool":73,"command":74},"pnpm","pnpm dlx skills add dyCuong03\u002Funity-agent-team --skill unity-script","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FdyCuong03\u002Funity-agent-team\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Funity-skills\u002Fskills\u002Fscript\u002FSKILL.md",true,[],[79,104,127,152,170,191],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":39},"01M6KH55FFS00ET877QSMRYGX4","dots-update-groups","How to choose the right ECS system group and ordering so per-frame and per-fixed-step work is deterministic and never races its own readers. Covers InitializationSystemGroup \u002F SimulationSystemGroup \u002F PresentationSystemGroup \u002F FixedStepSimulationSystemGroup \u002F VariableRateSimulationSystemGroup, UpdateBefore \u002F UpdateAfter peer ordering, OrderFirst \u002F OrderLast group-boundary placement, RateManager, and the cross-group ordering trap. Use when adding an ISystem, fixing \"value visible one frame late\" bugs, or coupling simulation to a fixed timestep.","https:\u002F\u002Fgithub.com\u002FdyCuong03\u002Funity-agent-team\u002Fblob\u002Fmain\u002Fworkspace\u002Fdots-program\u002Fscratch\u002Fwave-2-orchestrator-drafts\u002Fdots-update-groups\u002FSKILL.md",[],[86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103],"update","dots update groups","boundary","simulation","how","system","choose","work","use","never","peer","deterministic","how to","coupling","ecs","bugs","frame","value",{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":39},"01M6KH50PWYEFQDCGYBZ0326F1","dots-transform-patterns","The Entities 1.x transform model — LocalTransform (writable input) vs LocalToWorld (system-owned matrix), Parent\u002FChild hierarchy, reparenting cost, uniform vs non-uniform scale (PostTransformMatrix), and when to opt out with custom transform systems. Use when designing parent\u002Fchild hierarchies, runtime reparenting (mount\u002Fdismount\u002Fsocket), or choosing transform components at the Baker boundary.","https:\u002F\u002Fgithub.com\u002FdyCuong03\u002Funity-agent-team\u002Fblob\u002Fmain\u002Fworkspace\u002Fdots-program\u002Fscratch\u002Fwave-2-orchestrator-drafts\u002Fdots-transform-patterns\u002FSKILL.md",[],[111,112,113,114,88,91,115,116,94,117,118,119,120,121,122,123,23,124,125,126],"patterns","transform","dots transform patterns","components","mount","model","cost","runtime","systems","input","with","matrix","socket","child","custom","hierarchy",{"skillNo":128,"name":129,"nameZh":6,"description":130,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":131,"categories":132,"keywords":138,"publishedAt":39},"01M6KH4VW4MA14DQW4KQYPFT0S","dots-singleton-patterns","Model cross-system shared configuration and game state as a single-entity component with a strict single-writer contract. Covers RequireForUpdate gating, SystemAPI.GetSingleton \u002F GetSingletonRW \u002F HasSingleton \u002F TryGetSingleton, bake-time vs runtime-created vs ECB-system singletons, the \"exactly one entity\" runtime invariant, and the single-writer rule. Use when designing frame-stable global config, shared mutable state, or any component intended to exist on exactly one entity.","https:\u002F\u002Fgithub.com\u002FdyCuong03\u002Funity-agent-team\u002Fblob\u002Fmain\u002Fworkspace\u002Fdots-program\u002Fscratch\u002Fwave-2-orchestrator-drafts\u002Fdots-singleton-patterns\u002FSKILL.md",[133],{"categoryNo":134,"categoryName":135,"taxonomyType":136,"taxonomyTypeDesc":137},"01JBSEEDCAT000000000000037","律师与法务","PROFESSION","适用职业",[111,139,140,141,142,143,144,91,116,94,145,146,147,118,148,149,121,102,150,151],"singleton","dots singleton patterns","component","config","state","game","writer","time","shared","contract","as","ecb","gating",{"skillNo":153,"name":154,"nameZh":6,"description":155,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":156,"categories":157,"keywords":158,"publishedAt":39},"01M6KH4PR076AYNDZHD63HHWX6","dots-hybrid-bridge","The one-way bridge between DOTS-owned runtime state and Unity-owned presentation. Covers UnityObjectRef for managed asset refs in components, the DOTS-writes \u002F Unity-reads ownership rule, when to use managed IComponentData vs UnityObjectRef vs CompanionComponent, baker-bridge vs runtime-bridge, and SubScene boundary rules. Use when an entity must reference Unity assets (Mesh, Material, AudioClip, ScriptableObject), a MonoBehaviour view must read entity state, or input\u002FUI must trigger ECS work.","https:\u002F\u002Fgithub.com\u002FdyCuong03\u002Funity-agent-team\u002Fblob\u002Fmain\u002Fworkspace\u002Fdots-program\u002Fscratch\u002Fwave-2-orchestrator-drafts\u002Fdots-hybrid-bridge\u002FSKILL.md",[],[159,160,161,162,114,143,88,163,164,93,22,165,94,118,166,21,120,167,168,169],"bridge","hybrid","dots hybrid bridge","mesh","assets","Rules","view","trigger","material","for","managed",{"skillNo":171,"name":172,"nameZh":6,"description":173,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":174,"categories":175,"keywords":176,"publishedAt":39},"01M6KH4FGRQ9AP2ND5H5HX4D83","dots-event-driven-ecs","Model one-frame events and external requests in ECS without dual ownership, polling, or persistent state leaks. Covers request-tag pattern with ECB, enableable command components (no structural change), event buffers (IBufferElementData), explicit consumer ownership, one-frame latency rules, and the banned C# event \u002F UnityEvent \u002F static bus anti-patterns. Use when input\u002FUI\u002Fnetwork must trigger ECS work, when a one-frame signal fans out to N consumers (damage, hit, collision), or when state changes must be processed exactly once.","https:\u002F\u002Fgithub.com\u002FdyCuong03\u002Funity-agent-team\u002Fblob\u002Fmain\u002Fworkspace\u002Fdots-program\u002Fscratch\u002Fwave-2-orchestrator-drafts\u002Fdots-event-driven-ecs\u002FSKILL.md",[],[177,178,100,179,180,114,181,182,183,116,93,184,185,111,186,187,120,188,189,190],"event driven","driven","event","dots event driven ecs","change","ui","network","command","anti-patterns","pattern","structural","events","static","request",{"skillNo":192,"name":193,"nameZh":6,"description":194,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":195,"categories":196,"keywords":208,"publishedAt":39},"01M6KH4BWRGCEBJ8PKCKCSGT33","valid_skill","A complete, well-formed test fixture skill for SkillHub validation testing. Covers basic task routing and code review for Unity projects.","https:\u002F\u002Fgithub.com\u002FdyCuong03\u002Funity-agent-team\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fvalid_skill\u002FSKILL.md",[197,202,205],{"categoryNo":198,"categoryName":199,"taxonomyType":200,"taxonomyTypeDesc":201},"01JBSEEDCAT000000000000007","代码审查","SCENARIO","使用场景",{"categoryNo":203,"categoryName":204,"taxonomyType":200,"taxonomyTypeDesc":201},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":206,"categoryName":207,"taxonomyType":200,"taxonomyTypeDesc":201},"01JBSEEDCAT000000000000023","Skill与智能体开发",[209,210,211,212,213,214,215,37,216,217,218,219,220,221,21,222,168],"valid skill","valid","code review","testing","review","test","routing","validation","projects","fixture skill","task","fixture","basic","complete"]