$npx -y skills add WU-HAOTIAN34/2dimg2motion --skill img2mo-stdStandardize a 2D animation baseline image with /img2mo-std xxx.png/pos. Use when preparing a character, creature, prop, or weapon baseline before motion generation, especially if the source image is too large, tightly cropped, lacks transparent action margin, has a white backgr
| 1 | # Img2mo-std |
| 2 | |
| 3 | ## Overview |
| 4 | |
| 5 | Use this skill when the user invokes: |
| 6 | |
| 7 | ```text |
| 8 | /img2mo-std xxx.png/pos |
| 9 | ``` |
| 10 | |
| 11 | The command audits and standardizes a baseline frame before animation generation. It creates a smaller, padded, transparent-canvas source image that leaves enough room for walk, attack, idle, weapon swing, cape, tail, horn, or limb stretch poses. |
| 12 | |
| 13 | ## Input Resolution |
| 14 | |
| 15 | Resolve the argument after `/img2mo-std` as follows: |
| 16 | |
| 17 | 1. If it is an existing relative or absolute path, use it directly. |
| 18 | 2. If it is a bare file name such as `s7.png`, first try `sample\s7.png`. |
| 19 | 3. If it has no extension such as `s7`, first try `sample\s7.png`, then `sample\s7.jpg`, then `sample\s7.webp`. |
| 20 | 4. If no matching image exists, report the missing path and do not guess from unrelated files. |
| 21 | |
| 22 | Examples: |
| 23 | |
| 24 | ```text |
| 25 | /img2mo-std s7 |
| 26 | /img2mo-std s7.png |
| 27 | /img2mo-std sample\s7.png |
| 28 | /img2mo-std C:\AI\2dimg2motion-v1\sample\s7.png |
| 29 | ``` |
| 30 | |
| 31 | ## Audit Criteria |
| 32 | |
| 33 | A baseline is not standard if any of these are true: |
| 34 | |
| 35 | - The foreground subject is larger than about 300-400 px on its longest side. |
| 36 | - The subject touches or nearly touches the canvas edge. |
| 37 | - There is not enough empty transparent space for arms, legs, weapons, tails, capes, horns, or effects to extend during motion. |
| 38 | - The background is opaque white or near-white when the character should be isolated. |
| 39 | - The source has a huge canvas that will slow generation without adding useful detail. |
| 40 | - Previous generated frames show inconsistent character size, off-center motion, clipped body parts, or crowded sprite-sheet cells. |
| 41 | |
| 42 | ## Tool |
| 43 | |
| 44 | Run the repository tool from the workspace root after resolving the image path: |
| 45 | |
| 46 | ```powershell |
| 47 | python scripts\standardize_baseline.py <resolved-image-path> |
| 48 | ``` |
| 49 | |
| 50 | Default output: |
| 51 | |
| 52 | ```text |
| 53 | sample\<input-stem>-standard.png |
| 54 | ``` |
| 55 | |
| 56 | Useful options: |
| 57 | |
| 58 | ```powershell |
| 59 | python scripts\standardize_baseline.py sample\s7.png --subject-max 360 --margin-ratio 0.75 |
| 60 | python scripts\standardize_baseline.py sample\s7.png --output sample\s7-standard.png |
| 61 | python scripts\standardize_baseline.py sample\s7.png --check-only |
| 62 | ``` |
| 63 | |
| 64 | Recommended default target: |
| 65 | |
| 66 | - Subject longest side: `360` |
| 67 | - Margin ratio: `0.65` to `0.85` |
| 68 | - Output format: PNG with transparency |
| 69 | |
| 70 | ## Report Interpretation |
| 71 | |
| 72 | The tool prints a JSON report. Treat the standardized output as ready when: |
| 73 | |
| 74 | - `needs_standardization` is `false` after processing. |
| 75 | - `subject_longest_side` is between 300 and 400. |
| 76 | - `edge_clearance_ratio` leaves enough room for the intended motion. |
| 77 | - `warnings` is empty or only contains acceptable notes. |
| 78 | |
| 79 | If the report still warns that the image is tight or too large, rerun with a smaller `--subject-max` or larger `--margin-ratio`. |
| 80 | |
| 81 | ## Animation Workflow Rule |
| 82 | |
| 83 | After `/img2mo-std`, use the standardized output image as the baseline for all later walk, attack, idle, or other sprite generation. Do not continue from the original oversized or tightly cropped source unless the user explicitly asks to bypass standardization. |