# AnimStream game agent kit

Everything a coding agent such as Claude Code or Codex needs to build, test and
publish an AnimStream Originals game with Godot 4: project instructions, skills,
the protocol reference, the binding art direction with a style pack and an
action image generator, a manifest schema, TypeScript protocol types, a local
mock Studio, a release ZIP packer and the release CLI. Together with the Godot
template (`animstream-godot-sdk.zip`) it takes a game from an idea to a verified
release ZIP.

Download: https://animstream.com/game-sdk/animstream-game-agent-kit.zip
(SHA-256 in https://animstream.com/game-sdk/checksums.json). Documentation:
https://animstream.com/developers/games.

> **Availability.** Newer Studio versions announce what they support: features in `ready.features` and manifest capabilities such as `presets`, `action-images` and `action-effects`. Older Studio versions ignore them, and your game still runs.

Every game built with the kit follows the **Originals checklist** in `AGENTS.md`
(14 binding points, each with a concrete check): actions with short
descriptions and images, three presets by coin value, Gift Wall, leaderboard,
default gift rules, a lobby with auto start, German and English, a pause menu,
the leaderboard screen, a portrait-stream window, licensed music, store
material and green mock Studio scenarios. The Godot template already
implements points 1–12.

## Start a game in three steps

1. Create an empty folder and start your agent in it.
2. Paste the bootstrap prompt from `BOOTSTRAP-PROMPT.en.md` (German:
   `BOOTSTRAP-PROMPT.de.md`) and replace the placeholder with your game idea.
3. Answer the agent's questions: the game ID from the developer dashboard and,
   if it cannot find it, where your engine editor is installed.

The agent downloads and verifies this kit and the Godot template, installs
both, designs the manifest with presets and action images, implements the idea
in the template, tests it with the mock Studio, exports it, prepares the store
material and reports the status of every checklist point.

### Claude Code

```sh
mkdir my-game && cd my-game
claude
```

Paste the prompt. Claude Code reads `CLAUDE.md`, which imports `AGENTS.md`, and
loads the skills from `.claude/skills/`. It uses a skill when a task matches; you
can also ask for one by name ("use the animstream-test skill"). After the kit is
installed in a running session, restart Claude Code if the skills do not show
up yet.

### Codex

```sh
mkdir my-game && cd my-game
codex
```

Paste the prompt. Codex reads `AGENTS.md` in the project root. The installer
copies the skills to `.agents/skills/`, the repository location documented for
recent Codex versions. Skill locations have changed between Codex releases
(older releases used `~/.codex/skills/` for user skills). Check the skills
documentation of your version (`codex --version`); if the AnimStream skills are
not listed when you ask Codex which skills it can use, copy the folders from
`skills/` to the location your version documents. All rules are in `AGENTS.md`,
so Codex works correctly even without skills.

### Other agents

Agents that read `AGENTS.md` (Cursor, Gemini CLI, Windsurf, Aider and others)
work the same way. If an agent has no skill support, tell it to read the
matching `SKILL.md` before a task: `skills/animstream-test/SKILL.md` before
testing, for example.

## Install into an existing project

From the project root:

```sh
sh path/to/kit/install-skills.sh --project .                     # macOS, Linux, Git Bash
```

```powershell
powershell -NoProfile -ExecutionPolicy Bypass -File path\to\kit\install-skills.ps1 -Project .
```

| Installed | Where |
|-----------|-------|
| skills (always) | `.claude/skills/<name>/` and `.agents/skills/<name>/` |
| `AGENTS.md`, `CLAUDE.md` (with `--project`) | project root; an existing file is kept and the kit version saved as `animstream/AGENTS.kit.md` or `animstream/CLAUDE.kit.md` |
| tools (with `--project`) | `tools/mock-studio/`, `tools/package/`, `tools/release/`, `tools/art/` |
| reference (with `--project`) | `animstream/PROTOCOL.md`, `ART-DIRECTION.md`, `ART-DIRECTION.de.md`, `art/` (style pack and prompt template), `manifest.schema.json`, `animstream-protocol.ts`, `manifest.zombie-prank.json` |
| `.gdignore` (with `--project`) | in `tools/` and `animstream/`, so Godot neither imports nor exports them |
| `.gitignore` block (with `--project`) | `build/`, `dist/`, `test-results/`, `tools/mock-studio/node_modules/`, `.godot/`, `.animstream-kit/`, `.env*` |

Without `--project` only the skills are installed. Run the installer again to
update the skills and tools to a newer kit.

## Contents

| File | Purpose |
|------|---------|
| `BOOTSTRAP-PROMPT.en.md`, `BOOTSTRAP-PROMPT.de.md` | The copy-paste prompt that starts a new game. |
| `AGENTS.md` | Project instructions for game repositories: the binding Originals checklist, manifest rules for presets and action images, music licensing, store material, rules, architecture, definition of done. |
| `ART-DIRECTION.md`, `ART-DIRECTION.de.md` | Binding art direction of action images and store material: common look, style pack, two-step generation (paint, cut out), post-processing, visual check, test approval, prompt template, API keys, store material sizes and checks. |
| `art/reference/` | Style pack: five approved AnimStream mod cliparts (transparent PNG), only as references for the image generator, never shipped (licence in its README). |
| `art/action-prompts.example.json` | Binding prompt template; each game copies it to `tools/art/action-prompts.json`. |
| `CLAUDE.md` | Imports `AGENTS.md` for Claude Code. |
| `PROTOCOL.md` | Normative protocol 1 reference (also at https://animstream.com/game-sdk/PROTOCOL.md). |
| `manifest.schema.json` | JSON Schema (draft 2020-12) of `manifest.json`. |
| `animstream-protocol.ts` | Standalone TypeScript types of the manifest and every message. |
| `examples/manifest.zombie-prank.json` | Complete example manifest with every extension: sabotage and mercy actions with images, three presets, Gift Wall, leaderboard. |
| `skills/` | `animstream-game`, `animstream-manifest`, `animstream-test`, `animstream-release`, `animstream-update`. |
| `tools/mock-studio/` | Local Studio emulator: launches the game, runs scenarios, checks every frame (Node.js 20+, `npm ci`). |
| `tools/package/` | Packs all platforms into `dist/` with `release.json` (`--all`, including the `media/actions/` images), builds and preflights release ZIPs with the server's rules, writes placeholder action images; `unreal-stage.mjs` packages and stages Unreal Engine builds (Node.js 20+, no dependencies). |
| `tools/release/` | Release CLI: login, publish a release bundle with verification, media, details, checklist, submit for review (Node.js 20+). |
| `tools/art/` | Action image generator: paint with references (fal.ai or OpenAI, or your agent's own image tool), cut out, post-process to 512×512, contact sheet and Gift Wall preview, `--test 2` approval images, `--check` (Node.js 20+, no dependencies; keys from the environment or the OS secret store). |
| `install-skills.sh`, `install-skills.ps1` | Installers. |

## Skills

| Skill | Use it to |
|-------|-----------|
| `animstream-game` | build a game with Godot 4 (or Unreal Engine 5 with its template) from an idea, starting from the template (notes for Unity included) |
| `animstream-manifest` | design, change and validate `manifest.json`, presets and action images |
| `animstream-test` | test with the mock Studio, including old-Studio compatibility |
| `animstream-release` | export, package, prepare store material and publish the first release |
| `animstream-update` | fix bugs or add content and ship an update |

## Releases

One command packs every platform, one publishes the release:

```sh
node tools/package/animstream-pack.mjs --all              # build/windows|macos|linux -> dist/*.zip + dist/release.json
node tools/release/animstream-release.mjs login           # once: you approve it in the browser
node tools/release/animstream-release.mjs publish dist/release.json --wait [--submit]
```

`login` prints a link and a short code. You open the link, check the code, choose
the game and the lifetime of the token and approve; the token goes straight into
the OS secret store (macOS Keychain, Linux libsecret, Windows DPAPI; `--store
file` as opt-in fallback). The agent never sees it. For CI you can set
`ANIMSTREAM_API_TOKEN` (`asg_…`, created in the dashboard under "API-Tokens"),
which takes precedence. Never commit, print or embed a token in a game build; use
a token limited to one game for CI; revoke it in the dashboard if it leaks.
Tokens cannot create games, change prices, manage tokens or approve anything.

More commands: `suggest` (next version), `checklist` (what is missing before
review), `media` (covers per language, icon, screenshots, trailers with
posters, `--action-image <actionId>=<file>`), `details` (texts), `status`,
`submit`, `delete-build`, `whoami`, `logout`, and the older single-build
`upload`. macOS builds can be `universal` (one fat binary). Large ZIPs use
multipart uploads that retry a failed chunk within the current upload. Upload
progress is not persisted across separate browser sessions or CLI invocations.
See `tools/release/README.md` and `tools/package/README.md`.

## Verify downloads

Compare the SHA-256 of every downloaded archive with `checksums.json`:

```sh
sha256sum animstream-game-agent-kit.zip          # Linux
shasum -a 256 animstream-game-agent-kit.zip      # macOS
Get-FileHash -Algorithm SHA256 animstream-game-agent-kit.zip   # PowerShell
```
