agentleFS
xingfanxiaxingfanxia/AX-skills/pet-forge/SKILL.md

pet-forge

Skill4 starsChanged 54 days agoMITView on GitHub

Use when generating a custom desk-pet character for clawd-on-desk (or any APNG-based pet runtime) from either a text description or a real-pet photo + breed. Produces 10 lively, character-consistent state animations (idle / sleeping / working-typing / thinking / happy / notification / react-poke / error / collapse-sleep / wake), green-screen chroma-keyed APNGs, and a ready-to-install theme.json. Trigger phrases: 自定义桌面宠物, custom desk pet, generate pet animations, clawd theme, 给我做一只猫, pet-forge, 桌宠生成, custom cat sprites, AI pet animation pipeline.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Green-eyed pets need chroma tuning: Default chroma_key.py settings catch jade-green eyes (hue 80-160 + sat ≥40) and gray them out.

    line 114

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/pet-forge — AI desk-pet asset generator (clawd-on-desk-ready)

Source: https://github.com/xingfanxia/AX-skills/tree/main/pet-forge License: MIT — fork & adapt freely Dogfood lineage: this skill produced the 小肥 (Munchkin, jade-green eyes) and 胖猫 (Ragdoll, sky-blue eyes) custom pets shipping in clawd-on-desk.

One prompt (or one photo + breed) → 10 character-consistent APNG states + theme.json, ready to drop into clawd-on-desk/themes/<pet>/.

What it produces

For each pet:

OutputCountFormatWhere
State animation APNG10APNG (200px height, 8fps, plays=0 infinite loop)clawd-on-desk/themes/<pet>/assets/<pet>-<state>.apng
theme.json1JSON (schema v1)clawd-on-desk/themes/<pet>/theme.json
Character refs (saved for re-runs)7PNGoutput/refs/<pet>/

10 states: idle-dozing, sleeping, working-typing, thinking, happy, notification, react-poke, error, collapse-sleep, wake.

The pipeline (3 stages)

   ┌────────────────────────┐    ┌──────────────────────────┐    ┌────────────────────────┐
   │  Stage 1: Refs         │───▶│  Stage 2: Animation      │───▶│  Stage 3: Install      │
   │  GPT Image 2.5 ×7        │    │  Doubao Seedance ×10     │    │  chroma + theme.json   │
   │  ~$0.30 (7 × $0.04)    │    │  ~$2.00 (10 × $0.20)     │    │  $0 (local)            │
   └────────────────────────┘    └──────────────────────────┘    └────────────────────────┘
        Character anchor              State-pose-refs drive            APNG + theme.json
        (main + sleep + 5 poses)      Doubao image+lastFrame anchor     drop into theme dir

Total spend: ~$2.30 / pet, ~5–8 min wall-clock (parallelizable).

Invocation

~/.claude/skills/pet-forge/generate.py [PROMPT_OR_OPTIONS]

PEP 723 uv script — no venv setup needed. uv handles deps on first run.

Common forms

# 1. From text prompt
generate.py --description "chubby gold tabby British Shorthair Munchkin with jade-green eyes" --pet-id munchkin

# 2. From photo of a real cat + breed override
generate.py --photo ~/cats/xiao-fei.jpg --breed "Munchkin" --pet-id xiaofei

# 3. From an existing main-ref (skip stage 1, jump to stage 2/3)
generate.py --main-ref output/refs/munchkin/main-ref.png --pet-id munchkin

# 4. Re-run only specific states (fix a bad one)
generate.py --pet-id munchkin --only notification thinking

# 5. Dry-run (analyze + plan only, no API spend)
generate.py --description "..." --dry-run

Options

  --pet-id <id>         filesystem-safe slug; becomes theme dir name + APNG prefix
  --description TEXT    text describing the pet (breed, color, eye color, build, vibe)
  --photo PATH          photo of the real pet (GPT Image 2.5 will edit-mode anchor on it)
  --breed TEXT          breed override (used to refine character prefix)
  --display-name TEXT   what shows in clawd-on-desk theme picker (Unicode OK: 小肥, 胖猫)

  --main-ref PATH       skip ref generation; use this image as character anchor
  --only STATES         comma-separated subset of the 10 states to (re)generate
  --skip-install        write to ./output/<pet>/ but don't copy to clawd-on-desk

  --green-eye           pass --sat-min 85 --despill-sat-min 70 to chroma_key.py
                        (REQUIRED for any pet with green eyes; auto-detected from
                         description if --description contains green/jade/翡翠/绿)

  --clawd-on-desk PATH  override clawd-on-desk repo path (default ~/projects/products/clawd-on-desk)
  --dry-run             print plan without API spend

