# godot-debugging-profiling

A skill for debugging and profiling Godot games: leaks, orphan nodes, GPU profiler spikes, flaky headless CI runs.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 457 installs · ★ 893
- Author: thedivergentai
- License: LGPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/thedivergentai/Game-Dev-Agentic-Skills/tree/HEAD/skills/godot-debugging-profiling/SKILL.md
- Updated: 2026-10-16
- HTML: https://affpapa.org/en/nevibecode/skills/godot-debugging-profiling

## What it does

The skill walks the agent through a symptom → monitor → script path. Memory that climbs while nodes are removed, ObjectDB growth, GPU spikes in the Visual Profiler, headless builds exiting with the wrong code, corrupted logs from thread races — each symptom maps to a ready GDScript file the agent drops into your project.

Roughly twenty scripts ship with it: an orphan node detector, a memory threshold alert, a scene tree dump, a microsecond benchmarker built on `Time.get_ticks_usec`, an automated QA suite for CI, an engine error interceptor, a thread-safe logger, custom monitors for the Debugger tab, and a remote console for mobile builds. There is also a list of things not to do. Profiling a debug build tells you nothing useful because it runs several times slower than release, and `OBJECT_ORPHAN_NODE_COUNT` always returns 0 in release, so a leak stays hidden.

Some techniques only work in debug builds. `Engine.capture_script_backtraces(true)` captures local variables and can itself keep objects from being freed, so switch it on for a narrow window. An `EditorDebuggerPlugin` has to be unregistered in `_exit_tree()`, otherwise ghost connections stay in the engine's debugging loop. The skill advises profiling release exports with V-Sync off.

## Requirements
- Works with: Godot

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill godot-debugging-profiling -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/godot-debugging-profiling/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/godot-debugging-profiling/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill godot-debugging-profiling -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/godot-debugging-profiling/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill godot-debugging-profiling -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/godot-debugging-profiling/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install thedivergentai/Game-Dev-Agentic-Skills godot-debugging-profiling
```

2. **Manually: put the files in place**
- File: `.github/skills/godot-debugging-profiling/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill godot-debugging-profiling -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/thedivergentai/Game-Dev-Agentic-Skills --path skills/godot-debugging-profiling
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/godot-debugging-profiling/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill godot-debugging-profiling -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/thedivergentai/Game-Dev-Agentic-Skills/tree/HEAD/skills/godot-debugging-profiling/SKILL.md

## When to use it
- track down orphan nodes that keep memory climbing
- catch a headless build that exits with a flaky code in CI
- time a logic block with microsecond precision
- collect logs from several threads without garbled lines
- surface engine metrics in a custom Debugger tab

## Example prompts
- Memory keeps climbing even though nodes are removed — check OBJECT_ORPHAN_NODE_COUNT and wire up the orphan node detector
- The headless build in CI fails with a non-zero exit every few runs — set up the automated QA suite
- Benchmark this block with Time.get_ticks_usec, milliseconds are too coarse

## Similar
- [godot-gdscript-headless-testing](https://affpapa.org/en/nevibecode/skills/godot-gdscript-headless-testing.md) — skill · 3100 installs
- [godot-mcp-enhanced](https://affpapa.org/en/nevibecode/mcp/godot-mcp-enhanced.md) — MCP server · ★ 103
- [godot-nodes-scenes](https://affpapa.org/en/nevibecode/skills/godot-nodes-scenes.md) — skill · 6400 installs
- [cli-anything-godot](https://affpapa.org/en/nevibecode/skills/cli-anything-godot.md) — skill · 548 installs
- [godot-best-practices](https://affpapa.org/en/nevibecode/skills/godot-best-practices.md) — skill · 2100 installs
- [godot-prompter](https://affpapa.org/en/nevibecode/plugins/godot-prompter.md) — plugin · ★ 867

From the same set: [thedivergentai/game-dev-agentic-skills](https://affpapa.org/en/nevibecode/by/thedivergentai/game-dev-agentic-skills.md) — 51 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
