unbanished: Skill for Claude Code

.agents/skills/banished-emulate/SKILL.md

banished-emulate is a skill for Claude Code, Codex from tanepiper/unbanished. It costs 86 tokens per session (970 once invoked), scanned A, original, Apache-2.0.

A workflow for running selected functions from the original Banished program in an emulator, a tool that imitates the original processor and operating-system environment. It captures exact results and uses them to guide a Rust implementation.

In plain words
What is it for?
Use it for random numbers, terrain and noise generation, mesh creation, map queries, placement rules, name generation, and other calculations that need matching results.
Why use it?
It provides a reference for numeric or procedural behaviour when an approximate result is not enough. Tests can then check that the new code matches the original output.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is tanepiper/unbanished's own configuration. It tells Claude Code and Codex how to work on unbanished itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything unbanished configures →

Reuse

Borrowing it

Nothing to install: this file belongs to tanepiper/unbanished. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/tanepiper/unbanished/main/.agents/skills/banished-emulate/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/tanepiper/unbanished

Made for: Claude Code, Codex.

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 banished-emulate

README.md
[![agentmods](https://agentmods.dev/badge/skills/tanepiper/unbanished/banished-emulate/github.svg)](https://agentmods.dev/skills/tanepiper/unbanished/banished-emulate)
Your own site
<a href="https://agentmods.dev/skills/tanepiper/unbanished/banished-emulate"><img src="https://agentmods.dev/badge/skills/tanepiper/unbanished/banished-emulate/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 banished-emulate

Your own site · 80×15
<a href="https://agentmods.dev/skills/tanepiper/unbanished/banished-emulate"><img src="https://agentmods.dev/badge/skills/tanepiper/unbanished/banished-emulate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 86 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 970 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.00086 $0.00970
Opus 5.5 $0.00034 $0.00388
Sonnet 5.5 $0.00017 $0.00194
Haiku 4.5 $0.00009 $0.00097

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

Security

Grade A, and why

banished-emulate 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 3d 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.

.agents/skills/banished-emulate/SKILL.md · 61 lines

How it starts

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

Emulate for ground truth, port until bit-exact

This is the method that produced the verified Random, Perlin, terrain generator, surface image, tile mesh, ground ray cast, cell types and start point. Use it whenever "close enough" isn't.

Setup

python3 -m venv .venv && .venv/bin/pip install unicorn pefile   # once

pe_emu.Emu(exe, dll) loads Application-steam-x64.exe and Runtime-steam-x64.dll at their preferred bases, links exe imports to DLL exports, stubs OS imports and replaces the engine allocator. API: malloc(size), write(addr, bytes), read(addr, n), u32/i32/u64/f32s, call(addr, *args) (Windows x64 ABI, returns rax), call_f32 (returns xmm0), hook_function(addr, name, handler) to stub a callee.

Steps

  1. Trace first (banished-trace): know the function's inputs — this layout, globals it reads (DAT_… pointers such as the game singleton at 0x1401cbdd8), and callees that touch the OS, threads, files, rendering or audio (those must be hooked/stubbed).
  2. Write a generator tools/emu/<topic>.py modelled on terrain_query.py / start_point.py:
    • module docstring with Usage: and what files it writes;
    • build the minimal object graph in emulator memory (malloc + struct.pack at traced offsets);
    • call the function across many inputs (all cells, a seeded grid of random positions, every seed in a small range) — cover edge cases (map borders, zero, negatives);
    • write raw little-endian outputs to game-data/derived/emu/<topic>/ (git-ignored). Never write ground truth into tracked paths.
    .venv/bin/python tools/emu/<topic>.py game-data/derived/emu/<topic>
    
  3. Port into crates/game (pure logic, no wgpu/winit). Mirror the original's arithmetic precisely: f32 vs f64, truncation vs rounding (cvttss2si → as i32), operation order (float addition is not associative), integer wrap (wrapping_*), signed shifts. Read the disassembly for these — Ghidra pseudocode often hides them.
  4. Parity test in crates/game/tests/ (see terrain_emu.rs): load the ground-truth files, skip with a message if game-data/ is missing (CI and other machines have no game files), compare exactly (assert_eq! on bits, f32::to_bits), and on failure report the first mismatching index plus a count.
    cargo test --release -p unbanished-game --test <name>
    
  5. If not exact, bisect: emulate intermediate callees separately (terrain_stages.py dumps each generator stage) and compare stage by stage.

Read the full file on GitHub · 61 lines

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. 3d ago First seen · 61 lines · 86 tokens per session scan A 8803d685cee2

Subscribe to this mod's changes

banished-emulate is a skill published in the GitHub repository tanepiper/unbanished (23 stars, last pushed 22d ago), licensed Apache-2.0. It adds 86 tokens to every session and 970 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-11-15.

Related

banished-emulate compared with skills from other repositories

banished-emulate next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
banished-emulatetanepiper/unbanishedSkill2322d agoApache-2.0A86Claude Code, Codex
soundclawiamlukethedev/Claw3DSkill2.5k14d agoMITA18Claude Code, Codex
task-manageriamlukethedev/Claw3DSkill2.5k14d agoMITA56Claude Code, Codex
todoiamlukethedev/Claw3DSkill2.5k14d agoMITA12Claude Code, Codex
gdunit-drivervalkor-ai/loomSkill1.5k8d agoApache-2.0A84Claude Code
gamedev-shippingericrisco/rsc-harnessSkill636todayMITA99Claude Code, Codex
self-evolvetettethu/VibeGameSkill38810d agoApache-2.0A50Claude Code, Codex