# godot-optimization

Profiles Godot game performance and guides GDScript optimizations, from draw call batching to node caching and object pooling.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 718 installs · ★ 20
- Author: Zate
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/Zate/cc-godot/tree/HEAD/plugins/gd/skills/godot-optimization/SKILL.md
- Updated: 2025-11-09
- HTML: https://affpapa.org/en/nevibecode/skills/godot-optimization

## What it does

This skill guides coding agents through profiling and fixing performance bottlenecks across 2D and 3D Godot projects. It targets engine monitors like frame times and physics intervals. Slowdowns become much easier to trace.

The instructions include GDScript patterns. The agent recommends replacing per-frame polling in `_process` with timers and caching node paths in `@onready` variables. It also swaps manual distance loops for `Area2D` triggers, uses `MultiMeshInstance2D` to batch repeated sprites, and implements an `ObjectPool` to avoid scene instantiation costs.

Repeated calls to `get_tree().get_nodes_in_group()` inside loops create noticeable frame drops, so the skill mandates caching group arrays early. It also details distance-based Level of Detail (LOD) handling for meshes and physics steps.

## Requirements
- Works with: Godot

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add Zate/cc-godot --skill godot-optimization -a claude-code
```

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

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add Zate/cc-godot --skill godot-optimization -a codex
```

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

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add Zate/cc-godot --skill godot-optimization -a cursor
```

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

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install Zate/cc-godot godot-optimization
```

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

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add Zate/cc-godot --skill godot-optimization -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/Zate/cc-godot --path plugins/gd/skills/godot-optimization
```

### Windsurf (Devin Desktop)

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

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add Zate/cc-godot --skill godot-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/Zate/cc-godot/tree/HEAD/plugins/gd/skills/godot-optimization/SKILL.md

## When to use it
- eliminate frame drops and monitor engine metrics in GDScript
- replace per-frame polling in `_process` with interval timers
- reduce draw calls using `MultiMeshInstance2D`
- implement object pools for frequently spawned scenes

## Example prompts
- Review `EnemyManager.gd` and stop querying node groups every frame.
- Help me set up an `ObjectPool` for bullets in Godot 4.
- How can I convert individual coin sprites into a `MultiMeshInstance2D`?

## Similar
- [godot-performance-optimization](https://affpapa.org/en/nevibecode/skills/godot-performance-optimization.md) — skill · 483 installs
- [godot-gdscript-mastery](https://affpapa.org/en/nevibecode/skills/godot-gdscript-mastery.md) — skill · 612 installs
- [godot-gdscript](https://affpapa.org/en/nevibecode/skills/godot-gdscript.md) — skill · 6700 installs
- [godot-physics](https://affpapa.org/en/nevibecode/skills/godot-physics.md) — skill · 6600 installs
- [godot-prompter](https://affpapa.org/en/nevibecode/plugins/godot-prompter.md) — plugin · ★ 877
- [godot-mcp](https://affpapa.org/en/nevibecode/mcp/tomyud1-godot-mcp.md) — MCP server · ★ 445

From the same set: [zate/cc-godot](https://affpapa.org/en/nevibecode/by/zate/cc-godot.md) — 4 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
