Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Codex Pet Platformer

Turn a packaged Codex pet (the output of hatch-petpet.json + spritesheet.webp) into a playable, customizable side-scrolling platformer, then deploy it to Netlify in one command.

The pet's fixed 8×9 / 192×208 sprite atlas drives the player character. You theme the world (palette, labels, difficulty), optionally generate matching art with the OpenAI Images API, and the builder assembles a self-contained static site — index.html + game.js + styles.css + assets/, no build step and no backend.

Packaged as both a Codex plugin and a Claude Code plugin.

Examples

Two pets, two themes, same skill:

Guardian — neon crystal cavern AI Superhero — futuristic AI metropolis
Guardian platformer AI Superhero platformer

Live demo: https://shmulik-ai-superhero.netlify.app

Requirements

  • Python 3 — that's all the build needs.
  • An OpenAI API key (OPENAI_API_KEY, or a Codex API-key login) + curl — only to generate custom art.
  • netlify-cli (+ netlify login) — only to deploy.

Install

Claude Code

/plugin marketplace add shmulc8/codex-pet-platformer
/plugin install pet-platformer@codex-pet-platformer

Codex

codex plugin marketplace add shmulc8/codex-pet-platformer

Then enable pet-platformer from the Codex Plugins menu and restart Codex.

Any agent (Vercel skills CLI)

The skill follows the open Agent Skills standard, so Vercel's skills CLI can install it into any of its 50+ supported agents:

# install for Claude Code and/or Codex (-g for global)
npx skills add https://github.com/shmulc8/codex-pet-platformer/tree/main/skills/pet-platformer -a claude-code -a codex

Usage

You need a packaged pet first (run the hatch-pet skill). Pets live at ${CODEX_HOME:-$HOME/.codex}/pets/<id>/.

SKILL_DIR=skills/pet-platformer

# 1. (Optional) theme it — copy and edit the starter config
cp $SKILL_DIR/templates/game-config.example.json game-config.json

# 2. (Optional) generate themed art (needs OPENAI_API_KEY)
python3 $SKILL_DIR/scripts/generate_assets.py \
  --pet <pet-id> --config game-config.json --out generated-assets \
  --keys background,collectible,walker

# 3. Build the static site
python3 $SKILL_DIR/scripts/build_game.py \
  --pet <pet-id> --config game-config.json \
  --output-dir <pet-id>-site --force

# 4. Run locally
cd <pet-id>-site && python3 -m http.server 8000   # open http://localhost:8000/

The output (index.html, game.js, styles.css, assets/) is fully self-contained — serve it with any static server or host.

Deploy

The output is a static site (relative paths, no backend), so it deploys anywhere. A one-command Netlify helper is included (needs netlify-cli + netlify login):

skills/pet-platformer/scripts/deploy_netlify.sh \
  --dir <pet-id>-site --name <pet-id>

First run creates https://<pet-id>.netlify.app; re-run with --site <id> (or NETLIFY_SITE_ID) to redeploy. Run with --help for all options. The bundle also works on GitHub Pages or any other static host unchanged.

Built with PetDex

--petdex <slug> pulls a pet straight from the PetDex gallery — the builder calls the PetDex manifest API (https://petdex.crafter.run/api/manifest), downloads the pet's pet.json and spritesheet.webp, and renders it as the playable character:

python3 skills/pet-platformer/scripts/build_game.py --petdex boba --output-dir boba-site

A ready-to-submit /built-with entry is prepared at docs/petdex-submission.json.

License & attribution

Apache-2.0. This skill consumes the output of and reuses reference material from OpenAI's hatch-pet skill; see skills/pet-platformer/references/ and LICENSE.

About

Turn a Codex pet sprite into a customizable side-scrolling platformer. Codex skill + Claude Code plugin, themed art generation, one-command Netlify deploy.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages