procedural-gen

procedural-gen is a skill for Claude Code from fcsouza/agent-skills. It costs 78 tokens per session (1,595 once invoked), scanned A, original, MIT.

A guide for building systems that create changing content from rules, inputs, or random values instead of storing every result by hand.

In plain words
What is it for?
Use it when implementing generated dungeons, maps, loot tables, worlds, noise-based terrain, varied non-player characters, or wave function collapse.
Why use it?
Procedural systems can be difficult to design consistently, especially when maps, rewards, terrain, or character behaviour must vary while following rules.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the game-dev plugin — 39 skills shipped together

Good fit Use it when implementing generated dungeons, maps, loot tables, worlds, noise-based terrain, varied non-player characters, or wave function collapse.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fcsouza/agent-skills/procedural-gen
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add fcsouza/agent-skills --skill procedural-gen
Clone the repo
git clone --depth 1 https://github.com/fcsouza/agent-skills

Made for: Claude Code.

Or install game-dev, the plugin that ships this one along with the rest of its 39 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for procedural-gen

README.md
[![agentmods](https://agentmods.dev/badge/skills/fcsouza/agent-skills/procedural-gen/github.svg)](https://agentmods.dev/skills/fcsouza/agent-skills/procedural-gen)
Your own site
<a href="https://agentmods.dev/skills/fcsouza/agent-skills/procedural-gen"><img src="https://agentmods.dev/badge/skills/fcsouza/agent-skills/procedural-gen/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for procedural-gen

Your own site · 80×15
<a href="https://agentmods.dev/skills/fcsouza/agent-skills/procedural-gen"><img src="https://agentmods.dev/badge/skills/fcsouza/agent-skills/procedural-gen.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,595 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00078 $0.01595
Opus 5.5 $0.00031 $0.00638
Sonnet 5.5 $0.00016 $0.00319
Haiku 4.5 $0.00008 $0.00160

Measured 19d ago against content hash ea08be6d726b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

procedural-gen scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 19d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (boilerplate/dungeon-generator.ts), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/procedural-gen/SKILL.md · 111 lines

How it starts

The opening of the file, as written. The whole thing — 111 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Procedural generation

Decide before you build

State these for each generator. They set where validation effort goes.

  • Online (at runtime) or offline (at build time). Runtime generators must run in milliseconds.
  • Necessary or optional content. A level with no reachable exit is a bug. A misplaced decoration is not. Validate necessary content fully and optional content lightly.
  • Deterministic or stochastic. Deterministic means the same seed and parameters give the same content, which lets you reproduce bugs, share seeds and regenerate instead of store.
  • Constructive (one pass) or generate-and-test (loop until a test passes). Both are normal. Generate-and-test needs a retry cap.

Rules

  1. Seed everything. Use a seeded PRNG such as mulberry32 (in boilerplate/dungeon-generator.ts). Math.random() cannot be seeded or reset by the caller.
  2. Derive one seed per system from the world seed (<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.
  3. Set the budget first. Min and max for rooms, enemies, items and path length come before any generation code. The budget is the design.
  4. Generate in layers. Macro structure first (world, regions, areas), then detail (rooms, props, items). Each layer constrains the next.
  5. Prefer playability by construction. Cap gap widths at the jump range and connect rooms along the tree. Check afterwards only what construction cannot promise.
  6. Emit a witness. Generate a solution path with the level and test it. A level with a valid path is solvable. Reachability found by a later search is a bug found late.
  7. Cap every retry loop. Fail with a clear error and loosen the budget. Never while (true).
  8. Do not simulate more detail than the player sees. Extra layers cost time and make causes hard to trace.
  9. Cache or regenerate, never both. Store what the player can change or what is slow to build. Regenerate what the player only observes.
  10. Version the generator. Any algorithm change makes old seeds produce different content. Store the generator version beside the seed.

Read the full file on GitHub · 111 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 19d ago Changed · -98 lines · +12 tokens per session ea08be6d726b
  2. 3mo ago First seen · 209 lines · 66 tokens per session scan A 42d4cfd9021b

Subscribe to this mod's changes

procedural-gen is a skill published in the GitHub repository fcsouza/agent-skills (29 stars, last pushed today), licensed MIT. It adds 78 tokens to every session and 1,595 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

procedural-gen compared with skills from other repositories

procedural-gen next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
procedural-genfcsouza/agent-skillsSkill29todayMITA78Claude Code
playtest-reportDonchitos/Claude-Code-Game-StudiosSkill42k24d agoMITA20Claude Code
godot-signals-groupsgamedev-skills/awesome-gamedev-agent-skillsSkill13k3d agoApache-2.0A93Claude Code
scenario-unreal-gameplayscenario-labs/skillsSkill4.7kyesterdayMITA121Claude Code
texture-workflowarjun988/blender-skillsSkill5.8k27d agoMITA41Claude Code
motionOpenDCAI/GameFactory-3ASkill1.6kyesterdayApache-2.0A0Claude Code, Codex
gamedev-shadersericrisco/rsc-harnessSkill707yesterdayMITA102Claude Code, Codex