Guides seeded procedural generation of dungeons, maps, terrain, and world content for games. Covers seed derivation, algorithm selection, budgets, validation, and caching.
Ships in game-dev. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
State these for each generator. They set where validation effort goes.
boilerplate/dungeon-generator.ts). Math.random() cannot be seeded or reset by the caller.<worldSeed>:<system>:<id>), so changing one generator does not shift the output of the others. Read templates/world-seed-config.md when you design the derivation and the generation order.while (true).| Content | Algorithm | Notes |
|---|---|---|
| Rooms and corridors | BSP tree | Split recursively, one room per leaf, connect rooms along the tree. Rooms never overlap. Tree nodes can group rooms into themed wings. |
| Caves | Cellular automata | Fill at random, then repeat a neighbour rule. Parameters interact, so you cannot ask for "N rooms". |
| Terrain heights | Gradient noise summed over octaves | One noise scale gives uniform undulation. Add octaves at half amplitude per doubled frequency. Never fill a heightmap with independent random values. |
| Plants and other self-similar shapes | L-systems | Rewrite all symbols in parallel, then draw the string. |
| Tile worlds from an example | Wave Function Collapse | Output only contains patterns found in the input. Propagation can remove every option for a cell (a contradiction), so allow a restart. |
| Mission order (keys, locks) | Graph grammar, then layout | Generate the mission graph and the space as two steps. |
| Hand-made rooms assembled at random | Template chunks | Use when authored quality matters more than novelty. Spelunky works this way. |
Read references/algorithms.md when you need the parameters, steps and failure modes for BSP, cellular automata, noise octaves or the witness-path check.
For a full runtime pipeline (voxel generation, polygonization, texturing, population, simulation), watch the GDC 2017 talk "Continuous World Generation in 'No Man's Sky'" by Innes McKendrick. The link is in references/sources.md.
maxRetries.null after maxRetries and let the caller loosen the budget.const generateWithValidation = <T>(
generator: (rng: () => number) => T,
validator: (result: T) => boolean,
makeRng: (attempt: number) => () => number,
maxRetries: number,
): T | null => {
for (let attempt = 0; attempt < maxRetries; attempt++) {
const result = generator(makeRng(attempt));
if (validator(result)) return result;
}
return null;
};
Pick two or three metrics that do not simply echo your input parameters (for example, linearity or density, not "difficulty" if difficulty is an input). Generate a large sample, plot a 2D histogram of the metrics and read the hot spots. Compare the plots across parameter settings to see how much control the parameters give. This finds bias. It does not prove quality.
import { DungeonGenerator } from './dungeon-generator';
const dungeon = new DungeonGenerator().generate('my-seed-123', {
width: 80,
height: 60,
minRooms: 5,
maxRooms: 12,
minRoomSize: 4,
maxRoomSize: 10,
corridorWidth: 1,
});
// dungeon.rooms, dungeon.corridors, dungeon.entrance, dungeon.exits, dungeon.grid
boilerplate/dungeon-generator.ts: copy when you need a seeded BSP dungeon generator with rooms, corridors, entrance, exits and a cell grid. It retries up to 20 times and throws when the budget is too tight.templates/world-seed-config.md: read when you design seed derivation, generation order and the store-or-regenerate split.references/algorithms.md: read when you implement BSP, cellular automata, noise octaves or the witness-path check.references/sources.md: read when you need the source behind a claim.game-economy-design (loot tables, drop rates)postgres-game-schema (stored generated content)redis-game-patterns (session caches)game-backend-architecture (server-side generation)What SKILL.md sets; muted values are Claude Code's defaults
/game-dev:procedural-genfrom game-dev
npx claudepluginhub fcsouza/agent-skills --plugin game-dev39 skills in this plugin
/betterauth-integrationCovers the game-specific layer of Better Auth: player, moderator and admin roles, session checks on game routes and WebSocket handshakes, and keeping the auth session apart from the game session. Use when a game needs player login, moderator or admin powers, or authenticated real-time connections, and the project uses Better Auth./bullmq-game-queuesBackground job design for game backends on BullMQ and Redis: one queue per game domain, idempotent reward fulfilment, and cron schedulers for daily rewards and season ends. Use when a game needs matchmaking requests, reward grants, match results, notifications or analytics processed off the request path, or recurring and timed jobs such as daily login rewards, leaderboard snapshots and season rollovers./character-design-narrativeCovers designing game characters: NPCs, companions, antagonists, player avatars, character bibles and branching dialogue. Use when a game needs a new character written, an NPC feels flat or interchangeable, or dialogue needs a branching format with conditions and effects./ci-cd-gameGitHub Actions pipeline rules for a Bun game backend on Neon and Fly.io: migrations before deploy, one Neon database branch per pull request, a smoke test after deploy, and a pinned Bun version. Use when a game project needs CI, a deploy workflow, preview databases for pull requests, or a safe order for schema migrations and server deploys./elevenlabs-sound-musicCovers generating game audio with ElevenLabs (voice lines, sound effects, music) and Google Lyria 2 (instrumental music clips), and playing it in the browser through an audio state machine with crossfades, per-layer volume and an unlock on the first user input. Use when a game needs sound effects, NPC voice lines or a soundtrack, when music must follow game state (menu, exploration, combat, boss) without hard cuts, when audio stays silent on a phone until the player taps, or when choosing between ElevenLabs and Lyria for music./game-anti-cheatCovers how a developer defends their own online game against cheating: server-side input validation, withholding hidden state, lag-compensation limits, dupe-proof transfers, detection from server data and reports, and enforcement with delayed bans, appeals and refunds to victims. Use when a multiplayer game has speed hacks, wallhacks, aimbots, bots, item or currency dupes, real-money trading, boosting or win trading, or when planning how to detect and ban cheaters.Other plugins' skills for the same job