side-sprite-actions

Officialneta-search/side-sprite-actions
Use it in Cohub

Paste this into your agent's chat — it fetches the skill and follows it.

Use the skill: side-sprite-actions. Run `npx -y @neta-art/neta-search-cli@latest skills use neta-search/side-sprite-actions --via site` and follow what it prints. Read its complete output, redirecting it to a temporary file first if necessary, and resolve relative paths from the skill directory it prints.
Use in Neta Studio Open it in Neta Studio and see what people made with it.
Install from a terminal
npx -y @neta-art/neta-search-cli@latest skills use neta-search/side-sprite-actions
Summary

Animate one character in side view with matching actions: idle, walk, attack, jump, and more.

  • Each action is 8 frames drawn the same size and style, feet lined up so they blend smoothly.
  • Get a playable demo page where you control the character plus a sprite pack for Godot, Unity, or Phaser.
  • Works best with a character who has a clear look: outfit, weapon, colors, pose.
  • Add more actions later and they join the same page with the same scale and ground.
  • Each action becomes a transparent PNG strip, a GIF, and a row in one spritesheet.
SKILL.md
# Side sprite actions

One character, a growing set of side-view actions that all match: same height, same feet line, same look.
Each action is **one** generated sheet (8 frames) and **one command**. Everything lands in one page per character:

1. **A playable action page (web Work)** — the hand-over card: the character on a side-view ground, ← → walk
   (Shift runs), Space attacks, ↑ jumps, number keys / the action bar play any action; left alone it demos them.
2. **The sprite pack** (`assets.zip`, also on the page): `spritesheet.png` (one row per action, uniform cells, feet
   on the bottom edge) + `actions.json`, `<action>.png` strips, single frames, GIFs, `README.txt`.

## 0. Settle who and what (no generation before this)

- **Who** — one named or described character. A character in this world: `node /mods/neta/neta atom list --type
  character --query <name>` (try the user's wording and the original name; atom names are often English), then
  `atom get <id>`. Cover = first `media` entry, relative to the atom file: `world/characters/X.md` +
  `../media/studio/characters/X.jpeg` → `world/media/studio/characters/X.jpeg`. Not named → **stop and ask** in one
  short round (3–5 of this world's characters with covers + a write-in, `questionnaire` skill if available).
  Never pick the character yourself.
- **Which actions** — exactly what the user named. **Nothing named → exactly `idle`, `walk`, `attack`; don't add
  others.** "A full set" → `idle walk run jump attack hit death`. At most 7 per run; offer the rest afterwards.
- **Defaults, no question** — side view facing right; the user's style, else the world's `visualStyle`
  (`neta config get`); 8 frames. "Pixel art / 像素" → `--pixel`.
- **Existing page?** `ls -d works/webs/<character-slug>-actions works/web/<character-slug>-actions 2>/dev/null`.
  If it exists this run **adds to it** (same folder; an action already there is replaced). The page remembers the
  character (`recipe.json`): pass only `--id` (and `--label` / `--does` for custom moves), not `--who` / `--style`.
- 8-direction / top-down walking → `eight-direction-walk`. A whole playable fighting game → `brawl-creator`.

## 1. Page (once per character)

```bash
SK=<skill-dir>          # the folder this SKILL.md is in (what `skills use` printed) — never /mods/… or .agents/skills/…
cd /workspace
node /mods/neta/neta work init web works/web/<character-slug>-actions --title "<character> · 动作图鉴"
REF=<data.workDir it printed>   # may be normalized to works/webs/…; for an existing page, its folder
```

## 2. Each action — one command, one after another (never in parallel)

```bash
bash "$SK/scripts/action.sh" "$REF" --id <id> \
  --who "<one concrete sentence: who, build, hair, outfit, colours, what they hold>" \
  --style "<one sentence>" [--cover <workspace path from step 0>] \
  [--label "<action name in the user's language>"] [--pixel] [--keep 1,3,4,5,6,8]
```

- Known ids: `idle walk run jump attack slash heavy dodge hit victory death` (`attack` = punch, wand, quick stab;
  `slash` = sword / axe / hammer / staff chop) — the script picks the pose rig, how it
  plays (loop / once / hold on the last frame) and what happens. Do them in that order; **the first one writes
  `identity.png` and every later action copies the character from it**, so keep `--who` / `--style` identical.
- Custom move: kebab-case id + `--does "<what happens over the 8 panels and how it ends>"` + `--label`, and
  `--rig <closest known id>` when one fits (a sword or axe move → `slash`, a big punch → `heavy`, a spell → `attack`);
  otherwise it uses an empty template. A projectile leaves the frame; don't ask for it flying.
- `--keep` only when the user asked for fewer frames: 6 → `1,3,4,5,6,8`, 4 → `1,3,5,7`.
- Pink / magenta character → add `--isnet` (slower: the first use in a world installs a model, 4–9 min).
- Done = it printed `[action] ok`. It generates (≈30–60 s, retries once if the model returns nothing), slices,
  cleans and scales into `$REF/actions/<id>/`. **Don't open frames or sheets to check them.** Only if it printed a
  `note: … touched the panel edge` line, look once at `$REF/actions/<id>/strip.png` and regenerate that action
  (same command) only if a hand or weapon is visibly cut off. Never more than one regeneration per action.
- `FAIL` lines: say which action failed and why, continue with the others.

## 3. Build and publish the page (once, after the last action)

```bash
bash "$SK/scripts/make-page.sh" "$REF" --title "<character> · 动作图鉴" \
  --subtitle "<style · side view · N actions>" --lang zh --ground stone [--pixel]
node /mods/neta/neta work publish web "$REF" --thumbnail-wait 4000
rm -rf .tmp-refs
```

- Title / subtitle in the user's language; `--lang` = that language (zh en ja es pt ru).
- `--ground`: where they'd stand — `stone` (castle, town, dungeon; default), `grass` (outdoors, forest),
  `sand`, `snow`, `wood` (ship, tavern, house), `night`. On an existing page omit them to keep the old ones.
- Must print `[page] ok`. Don't edit `index.html`; leave `meta.json` to the CLI.
- `world_slug_required` → follow the printed hint (slug from the world's name), retry once.

## 4. Hand over

Reply in the user's language via the `interaction-components` skill, each card a full `<interaction-json>` link
block on its own line:
1. The page: `{"type": "work", "workId": "<preview.workId from $REF/meta.json>"}` — never a made-up id, never a
   `studio-route` with a world id from `.neta/runtime.json`.
2. The pack: `{"type": "world-file", "path": "$REF/assets.zip"}`.

In two or three lines: the character, the actions (8 frames each or the N asked for), one shared scale,
transparent PNGs, `spritesheet.png` = one row per action (`actions.json` / `README.txt`), and that more actions
can be added to the same page. Each generated sheet also stays in the world as an image Work (source material).

## Don't

- Pick the character, or generate before it is settled.
- Write your own prompt file, slicing, scaling or packing script — `action.sh` and `make-page.sh` are the pipeline.
- Use another image model, run actions in parallel, or regenerate an action more than once.
- Run anything that generates from inside `/tmp` or a sub-folder (`action.sh` handles the world root itself).