Skip to content

2dimg2motion

Agent skill for converting 2D character into style-consistent transparent animation sequences and spritesheets for game engines | 用于将静态 2D 角色/物体图片,通过 agent 转化为一致的透明背景游戏动画序列帧。

Install

$git clone https://github.com/WU-HAOTIAN34/2dimg2motion

Install command taken from the project's README or registry entry. Always review code before running it.

2dimg2motion.skill

English  ·  简体中文

2dimg2motion.skill -- not a filter that "makes an image move", but a runnable framework for generating game animation frames

Spritesheet delivery pipeline via key-pose redrawing, identity locking, and limb topology constraints, it turns every instinct of "how should this character move?" into an executable, verifiable, reusable animation-generation pipeline. Input one 2D character, creature, weapon, vehicle, or prop image, and output a style-consistent transparent action sequence ready to import into a game engine.


What Is This

2dimg2motion.skill is a 2D game-animation generation skill for Codex / Claude Code / Agent Skills. It takes one static character, creature, vehicle, weapon, or prop image and generates a style-consistent transparent action sequence that can be packed into a spritesheet.

It is not a "single-image motion filter". Filters usually translate, rotate, scale, or warp local image layers; the core of this skill is whole-character key-pose redraw: first lock the character identity, then let the model redraw complete key poses, then generate in-between frames, with local scripts handling transparency, canvas normalization, packing, and validation.

Why It Exists

AI can easily draw characters that look like they belong to the same series, but it is much harder to draw continuous motion for the same character. Game animation adds more requirements:

  • every frame must be a transparent RGBA PNG;
  • character proportions, foot baseline, and canvas size must stay stable;
  • weapons, arms, horns, tails, and wings must not swap sides or disappear;
  • keyframes and in-betweens must form readable motion;
  • the final output must be directly usable in Godot, Unity, Cocos, or a custom 2D engine.

This repository turns those lessons into an executable workflow: analyze the baseline image, establish the identity lock, design action beats, generate a shared key-pose sheet, generate in-betweens, remove the background, normalize frames, pack assets, validate structure, and visually inspect the result.

Quick Start

1. Install The Skill

Put the repository into your Agent Skills directory. Keep the repository structure intact, because the main skill, sub-skills, scripts, references, and project knowledge files refer to each other.

Codex example:

git clone https://github.com/WU-HAOTIAN34/2dimg2motion.git $env:USERPROFILE\.codex\skills\2dimg2motion

Claude Code example:

git clone https://github.com/WU-HAOTIAN34/2dimg2motion.git ~/.claude/skills/2dimg2motion

You can also run it directly from this repository during local development. Confirm the dependency:

python -m pip install pillow

2. Use The Main Skill To Generate Animation

In Codex or Claude Code, provide a baseline image and describe the motion:

/2dimg2motion use sample/s3.png to generate an arm-swing attack animation

Or:

Generate a walk action from this character image.
/2dimg2motion use sample/s7.png to generate a sword-slash action.
/2dimg2motion use sample/s1.png to make a heavy ground-smash attack animation.

The main skill runs the full workflow: analyze the baseline image, establish the identity lock, design key poses at 02/05/08/11, generate in-betweens, remove the background, normalize frames, pack the spritesheet, and output preview.gif and manifest.json.

Similar plugs

Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local…

Why use many token when few token do trick. Viral skill + proxy for coding agents that cuts 65% of tokens by talking like a caveman.

The 1st Collaborative AI Design Agent Workspace. Local-first and open source. Create prototypes, websites, apps, dashboards, presentations, images, and videos with your team…