
Building Spinlings, a creature game inside Claude Code’s mod UI
A free, open-source creature card game built as a Claude Code mod, using the mod API for session/model signals and view rendering, with a shared TypeScript battle engine, Cloudflare Worker/D1 backend, and server-authoritative online play.

この mod について
Spinlings is a creature collect-and-duel game running inside Claude Code as a mod. Players collect a three-card team, trade cards, and duel saved opponent teams. The mod API supplies session and model signals and renders game views; it never reads prompts, replies, tool contents, or project files, and makes no model calls of its own. A pure TypeScript battle engine is shared between the offline client and the online server, with rolls, ownership, trades, and battle results kept server-authoritative. Development notes highlight that mounted TSX views and real Desktop views behave differently for artwork pointer regions, and that narrow panes expose layout issues invisible at full width. The release is v0.2.16 under MIT, requiring Claude Code 2.1.287+ or a compatible Desktop Code session, with source, screenshots, tests, and installation instructions available.
インストール
インストール方法は元のソースをご確認ください。
原文 / README
I made Spinlings, a free, open-source creature game inside Claude Code. You collect a three-card team, trade cards with other users and duel their saved teams. I used Claude for the original game, which already had the TypeScript creature and battle engine, the TSX prompt band and collection pane, and the Cloudflare Worker/D1 backend. Codex helped with the later UI and testing iterations. Claude Code is also the actual runtime and test host. Its mod API supplies the session/model signals and renders the game views. The game reads the model family and whether Claude is working, never prompts, replies, tool contents or project files. It makes no model calls of its own. The useful architecture choice was sharing the pure TypeScript battle engine between the offline client and online server. Online rolls, ownership, trades and battle results stay server-authoritative. Duels use saved opponent teams, so nobody has to coordinate a live match. Each online server and the offline save keep separate collections. The UI lesson was that a mounted TSX view and a real Desktop view are different tests. Text clicks worked while creature artwork did not, so the artwork needed local pointer regions. Narrow panes also exposed layouts that were fine at full width. We kept battle input optional and moved team replacement into a chooser for all three slots. Claude Code’s SDK runner checks the game’s hooks and mounted views, and strict plugin validation checks the declared interface. Those checks do not substitute for native Desktop click and screenshot checks. Current release is v0.2.16, MIT, requiring Claude Code 2.1.287+ or a compatible Desktop Code session. Source, screenshots, tests and installation . https://preview.redd.it/altmef3kqwth1.png?width=672&format=png&auto=webp&s=73dc9ae8e45a0cdf12081bfc9c8c057b47afaea5 https://preview.redd.it/10v9gh3kqwth1.png?width=656&format=png&auto=webp&s=9d00a6f27a9997834ea7331d0db21ecae227b0cb submitted by /u/Other-Income-5085 [link] [comments]


