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.
npx skills add XeldarAlz/everything-claude-unity --skill procedural-generationgit clone --depth 1 https://github.com/XeldarAlz/everything-claude-unityWrote 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.
[](https://agentmods.dev/skills/xeldaralz/everything-claude-unity/procedural-generation)<a href="https://agentmods.dev/skills/xeldaralz/everything-claude-unity/procedural-generation"><img src="https://agentmods.dev/badge/skills/xeldaralz/everything-claude-unity/procedural-generation.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00039 | $0.07132 |
| Opus 5 | $0.00019 | $0.03566 |
| Sonnet 5 | $0.00008 | $0.01426 |
| Haiku 4.5 | $0.00004 | $0.00713 |
Grade A, and why
procedural-generation 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 5d ago.
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.
How it starts
The opening of the file, as written. The whole thing — 988 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Procedural Generation Patterns
Patterns for generating content at runtime: terrain with noise, dungeons with BSP, caves with random walk, loot with weighted tables, and tile layouts with wave function collapse. All patterns support seed-based reproducibility.
Seed-Based Reproducibility
Every generation algorithm should accept a seed. Given the same seed, the output is identical. This enables shareable worlds, bug reproduction, and daily challenge modes.
Critical rule: Use System.Random (not UnityEngine.Random) for deterministic generation. UnityEngine.Random is a global singleton; any other code calling it between your generation steps will change the sequence.
public class SeededRandom
{
private System.Random _rng;
public int Seed { get; }
public SeededRandom(int seed)
{
Seed = seed;
_rng = new System.Random(seed);
}
public int Next(int min, int max) => _rng.Next(min, max);
public float NextFloat() => (float)_rng.NextDouble();
public float Range(float min, float max) => min + (max - min) * NextFloat();
public bool Chance(float probability) => NextFloat() < probability;
/// <summary>Shuffle a list in place using Fisher-Yates.</summary>
public void Shuffle<T>(IList<T> list)
{
for (int i = list.Count - 1; i > 0; i--)
{
int j = _rng.Next(0, i + 1);
(list[i], list[j]) = (list[j], list[i]);
}
}
}
For world generation, derive sub-seeds from the master seed so different systems (terrain, dungeons, loot) do not interfere:
int masterSeed = 12345;
var terrainRng = new SeededRandom(masterSeed);
var dungeonRng = new SeededRandom(masterSeed + 1);
var lootRng = new SeededRandom(masterSeed + 2);
Noise-Based Terrain Generation
Use Perlin noise to generate height maps for terrain, biome maps, moisture maps, and other continuous fields.
Basic Height Map
using UnityEngine;
public static class NoiseGenerator
{
/// <summary>
/// Generate a 2D noise map. Values range from 0 to 1.
/// </summary>
public static float[,] GenerateNoiseMap(
int width, int height, int seed,
float scale, int octaves, float persistence, float lacunarity,
Vector2 offset)
{
var map = new float[width, height];
// Use seed to generate random octave offsets
var rng = new System.Random(seed);
var octaveOffsets = new Vector2[octaves];
for (int i = 0; i < octaves; i++)
{
float ox = rng.Next(-100000, 100000) + offset.x;
float oy = rng.Next(-100000, 100000) + offset.y;
octaveOffsets[i] = new Vector2(ox, oy);
}
if (scale <= 0f) scale = 0.001f;
float maxNoise = float.MinValue;
float minNoise = float.MaxValue;
float halfW = width / 2f;
float halfH = height / 2f;
for (int y = 0; y < height; y++)
{
for (int x = 0; x < width; x++)
{
float amplitude = 1f;
float frequency = 1f;
float noiseHeight = 0f;
for (int o = 0; o < octaves; o++)
{
float sampleX = (x - halfW + octaveOffsets[o].x) / scale * frequency;
float sampleY = (y - halfH + octaveOffsets[o].y) / scale * frequency;
// Mathf.PerlinNoise returns 0-1; remap to -1 to 1
float perlin = Mathf.PerlinNoise(sampleX, sampleY) * 2f - 1f;
noiseHeight += perlin * amplitude;
amplitude *= persistence; // Each octave contributes less
frequency *= lacunarity; // Each octave has finer detail
}
map[x, y] = noiseHeight;
if (noiseHeight > maxNoise) maxNoise = noiseHeight;
if (noiseHeight < minNoise) minNoise = noiseHeight;
}
}
// Normalize to 0-1
for (int y = 0; y < height; y++)
for (int x = 0; x < width; x++)
map[x, y] = Mathf.InverseLerp(minNoise, maxNoise, map[x, y]);
return map;
}
}
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.
- 5d ago First seen · 988 lines · 39 tokens per session scan A 8672ae604cb0
procedural-generation is a skill published in the GitHub repository XeldarAlz/everything-claude-unity (22 stars, last pushed 4mo ago), licensed MIT. It adds 39 tokens to every session and 7,132 once invoked, about $0.0002 per session on Opus 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-09-03.
Other skills, from other repositories
foundations-queueing-theory
Applies queueing theory (Little's Law, M/M/c, Erlang, Kingman, USL) to capacity and latency decisions. Use when load causes non-linear latency growth or queue overrun risk.
gamedev-godot
Creates Godot games from empty project to exported build. Use when starting, building, validating, or shipping a Godot 2D/3D game or app.
gamedev-roblox
Creates Roblox experiences from empty Studio place to published world. Use when starting, building, validating, or shipping a Roblox game.
Read, create and manipulate PDF files — extract text and tables, merge, split, rotate, reorder and delete pages, read and fill AcroForm fields, add or strip metadata, encrypt and decrypt, and generate new PDFs from HTML or from scratch. Also covers rasterising pages to images so a PDF can actually be looked at, and…
xlsx
Create, read and edit Microsoft Excel .xlsx spreadsheets — data tables, formulas, multiple sheets, number formats, conditional formatting, charts, frozen panes and named ranges. Also covers reading an existing workbook to extract values or formulas, recalculating formulas so cached values are correct, converting to…
rove
Use when controlling Rove tasks, parallel coding attempts, hosted agent sessions, task lifecycle, or the daemon-owned issue tracker from a shell. Also the ONLY channel for messaging another agent session on this machine — rove api send, never a peer/MCP side channel.