codex

Regenerates the Shattered Pixel Dungeon mechanics Codex via Gradle and explains any diff.

Updated Sep 3, 2026
One-click install
npx skills add https://github.com/watchthelight/shatterfish --skill codex-watchthelight
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codex
Source: https://github.com/watchthelight/shatterfish/tree/main/.claude/skills/codex
Command: npx skills add https://github.com/watchthelight/shatterfish --skill codex-watchthelight

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? The Shatterfish Codex is a generated reflection dump of upstream game mechanics tables that must never be hand-edited, and CI fails on drift. This Skill regenerates it locally, verifies it is current, and explains exactly what changed and why. ## Core Features & Use Cases - Codex Regeneration: Runs ./gradlew :codex:generate from a clean tree and reports git status and diff stats for codex/ and docs/codex/. - Diff Explanation: Identifies which table changed (mobs, items, generator weights, mob rotation, traps, recipes, changelog, vocabulary) with before/after example rows, and classifies the cause as an upstream tag change, a generator change, or a non-determinism bug. - Drift Detection: Answers whether the Codex is current and flags non-deterministic generator behavior as a bug before anything else. - Use Case: After merging a new upstream tag, ask to regenerate the codex; the Skill regenerates the JSON dump, explains that the mob rotation table changed due to the tag bump, and lists the rules pages citing affected classes for re-verification. ## Quick Start Ask the assistant to regenerate the codex and tell you whether it is current and what changed.

Frequently Asked Questions about codex

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I regenerate the Shatterfish Codex?

Run ./gradlew :codex:generate from a clean git tree, then check git status and diff for the codex/ and docs/codex/ directories. The Skill performs these steps and summarizes what changed.

How do I check if the codex is current?

Regenerate it with the Gradle task and inspect git status for codex/ and docs/codex/. A clean result means the Codex matches the pinned upstream tag; any diff indicates drift that must be explained and committed.

Why does the codex diff show changes after regeneration?

Changes come from an upstream tag bump, a generator change in the current branch, or non-deterministic generator behavior. The first two are expected; the third is a bug that must be reported before proceeding.

Can I edit files under codex/ or docs/codex/ by hand?

No. The Codex is generated output and is never hand-edited; CI regenerates it and fails on drift. If a page is wrong, the fix belongs in the generator, not the generated files.

What happens if the codex generator is not built yet?

If the codex module has no generator entry point, the Codex is unfinished E2 milestone work. The Skill reports this and stops instead of attempting regeneration.