gamedev-unity/skills/unity-skills/skills/debug/SKILL.md
Inspect debug, diagnostics and compile state — read console errors, force recompile, get stack traces, and list system/memory info. Use when diagnosing compile failures, checking errors after a change, forcing recompilation, or gathering system diagnostics, even if the user just says "为什么报错" or "编译状态". 检查调试、诊断与编译状态(读取控制台错误、强制重新编译、获取堆栈、列出系统/内存信息);当用户要诊断编译失败、改动后检查报错、强制重编或收集系统诊断时使用。
npx skillsauth add bernatmv/ai-rules unity-debugInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Debug utilities for error checking and diagnostics.
unity_diagnose / debug_get_errors / debug_get_logs / debug_check_compilation / debug_get_system_info / debug_get_stack_trace / debug_get_assembly_info / debug_get_defines / debug_get_memory_info,全部标 SkillMode.SemiAuto)直接执行;debug_force_recompile / debug_set_defines 默认 SkillMode.FullAuto,需用户 grant,grant 后一步执行返结果。debug_force_recompile(标 MayTriggerReload=true)必然触发 Domain Reload;debug_set_defines 修改 PlayerSettings 的 scripting defines 也会触发重编译 —— 这些 skill 在 Approval / Auto 下会被 IsForbiddenInSemi 自动拦截,仅 Bypass 或 Allowlist 命中可执行,调用后服务端会短暂不可用。DO NOT (common hallucinations):
debug_compile / debug_recompile do not exist → use debug_force_recompiledebug_run does not exist → use editor_play (editor module)debug_clear does not exist → use console_clear (console module)debug_set_defines triggers Domain Reload — server will be temporarily unavailableRouting:
console module's console_get_logs / console_start_captureeditor modulescript module's script_get_compile_feedbackunity_diagnoseAggregated Editor health snapshot — call this FIRST when triaging problems. Combines console errors, compile state, recent workflow tasks, recent jobs, and server stats in a single response. Avoids chaining 4-5 individual skills.
Parameters:
errorLimit (int, optional, default 20, range 1-200): Max console entries to return.includeWarnings (bool, optional, default true): Include warnings (false = errors only).includeRecentJobs (bool, optional, default true): Include the 10 most recent async jobs.Returns: { summary: { healthy, consoleErrorCount, consoleWarningCount, isCompiling, serverRunning, hint }, compile, console, workflow, server, recentJobs }
debug_get_logsGet console logs filtered by type and content. Parameters:
type (string, optional): Filter by type (Error/Warning/Log). Default: Error.filter (string, optional): Filter by content.limit (int, optional): Max entries. Default: 50.debug_get_errorsGet only active errors and exceptions from console. Parameters:
limit (int, optional): Max entries. Default: 50.debug_check_compilationCheck if there are any compilation errors. Parameters: None.
debug_force_recompileForce Unity to recompile all scripts. Parameters: None.
debug_get_system_infoGet system and Unity environment information. Parameters: None.
debug_get_stack_traceGet stack trace for a log entry by index.
| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | entryIndex | int | Yes | - | Index of the log entry to retrieve stack trace for |
Returns: { index, message, stackTrace }
debug_get_assembly_infoGet project assembly information.
Parameters: None.
Returns: { success, count, assemblies }
debug_get_definesGet scripting define symbols for current platform.
Parameters: None.
Returns: { success, buildTargetGroup, defines }
debug_set_definesSet scripting define symbols for current platform.
| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | defines | string | Yes | - | Scripting define symbols to set |
Returns: { success, buildTargetGroup, defines, serverAvailability }
debug_get_memory_infoGet memory usage information.
Parameters: None.
Returns: { success, totalAllocatedMB, totalReservedMB, totalUnusedReservedMB, monoUsedSizeMB, monoHeapSizeMB }
Exact names, parameters, defaults, and returns are defined by GET /skills/schema or unity_skills.get_skill_schema(), not by this file.
development
Keyword research and validation with real search-demand data — never ship keywords from intuition alone. Probes Google Autocomplete per language (free, no account) to prove demand and discover the exact phrasing people type, checks SERPs for winnability, and uses Keyword Planner/Ahrefs/Semrush exports when the user has access. Activates when: choosing or reviewing SEO keywords, meta keywords, page titles, article topics or slugs, landing page copy targeting search, App Store/ASO keyword fields, multilingual keyword sets, 'what should we rank for', 'keyword analysis', or auditing why a page doesn't rank. Also invoke it as a validation pass whenever another skill or task produces a keyword list.
development
Automate YooAsset hot-update and asset bundles — build bundles, run Editor simulate builds, manage Collector groups, analyze BuildReport, and validate runtime. Use when building or simulating YooAsset bundles, configuring collectors, or validating hot-update assets, even if the user just says "热更" or "打AB包". 自动化 YooAsset 热更新与资源包(构建 bundle、编辑器模拟构建、管理 Collector 分组、分析 BuildReport、运行时校验);当用户要构建或模拟 YooAsset 资源包、配置 collector、或校验热更资源时使用。
development
Source-anchored design rules for YooAsset v2.3.18 — initialization, default-package shortcuts, play modes, asset handles, loading, updates, filesystem, build, and pitfalls. Use when writing or reviewing YooAsset code, initializing packages, loading assets via handles, setting up hot-update/download, or choosing a play mode, even if the user just says "热更" or "资源包". 为 YooAsset v2.3.18 提供源码锚定的设计规则(初始化、默认包快捷方式、运行模式、资源句柄、加载、更新、文件系统、构建、陷阱);当用户要编写或审查 YooAsset 代码、初始化 package、用句柄加载资源、配置热更/下载、或选择运行模式时使用。
data-ai
Last-resort guidance for safely hand-editing Unity serialized YAML (.unity/.prefab/.asset/.meta/ProjectSettings) — reference/fileID repair, GUID safety, and merge-conflict fixes. Use when REST cannot reach the change and YAML must be hand-edited — fixing m_Script GUIDs, broken fileID references, .meta files, or merge conflicts, even if the user just says "场景文件打不开" or "引用丢了". 安全手编 Unity 序列化 YAML(.unity/.prefab/.asset/.meta/ProjectSettings)的最后手段(引用/fileID 修复、GUID 安全、合并冲突修复);当 REST 无法触达、必须手编 YAML 时使用——修复 m_Script GUID、断裂 fileID 引用、.meta 文件或合并冲突。