feat: space pack 2

This commit is contained in:
2026-02-19 13:55:18 +07:00
parent b5457d23ff
commit 94dee90da4
84 changed files with 78 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
---
description: Split sprite sheets into individual icons using split-sprites script
allowed-tools: [Bash, Glob, AskUserQuestion]
---
You are splitting sprite sheet images into individual icons. The user's message may contain the source folder and/or destination folder.
## Step 1: Parse arguments
Extract from the user's message:
- **Source folder** — a subdirectory inside `assets/items/` (e.g. `assets/items/elements`)
- **Destination folder** — a subdirectory inside `assets/icons/` (e.g. `assets/icons/pack2`)
## Step 2: Fill in missing arguments
If the source folder is missing, list available subdirectories in `assets/items/` and ask the user to pick one using AskUserQuestion.
If the destination folder is missing, list existing packs in `assets/icons/` and suggest the next available `packN` name. Ask the user to confirm or specify a different name using AskUserQuestion.
## Step 3: Validate
Check that the source folder exists and contains image files (jpeg, png, webp). If it's empty or doesn't exist, tell the user and stop.
## Step 4: Run the split script
Run:
```bash
node src/scripts/split-sprites.mjs <source-folder> <destination-folder>
```
## Step 5: Report
Tell the user:
- How many icons were created
- Where they are located
- The naming convention used (`{name}-{row}-{col}.png`)