The reference stage defaults to Sunburst for identity fidelity and switches to Flare on HTTP 429. Use --image-variant flare for previews (Sunburst fallback).

Credentials

Reads from env vars OR ~/.config/gpt-image/credentials:

# Required for stage 1 (refs): Azure or NewAPI, see gpt-image/SKILL.md
AZURE_OPENAI_API_KEY=...
AZURE_OPENAI_ENDPOINT=https://<resource>.openai.azure.com
AZURE_OPENAI_API_VERSION=2025-04-01-preview
# Or NEWAPI_API_KEY + NEWAPI_BASE_URL (including /v1)

# Required for stage 2 (videos)
DOUBAO_API_KEY=...                   # ByteDance Volcengine doubao-seedance

Critical lessons (read before tweaking)

These come from the dogfood production of 小肥 / 胖猫 — see references/7-critical-lessons.md for the full discussion.

  1. State-pose refs are the liveliness unlock. If every state's ref is the SAME main-ref.png, Doubao won't morph far from it in 4s — outputs become "sitting cat with face wiggle." Ref each state in its action pose (paw to chin for thinking, alert sit for notification) and Doubao will produce real motion.
  2. No blush. gpt-image-2 loves to add pink cheek blush; it kills photorealism for tabby/calico cats. Negative-prompt blush explicitly.
  3. Sleep-ref is two-wave. Generate sleep-final-ref.png chained on main-ref FIRST, then chain collapse-sleep (main → sleep) and wake (sleep → main) state refs on it.
  4. Doubao image+lastFrame anchoring. Pass the ref as BOTH image (first frame) and lastFrame (last frame) — this is how you get a seamless loop. For transition states (collapse-sleep, wake) use main as image, sleep as lastFrame (or vice versa).
  5. Green-eyed pets need chroma tuning. Default chroma_key.py settings catch jade-green eyes (hue 80-160 + sat ≥40) and gray them out. Pass --sat-min 85 --despill-sat-min 70 to preserve jade greens. Blue-eyed pets are unaffected.
  6. Chinese theme display names work — theme.json name field is Electron Unicode-safe. Directory IDs stay ASCII (filesystem-safe).
  7. Fluffy pets need fileScales bumped ~5%. Long-coat breeds (Ragdoll, Persian) take more visual space than short-coat. Bump objectScale.fileScales entries by 0.05 over a short-coat reference.

When NOT to use this skill

  • Pet runtime that's NOT APNG-based (e.g., the runtime expects sprite sheets, GIF, or live SVG) — output won't be compatible.
  • Photorealistic pets (the prompt template targets chibi/kawaii cartoon style; bypass the template if you want realism).
  • States outside the 10 fixed ones — skill is opinionated about the lifecycle. Add new states by editing tools/animations.template.json + prompts/template.example.js motion prompts.

Cost & wall-clock

StageAPIPer-pet costWall-clock (parallel)
1: refsGPT Image 2.5 (Azure or NewAPI)Measure current usageSunburst quality / Flare speed
2: animationsDoubao Seedance$2.00 (10 × ~$0.20)~3-4 min (configurable parallel)
3: chroma + installlocal Python + ffmpeg$0~30 s
Total~$2.30 / pet~6–8 min

Retries (re-running 1-3 states) cost ~$0.30 / state.

Customizing the character prefix

The prompts/template.example.js ships a generic chibi-cat CHARACTER_PREFIX. To swap in your own pet:

  1. Copy prompts/template.example.js to prompts/template.<your-pet>.js
  2. Edit CHARACTER_PREFIX to describe your specific cat (breed, coat color, eye color, body shape, distinctive markings)
  3. Run generate.py --pet-id <your-pet> --template prompts/template.<your-pet>.js

Two reference templates ship: template.munchkin.example.js (jade-eyed gold tabby Munchkin) and template.ragdoll.example.js (blue-eyed seal-point bicolor Ragdoll). Fork either.

See also

  • examples/munchkin/ — full theme.json + animations.json snapshot for 小肥
  • examples/ragdoll/ — same for 胖猫 (Ragdoll-specific notes about fileScale bumps)
  • references/7-critical-lessons.md — production gotchas distilled
  • references/chroma-tuning-guide.md — when to tune --sat-min / --despill-sat-min
  • references/theme-json-anatomy.md — clawd-on-desk theme schema reference
  • Pet-forge upstream (the underlying Node + Python tools we vendored): provides batch-gen, image/video gen, and the chroma pipeline. We've included a patched chroma_key.py with --sat-min + --despill-sat-min flags.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.