isometric-pathfinding — Claude Code skill: A* on an isometric grid
A pathfinding skill for isometric games: A* over the walkable tile layer, diagonal moves that never cut blocked corners, results returned as grid tiles.
npx skills add 0xheycat/isometric-game-skills --skill isometric-pathfinding -a claude-codeWhat isometric-pathfinding does
The skill tells the agent how units should move across an isometric map. Paths are computed from grid coordinates over the walkable layer; screen pixels stay out of the search. Neighbours are declared 4-way or 8-way, and in the 8-way case a diagonal step past a blocked corner is not allowed. The heuristic stays admissible: for eight directions it is octile distance, written as h = (dx+dy) + (1.414-2)*min(dx,dy).
Once the tile path exists, the agent hands it to the isometric-grid-math skill for screen conversion. String-pulling then removes zig-zags. A changed map or moving target triggers a new search, and a node budget keeps the search bounded on large maps.
The skill also names the failure modes to stop on sight: searching in screen space, corner-cutting diagonals, and an unbounded search. Its checklist wants obstacle avoidance, clean diagonals and a correct conversion back to screen positions. Rendering and unit movement are outside its scope, so isometric-grid-math has to be present as well.
What it helps with
- route a unit to a target around obstacles
- keep characters from walking through walls or clipping corners
- turn a tile path into screen positions
- smooth a zig-zagging route
- bound the search on a large map with a node budget
Example prompts for the agent
- Find a path for this unit to the target over the walkable layer, no diagonal moves through blocked corners
- Recalculate the route after the map changed and give me screen coordinates
- Review the pathfinding: A* on grid coords, admissible heuristic, node budget
How to install isometric-pathfinding
1Skills CLI (Vercel)
npx skills add 0xheycat/isometric-game-skills --skill isometric-pathfinding -a claude-code2Manually: put the files in place
~/.claude/skills/isometric-pathfinding/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/isometric-pathfinding/
1Skills CLI (Vercel)
npx skills add 0xheycat/isometric-game-skills --skill isometric-pathfinding -a codex2Manually: put the files in place
.agents/skills/isometric-pathfinding/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add 0xheycat/isometric-game-skills --skill isometric-pathfinding -a cursor2Manually: put the files in place
.cursor/skills/isometric-pathfinding/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install 0xheycat/isometric-game-skills isometric-pathfinding2Manually: put the files in place
.github/skills/isometric-pathfinding/SKILL.md1Skills CLI (Vercel)
npx skills add 0xheycat/isometric-game-skills --skill isometric-pathfinding -a gemini-cli2Platform CLI
gemini skills install https://github.com/0xheycat/isometric-game-skills --path skills/isometric-pathfindingManually: put the files in place
.devin/skills/isometric-pathfinding/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add 0xheycat/isometric-game-skills --skill isometric-pathfinding -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about isometric-pathfinding
How do I install isometric-pathfinding in Claude Code?
Run npx skills add 0xheycat/isometric-game-skills --skill isometric-pathfinding -a claude-code. The skill file lands at ~/.claude/skills/isometric-pathfinding/SKILL.md.
What does isometric-pathfinding do?
It gives the agent a procedure for isometric pathfinding: A* over the walkable layer, no cutting blocked corners on diagonals, path smoothing, and conversion to screen coordinates.
Which heuristic does it use for 8-way movement?
Octile distance: h = (dx+dy) + (1.414-2)*min(dx,dy), with dx and dy being the coordinate differences.
Source text
SKILL.md · MIT
--- name: isometric-pathfinding description: Use when units must navigate an isometric grid around obstacles using A* on the walkable layer with correct iso neighbor rules. license: MIT --- # Isometric Pathfinding ## Overview Pathfinding runs on grid coordinates, not screen pixels. This skill implements A* over the walkable layer with proper diagonal handling so units take natural paths and never cut through blocked corners. ## When to Use - Units or NPCs need to move to a target around obstacles. - Characters walk through walls or take ugly paths. - You have a walkable layer and need movement on it. ## Process 1. Run A* on grid coords using the tilemap walkable layer. 2. Define neighbors: 4-way or 8-way; for 8-way, forbid cutting blocked corners. 3. Use an admissible heuristic (octile distance for 8-way). 4. Return a path of grid tiles, then convert to screen with `isometric-grid-math`. 5. Smooth the path (string-pulling) to avoid zig-zag. 6. Recompute or repath when the map or target changes. 7. Cap search cost (node budget) for large maps. ```text heuristic (octile): dx=|x1-x2|, dy=|y1-y2|; h = (dx+dy) + (1.414-2)*min(dx,dy) ``` ## Rationalizations (Stop Lying to Yourself) | Excuse | Reality | |---|---| | "Straight-line movement is fine" | Units will walk into walls. Use A* on the walkable layer. | | "Corner cutting looks fine" | Units clip through diagonal walls. Forbid blocked-corner cuts. | ## Red Flags - STOP if you catch yourself: - Pathfinding on screen coords instead of grid coords. - Allowing diagonal moves through blocked corners. - No node budget so large maps freeze. ## Verification You are NOT done until every box is checked: - [ ] A* finds paths around obstacles on the walkable layer. - [ ] Diagonal moves never cut blocked corners. - [ ] Path converts correctly back to screen positions.
© 0xheycat · MIT · 0xheycat/isometric-game-skills