roguelike — Claude Code skill: what it does, how to install
A skill for building roguelikes: turn engine, procedural dungeons, field of view, permadeath and loot tables. It fits projects that rebuild the world every run.
npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill roguelike -a claude-codeWhat roguelike does
roguelike fixes the loop first: the player takes a turn, the world resolves its own, the new state shows up. The systems that keep a run interesting sit around that loop. The skill is compositional, so procedural generation, tilemaps, save handling and AI get wired into one game, while noise, RNG and tilemap APIs stay with the skills that already cover them.
Inside, the must-have pieces come in order: an energy scheduler so hasted actors act more often, grid movement with bump-to-attack, a room-and-corridor generator, field of view with explored memory, combat shared by player and monsters, weighted loot tables scaled by depth, permadeath that wipes the run but not the profile, and a message log. On FOV the skill takes a side: symmetric shadowcasting, because a per-cell raycast leaves blind spots and classic recursive shadowcasting lets a monster see you while you cannot see it. python-tcod's compute_fov takes FOV_SYMMETRIC_SHADOWCAST.
Where it stops being the right base matters too. Real-time action with roguelike dressing belongs to the action genres plus procedural-gen; deep quests and stats without permadeath go to rpg; open-world crafting to survival-crafting. The pitfalls list earns a read before any code: dungeons need a flood-fill pass after generation, and energy added inside the wrong loop starves one of two equally fast actors.
What it helps with
- build a turn loop where faster actors act more often
- generate rooms and corridors, then confirm every cell is reachable
- compute field of view and keep explored cells in memory
- keep run state apart from the unlock profile on save
- weight loot drops by dungeon depth
Example prompts for the agent
- Build a roguelike in Python: turn-based grid movement, procedural dungeons, permadeath. Follow the system list in the roguelike skill.
- Add an energy-based turn scheduler and depth-scaled loot tables, the way the roguelike skill lays them out.
- Recompute FOV on every move and dim cells you have already explored. Use symmetric shadowcasting as the roguelike skill advises.
How to install roguelike
1Skills CLI (Vercel)
npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill roguelike -a claude-code2Manually: put the files in place
~/.claude/skills/roguelike/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/roguelike/
1Skills CLI (Vercel)
npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill roguelike -a codex2Manually: put the files in place
.agents/skills/roguelike/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill roguelike -a cursor2Manually: put the files in place
.cursor/skills/roguelike/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install gamedev-skills/awesome-gamedev-agent-skills roguelike2Manually: put the files in place
.github/skills/roguelike/SKILL.md1Skills CLI (Vercel)
npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill roguelike -a gemini-cli2Platform CLI
gemini skills install https://github.com/gamedev-skills/awesome-gamedev-agent-skills --path skills/genres/roguelikeManually: put the files in place
.devin/skills/roguelike/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill roguelike -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 roguelike
How do I install roguelike in Claude Code?
Run npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill roguelike -a claude-code. The file lands at ~/.claude/skills/roguelike/SKILL.md.
What does the roguelike skill do?
It lays out the loop of a roguelike: energy-driven turns, dungeon generation, field of view, combat, loot and permadeath. Procedural generation, tilemaps and saves get connected into one game rather than rewritten.
When is roguelike the wrong pick?
For real-time action with roguelike dressing, take an action genre plus procedural-gen; for quests and stats without permadeath, rpg; for open-world crafting, survival-crafting. RNG and tilemap APIs are left to other skills.
Source text
SKILL.md · Apache-2.0
---
name: roguelike
description: >
Build a roguelike: turn-based grid movement, procedural dungeons, permadeath, field-of-view,
and loot tables. Use for a roguelike/roguelite or turn-based grid dungeon crawler with procedural levels.
---
# Roguelike
A playbook for roguelikes — the turn engine, procedural dungeons, field-of-view, permadeath,
and run economy. This is a **compositional** skill: it orchestrates procedural generation,
tilemaps, save handling, and AI into a run-based game. It does not re-teach noise/RNG or
tilemap APIs; it defines the loop and the systems that make a *run* compelling.
## When to use
- Use when building a **turn-based, grid-based** dungeon crawler where each death ends the
run and the world is regenerated — a roguelike or "roguelite" (with meta-progression).
- Use when designing procedural dungeons, FOV/fog-of-war, permadeath stakes, or loot tables.
**When *not* to use:** real-time action with roguelike *dressing* → build the action genre
(`platformer`/`fps-shooter`) and layer `procedural-gen`. Deep stats/quests/dialogue without
permadeath → `rpg`. Open-world needs/crafting → `survival-crafting`.
## What makes it a roguelike (design anchor)
The community reference is the **Berlin Interpretation** (RogueBasin, IRDC 2008): a set of
"roguelikeness" factors, not a checklist. The high-value ones are the design targets:
**random environment generation, permadeath, turn-based, grid-based, non-modal** (all actions
in one mode), **complexity** (many item/monster interactions), **resource management**,
**hack-and-slash**, and **exploration & discovery**. Lean into these to feel roguelike; pick
which to keep deliberately. "Roguelite" usually relaxes permadeath with meta-progression.
## Core loop
**Take a turn (move / fight / use) → the world resolves its turn → see new state → descend /
loot / survive → die and restart with a fresh dungeon.** Replayability comes from the *world*
changing each run, not the player memorizing a fixed layout.
## Must-have systems
1. **Turn scheduler** — energy/initiative system so fast actors act more often (Pattern 2).
2. **Grid map + movement** — tile coordinates; bump-to-attack; blocked/walkable queries.
3. **Procedural dungeon generator** — rooms + corridors, or BSP/cellular; guarantee connectivity.
4. **Field of view + explored memory** — what's visible now vs. seen-before (Pattern 3 / refs).
5. **Combat + entities** — HP, attack/defense, status; monsters obey the same rules as the player.
6. **Loot + drop tables** — weighted, depth-scaled item/monster spawning (refs).
7. **Permadeath + (optional) meta-progression** — wipe the run; persist only unlocks/score.
8. **Message log + clear UI** — the player reasons from text/state; surface numbers and events.
## Design knobs
| Knob | Effect | Notes |
|------|--------|-------|
| Dungeon size / room count | run length, density | Scale with depth. |
| Connectivity guarantee | no unreachable rooms | Always verify reachability after generation. |
| Monster density / depth curve | difficulty ramp | Spawn by depth-weighted table. |
| Loot rarity weights | power variance | Rarer = bigger swing; identify adds discovery. |
| FOV radius / lighting | tension, information | Smaller radius = scarier, slower. |
| Resource scarcity (food/HP/ammo) | pressure to descend | Core tension lever in classic RLs. |
| Permadeath vs meta-progression | run stakes vs. retention | Roguelite softens the wall. |
| Identification / unknowns | exploration value | Unidentified items reward experimentation. |
| Seedable RNG | daily runs, debugging | Always allow a fixed seed (see `procedural-gen`). |
## Patterns
### 1. Deterministic, seedable run RNG
```python
# Pseudocode. One seeded RNG per run makes dungeons reproducible (daily runs, bug repro).
run_seed = chosen_seed or random_seed()
rng = Rng(run_seed) # use your engine's seedable RNG, not global random
dungeon = generate_dungeon(rng, depth) # same seed + depth => same dungeon
# Persist run_seed in the save so a crash can resume the same world (see save-systems).
```
### 2. Energy-based turn scheduler (speeds differ)
```python
# Pseudocode. Actors gain energy each tick and act when they have enough.
# Faster actors gain more per tick, so they act more often — no fixed "player then enemies".
TURN_COST = 100
def next_actor(actors):
while True:
for a in actors: # 1) serve anyone already ready, in a stable order
if a.energy >= TURN_COST:
a.energy -= TURN_COST # (or the cost of the action they choose)
return a # this actor takes exactly one action now
for a in actors: # 2) nobody is ready: advance time for everyone at once
a.energy += a.speed # e.g. speed 100 = normal, 150 = hasted, 50 = slowed
```
Grant energy to everyone in a separate pass. Adding it inside the same loop that returns the
first ready actor starves every actor after it: with two speed-100 actors, the first one acts
every time and the second never does.
### 3. Field of view + explored memory
```python
# Pseudocode. Recompute visibility from the player each time they move.
visible = compute_fov(map, player.pos, radius=8) # symmetric shadowcasting (see refs)
for cell in visible:
explored.add(cell) # remember it forever (dim "fog of war")
# Render: visible -> lit; explored-but-not-visible -> dim; never-seen -> hidden.
```
Use symmetric shadowcasting (refs §3): if you can see a monster, it can see you. Classic
recursive shadowcasting is fast but not symmetric, and a naive raycast per cell gives blind
spots and "blinking" vision. If a library is available, use its symmetric mode (python-tcod's
`compute_fov` takes `FOV_SYMMETRIC_SHADOWCAST` as its algorithm).
## Pitfalls / failure modes
- **Disconnected dungeons** → rooms the player can't reach. Always run a connectivity/flood-fill
pass and carve corridors until every walkable cell is reachable.
- **Naive FOV** → vision that flickers or is asymmetric (you see them, they don't see you).
Use symmetric shadowcasting and test symmetry (refs §3).
- **One actor never gets a turn** → energy granted inside the "find who is ready" loop
(Pattern 2). Advance energy for all actors in its own pass.
- **Real-time loop pretending to be turn-based** → input races and double-moves. Resolve one
discrete turn at a time; queue input.
- **Flat difficulty** → no descent pressure. Scale monsters/loot by depth and keep resources scarce.
- **Permadeath that wipes meta-unlocks** → frustration. Separate *run* state (wiped) from
*profile* state (unlocks, scores) when saving (see `save-systems`).
- **Save-scumming a "permadeath" game** → delete or invalidate the run save on load if you want
true permadeath; keep only the profile.
- **Unreadable state** → the player can't plan. Show HP, turn results, and a message log.
## Composition (build it from these skills)
- **Generation:** `procedural-gen` (noise, seeded RNG, dungeon/room algorithms) — the engine of replayability.
- **Map rendering:** `godot-tilemap` / `unity-tilemap-2d` for the grid; `level-design` for set-piece rooms/vaults.
- **Enemies:** `game-ai` for monster decision-making (often simple on a grid: seek/flee/patrol).
- **Persistence:** `save-systems` for run-resume, profile/meta-progression, and true permadeath wipes.
- **Scripting/data:** `godot-resources` / `unity-scriptableobjects` to define items, monsters, and drop tables as data.
- **UI:** `godot-ui-control` for the message log, inventory, and HUD.
- **Feel:** `game-feel` for hit/death juice — screen shake and hit-stop that sell impacts on a turn-based grid.
## References
- For dungeon-generation algorithms (rooms-and-corridors, BSP, cellular automata, connectivity),
FOV (shadowcasting), and weighted loot/spawn tables, read `references/generation-fov-loot.md`.
© gamedev-skills · Apache-2.0 · gamedev-skills/awesome-gamedev-agent-skills