/game:balance-model-datafrom Game Design and Build
Keep a game's numbers in a scripted balance model (for example Python modules) that checks design targets and exports the JSON the Godot game loads, and change that data without drift. It covers the edit-export-diff loop, FAIL-key baselines, deterministic exports, parity fixtures between the model and GDScript, what-if and lever searches inside the model, and design docs whose tables must match the model. Use it whenever someone wants to change a price, a yield, a pacing curve, a content table or an upgrade row that a script exports; asks why the model and the game disagree, why a parity test fails, or why a chapter runs too long; wants to tune or fit levers before touching game data; or writes a design doc full of numbers, even if nobody says "balance model" or "source of truth".
Ships in Game Design and Build. 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; scripts run unread.
An incremental game has hundreds of numbers: prices, yields, health, pacing, unlock gates. When people edit them by hand in JSON or in game code, the numbers drift apart and nobody can say whether a change broke a design target. The fix is one scripted model that owns every number, prints numbered PASS or FAIL lines against the design targets, and exports the JSON that the game loads. Every change then goes through a fixed loop: baseline, edit the source, export, diff, compare FAIL keys, regenerate parity fixtures. It works because each step leaves a byte-level record, so a reviewer sees exactly which rows moved and which targets broke.
Rules: game:game-balance-auditor holds the rules for economies and pacing; this skill keeps the numbers that those rules judge.
bot-balance-loop), then bring them into the model.upgrade-tree-design.The model is a set of modules, for example one per domain (content, bosses, variants, areas, pacing). Each module prints numbered target lines, exits non-zero on any FAIL, and writes its export. The game only reads the exports.
shasum exports/*.json > before.sha). Check: the baseline files exist and are non-empty.cost wall: node_12. Record the set of pre-existing FAIL keys. Why: old FAIL lines hide new ones, and a module can exit 1 on old rows, so the exit code alone proves nothing. Check: you can print the baseline key set (scripts/fail_keys.py does this).git archive HEAD <every dir the model reads> | tar -x -C /tmp/base, or a detached base worktree. Copy every folder the model imports, not
only the module you edit. Check: the base copy prints the same FAIL keys as your baseline.git diff --stat and git diff -U0 on the exports. Only your rows or keys may change. Some projects write each export to the model folder and copy it into the game folder; compare the 2 copies with cmp. Check: every changed line traces to your edit.shasum -c passes on the second run.git checkout -- <file>, or a row-level restore script that keeps unowned rows byte-equal. Check: git status lists only your files.git grep -n '^<<<<<<<').godot-testing).
Why: a folder-only run misses stale parity fixtures, telemetry that does not subscribe to a new signal, and fixtures that pin old rows. Check: the full suite passes.The model and the game both predict the same numbers. Treat the model as a tool and the game as the truth. When they disagree, the measured game table decides.
Use the fast model to test pacing and economy changes before you touch game data.
row.field=value overrides or a JSON override file. They print the target line and the rows that move. A what-if never writes the export files.Prefer slow gains plus spike moments to a smooth slow curve. A smooth curve can turn one chapter into dozens of farm runs (see upgrade-tree-design).
Design docs repeat ids, names, counts and number tables. Make a check script own that agreement.
godot-testing)..po or .csv translation files) or a text table in the design docs. The other files must agree with it. If the source is a design-doc table, parse its rows into JSON with a count per section, and add a test that loads the JSON. If the source is a localization resource, check the docs against its keys instead.git show <branch>:<path>. Remove every statement you cannot source.| Symptom | Cause | Fix |
|---|---|---|
| A report-only model run left tracked exports changed, or re-exported another change's rows. | Modules write exports as a side effect. | Run on a scratch copy, or git checkout the files after each run. Check first whether a script writes files. |
| A scripted replace changed 2 rows, or silently matched 0. | Replace by value or by line number. | Replace by unique text and assert exactly 1 match. |
| A plain re-run on a new base changed many rows you did not touch. | The checked-in JSON already differed from the model inputs. | Stop and report the drift. Ship only your rows. |
| A base run in a temp folder showed 0 FAIL lines. | The copy missed sibling files that the model imports. | Archive every folder the model opens. |
| New FAIL lines were invisible; a module exited 1 anyway. | Pre-existing FAIL lines. | Compare FAIL key sets. The rule is "the same FAIL keys before and after". |
| A derived value moved when its source moved (for example health from appear time). | A hidden derivation. | Read the derivation and move both values on purpose. |
| Folder-only tests passed; other tests broke later. | A stale parity fixture, a new signal with no subscriber, fixtures that pin old rows. | Run 1 full suite after any data, price or signal change. Plan "regenerate the parity fixture" as a step. |
| Keys added to a shared stats dictionary broke the parity key count. | The stats function changed shape. | Add a separate apply step. Keep the stats function unchanged. |
| The game read old values for one row or one price family. | The exporter kept a frozen copy, or skipped a family. | Copy every field from the source row. Test that the 2 copies agree. Read the JSON diff. |
| Every existing row gained a new default field. | The exporter writes defaults. | Write the field only on rows that need it. |
| A placeholder row broke row-wide tests or added an unwanted trait. | It was copied from a real row. | Give placeholders neutral values and a placeholder: true flag that row-wide tests skip. |
| Removing a retired row broke many tests. | Tests use it as a fixture. | Keep the row. Remove it in a separate cleanup. |
| Fixture or export rows were missing. | An imported module filtered a shared table on import. | Deep-copy the table before the import and restore it after. |
| A second model gave different results from the same seed. | It replays a fixed draw order and a new factor took a draw. | Use the expected value of the new factor, not a new draw. |
| A doc table tool cut sections, or changed the doc on each run. | The tool is not block-scoped or not idempotent. | Replace only a marked block. Restore with git show HEAD:<file>. |
| Sorting failed in Python 3. | Mixed key types in tuples. | Sort with key=str. |
| Moving nodes between lists moved other nodes. | Layout derived from list order. | Keep the old layout slots. |
| A slow generator looked stuck. | It runs a full simulation. | Send output to a file. Check the process list before you call it stuck. |
| The model passed and the game failed. | The model read its own copy of the rows. | Make the model read the game rows exactly. |
| Measured power was a fraction of the model value at the first meeting. | The model was never calibrated. | Measure the real game first, then calibrate. |
| A fit passed every target with absurd values. | No guard rule. | Add a band rule, for example 0.5x to 4x of a reference price. |
| One shared lever could not satisfy 2 opposite targets. | Over-shared lever. | Use 1 value per currency, with a fallback per variant and a written reason. |
| A regenerate made no change. | The fixture was not the cause. | Stop and find the real cause before you change anything else. |
| The parity test showed a double count. | Stats applied a legacy list and the new rows. | Count each node once. |
| A lever did not move the output. | Another limit binds (a time cap, a pay cap). | Test that each lever moves the output before a grid. |
| The bot earned none of a rare currency, so the tree dead-ended. | A gate needs a currency that real play does not give. | Change the gate so a tier needs only the earlier tier. |
| NumPy was not installed. | Standard library only. | Solve a small least-squares fit with Gauss elimination. |
| Parallel model runs crashed or mixed results. | They wrote the same output file. | Give each run its own output copy and its own model state. |
| A model tool assumed the wrong run end. | A hard-coded end. | Read the end from the data. |
| A search grew too large and printed nothing. | Too many levers. | Stop, narrow the lever set, restart from the best near-fit. |
| A background what-if changed tracked files during a commit. | It writes outputs. | Run in the foreground, or stop and restore first. |
| A per-entity random seed pushed values across a band edge. | Small margins. | Check margins before the change. Apply the seed in every module that compares the same numbers. |
| The model ladder hid a wall that real players meet. | Model states were a near-maxed player. | Build states from a full-run purchase log. |
| Pacing ran past the end of the ladder data. | Too few states. | Pad with the last state and spend nothing on padded runs. |
| The shell split a multi-edit override. | Quotes. | Quote each override as its own argument. |
| Logs grew to megabytes. | Per-second lines. | Keep only the summary lines the tools read. |
| A new rule arrived mid-task. | Changed requirements. | Record it first, replace every out-of-band value, then fit again. |
| A count check counted 1 item twice. | 2 docs list it. | Remove duplicates before a count. |
| New player-facing lines overflowed the UI. | No length check. | Check against the old maximum length. |
sed stopped early or failed on macOS. | A loose range pattern; BSD sed syntax. | Use a tighter pattern, an edit tool, or sed -i ''. |
N. <check>: PASS|FAIL <subject> <numbers>, exits non-zero on FAIL, and has an export function.python3 scripts/fail_keys.py before.txt after.txt. It exits 1 when a new key appears. The default key is the text before the word FAIL, with each number replaced by #; --pattern with a (?P<key>...) group sets your own key.shasum <exports> > a; export; shasum -c a.rep(path, old, new) that fails unless it finds exactly 1 match.bot-balance-loop: makes the measured game tables that this model calibrates against.upgrade-tree-design: designs tree shapes and buy policies with real bot play; this skill holds the numbers that design produces.godot-testing: the full suite at the end of a data change and the negative-test idea.feature-seams-and-saves: optional row keys, flagged modes, and save migration when rows change.safe-refactor-and-review: proves that a model refactor keeps every output byte-equal.fleet-game-dev: asserted scripted edits, ownership of generated files, and how to report a block when no lever can pass.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub mattmakes/skill-marketplace --plugin game30 skills in this plugin
/art-directionUse when a game concept needs its visual direction set: a style sheet (palette, shape language, lighting, texture), a shot list tied to the target fun, and image-generation prompts for a key art, hero and gameplay-mock placeholder. Trigger on: "art direction", "style sheet", "what should this look like", "shot list", or when `game-brief` needs its art section. Every image prompt carries fixed content-boundary negatives and never names a living artist./bot-balance-loopTune bosses, encounters and game rules with scripted bots that play the real Godot game headless, then compare the measured tables against written target bands. The loop writes the bands first, builds a fight tool with several bot steerings (coached, tight, wide, wait, ram), runs fixed seeds with repeatable flags, builds a table of first-try wins, mean tries, resource left and fight length, names each odd result BOT or GAME, and changes 1 lever at a time. It also covers model start states, rule probes, a shared pipeline, wall triage by snapshot replay, a full-playthrough bot, coach text from winning fights and telegraph-to-hit tests. Use it whenever someone wants to balance or retune a boss, check a kill rate or a difficulty band, find out why players or bots stall at an encounter, measure a rule change with encounter bots or a full-playthrough bot, or run a bot playthrough of the whole game, even if nobody says "bot table" or "target band".