# godot-performance-optimization

Blueprint for profiling and resolving frame drops, draw call spikes, and memory leaks in Godot. Guides agents to profile before optimizing.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 483 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-performance-optimization/SKILL.md
- Updated: 2026-10-16
- HTML: https://affpapa.org/en/nevibecode/skills/godot-performance-optimization

## What it does

This skill provides strict performance rules for Godot projects. It enforces running the built-in Profiler (F3) first to diagnose hot spots across Time, Memory, and Physics tabs before touching code. Common mistakes are flagged immediately: calling `get_node()` in `_process()`, running unshielded `print()` statements in release builds, or spawning instances inside tight loops.

For rendering and physics workloads, the skill details specific architecture fixes. It prescribes `MultiMesh` and `TextureAtlas` to batch draw calls, direct space-state queries to replace clusters of `RayCast` nodes, and `WorkerThreadPool` to keep background calculations off the main thread. It also requires shader pre-warming when targeting the Compatibility renderer.

Texture compression breaks pixel art. The guide explicitly demands turning off VRAM compression for pixel assets to avoid rendering artifacts.

## Requirements
- Works with: Godot

## Install

### Claude Code (native platform)

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

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

### Codex

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

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

### Cursor

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

2. **Manually: put the files in place**
- File: `.cursor/skills/godot-performance-optimization/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-performance-optimization
```

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

### Gemini CLI

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

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

### Windsurf (Devin Desktop)

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

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill godot-performance-optimization -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-performance-optimization/SKILL.md

## When to use it
- profile frame drops and memory spikes using the Godot Profiler
- batch sprite and mesh draw calls with MultiMesh
- reuse spawned instances through object pooling
- disable off-screen processing via VisibleOnScreenNotifier2D
- offload heavy synchronous operations to WorkerThreadPool

## Example prompts
- Inspect my Godot enemy script and cache all get_node calls using @onready.
- Help me set up an object pool for projectile spawning instead of instantiating in loops.
- How should I pre-warm shaders in Godot's Compatibility renderer to avoid frame hitches?

## Similar
- [performance-optimization](https://affpapa.org/en/nevibecode/skills/gamedev-skills-performance-optimization.md) — skill · 7400 installs
- [godot-gdscript](https://affpapa.org/en/nevibecode/skills/godot-gdscript.md) — skill · 6500 installs
- [godot-best-practices](https://affpapa.org/en/nevibecode/skills/godot-best-practices.md) — skill · 2100 installs
- [cli-anything-godot](https://affpapa.org/en/nevibecode/skills/cli-anything-godot.md) — skill · 548 installs
- [godot-prompter](https://affpapa.org/en/nevibecode/plugins/godot-prompter.md) — plugin · ★ 867
- [godot-mcp-enhanced](https://affpapa.org/en/nevibecode/mcp/godot-mcp-enhanced.md) — MCP server · ★ 103

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
