# godot-genre-puzzle

Architectural guidelines for Godot puzzle games. Helps set up grid mechanics, native UndoRedo actions, and soft-lock checks without dragging down frame rates.

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

## What it does

This skill guides the agent through building Sokoban-style games, match-3 layouts, and spatial puzzles in Godot. It decouples board state from the `SceneTree` and mandates `Vector2i` coordinates. Floating-point coordinates are rejected to prevent precision drift across turns. Win condition and soft-lock validations are kept out of `_process()`, running strictly after a piece move is committed.

The logic centers around modular scripts for smooth movements, level data serialization via `.tres` files, and `AStarGrid2D.diagonal_mode` hints. Maintaining a hand-rolled command stack alongside Godot's built-in `UndoRedo` is treated as a critical anti-pattern. The skill requires a single undo authority managed through `puzzle_undo_manager.gd`.

## Requirements
- Works with: Godot

## Install

### Claude Code (native platform)

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

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

### Codex

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

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

### Cursor

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

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

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

### Gemini CLI

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

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

### Windsurf (Devin Desktop)

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

### OpenCode

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

## When to use it
- implement move history using Godot's native `UndoRedo`
- maintain board state in `Vector2i` decoupled from the `SceneTree`
- check win conditions and unsolvable states only on move commits
- manage tile movement while killing conflicting tweens

## Example prompts
- Set up an undo and redo system for a Sokoban puzzle using Godot UndoRedo
- Create a Vector2i grid manager that stores puzzle state outside the SceneTree
- How do I run soft-lock checks after committing a tile move?

## Similar
- [godot-gdscript](https://affpapa.org/en/nevibecode/skills/godot-gdscript.md) — skill · 6500 installs
- [godot-physics](https://affpapa.org/en/nevibecode/skills/godot-physics.md) — skill · 6300 installs
- [godot-mcp-enhanced](https://affpapa.org/en/nevibecode/mcp/godot-mcp-enhanced.md) — MCP server · ★ 103
- [godot](https://affpapa.org/en/nevibecode/rules/godot.md) — rule · ★ 3579
- [godot-ui](https://affpapa.org/en/nevibecode/skills/godot-ui.md) — skill · 2700 installs
- [godot-asset-generator](https://affpapa.org/en/nevibecode/skills/godot-asset-generator.md) — skill · 1000 installs

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
