uw-unity-debugging

uw-unity-debugging is a skill for Claude Code from IdoCohen560/claude-unity-game-studio. It costs 116 tokens per session (1,184 once invoked), scanned A, a copy of uw-unity-debugging, MIT.

A structured guide for finding and diagnosing bugs in Unity projects. It gathers evidence, narrows down the cause, tests possible explanations, and documents the result.

In plain words
What is it for?
Use it when a Unity feature crashes, behaves unexpectedly, or fails a test, including when you need to inspect console output, recent Git changes, or runtime logs.
Why use it?
It replaces guesswork with repeatable checks for errors such as null references, incorrect update timing, execution-order problems, and unsafe background-thread calls.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it when a Unity feature crashes, behaves unexpectedly, or fails a test, including when you need to inspect console output, recent Git changes, or runtime logs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/idocohen560/claude-unity-game-studio/uw-unity-debugging
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add IdoCohen560/claude-unity-game-studio --skill uw-unity-debugging
Clone the repo
git clone --depth 1 https://github.com/IdoCohen560/claude-unity-game-studio

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for uw-unity-debugging

README.md
[![agentmods](https://agentmods.dev/badge/skills/idocohen560/claude-unity-game-studio/uw-unity-debugging/github.svg)](https://agentmods.dev/skills/idocohen560/claude-unity-game-studio/uw-unity-debugging)
Your own site
<a href="https://agentmods.dev/skills/idocohen560/claude-unity-game-studio/uw-unity-debugging"><img src="https://agentmods.dev/badge/skills/idocohen560/claude-unity-game-studio/uw-unity-debugging/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for uw-unity-debugging

Your own site · 80×15
<a href="https://agentmods.dev/skills/idocohen560/claude-unity-game-studio/uw-unity-debugging"><img src="https://agentmods.dev/badge/skills/idocohen560/claude-unity-game-studio/uw-unity-debugging.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 116 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,184 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00116 $0.01184
Opus 5 $0.00058 $0.00592
Sonnet 5 $0.00023 $0.00237
Haiku 4.5 $0.00012 $0.00118

Measured 9d ago against content hash 036e08d58cf8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

uw-unity-debugging scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to uw-unity-debugging — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

examples/my-first-game/.claude/skills/uw-unity-debugging/SKILL.md · 111 lines

How it starts

The opening of the file, as written. The whole thing — 111 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Unity Debugging

4-phase debugging framework. Also generates the GameDebug wrapper class.

Before You Start

  1. Check if GameDebug.cs already exists in the project (search for class GameDebug). If not, generate it using the template below during project setup.
  2. Read docs/ProjectConfig.yaml -> mcp.unity_mcp — if true, use read_console to read Unity console output.
  3. Read docs/CODING_STANDARDS.md for async patterns — bugs in async code often involve missing CancellationToken or unhandled OperationCanceledException.

4 Phases

Phase 1: Gather Evidence

  1. Read Unity console (read_console via MCP or ask user for errors).
  2. Reproduce — exact steps to trigger.
  3. Scope — single script, system interaction, or timing?
  4. Check git log -5 for recent changes.

Phase 2: Isolate

  1. Comment out systems to narrow the culprit.
  2. Add targeted GameDebug.Log at decision points.
  3. Check common causes:
    • Execution order (Awake vs Start vs OnEnable)
    • Null reference (destroyed object, unassigned field)
    • Unity API called from background thread
    • State not reset in OnDisable/OnDestroy
    • Physics in Update instead of FixedUpdate

Phase 3: Hypothesize & Test

  1. State: "I believe X happens because Y."
  2. Write a test proving/disproving the hypothesis.
  3. If test fails -> back to Phase 2.

Phase 4: Fix & Verify

  1. Implement minimal fix.
  2. Re-run the hypothesis test.
  3. Run full test suite for regressions.
  4. Clean up temp debug logs.
  5. Commit: fix({scope}): {root cause description}

GameDebug Wrapper

Generate during project setup. Uses [Conditional("ENABLE_LOGS")] so all calls are stripped in release builds. Includes [CallerFilePath], [CallerMemberName], and [CallerLineNumber] for automatic context — no need to manually describe where a log came from.

using System.Diagnostics;
using System.Runtime.CompilerServices;

public enum LogTopic { General, Gameplay, Audio, UI, Network, Physics, AI }

public static class GameDebug
{
    [Conditional("ENABLE_LOGS")]
    public static void Log(
        string message,
        LogTopic topic = LogTopic.General,
        [CallerFilePath] string file = "",
        [CallerMemberName] string member = "",
        [CallerLineNumber] int line = 0) =>
        UnityEngine.Debug.Log(Format(topic, message, file, member, line));

    [Conditional("ENABLE_LOGS")]
    public static void LogWarning(
        string message,
        LogTopic topic = LogTopic.General,
        [CallerFilePath] string file = "",
        [CallerMemberName] string member = "",
        [CallerLineNumber] int line = 0) =>
        UnityEngine.Debug.LogWarning(Format(topic, message, file, member, line));

    [Conditional("ENABLE_LOGS")]
    public static void LogError(
        string message,
        LogTopic topic = LogTopic.General,
        [CallerFilePath] string file = "",
        [CallerMemberName] string member = "",
        [CallerLineNumber] int line = 0) =>
        UnityEngine.Debug.LogError(Format(topic, message, file, member, line));

    private static string Format(
        LogTopic topic, string msg, string file, string member, int line) {
        var fileName = System.IO.Path.GetFileNameWithoutExtension(file);
        return $"[{topic}] {fileName}.{member}:{line} — {msg}";
    }
}

Read the full file on GitHub · 111 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 111 lines · 116 tokens per session scan A 036e08d58cf8

Subscribe to this mod's changes

uw-unity-debugging is a skill published in the GitHub repository IdoCohen560/claude-unity-game-studio (19 stars, last pushed 2mo ago), licensed MIT. It adds 116 tokens to every session and 1,184 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to uw-unity-debugging, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories