Skip to content
edison7009Public

About

Make your AI agent fluent in Rust + Bevy, so the games and videos it builds actually look good. 让 AI 熟练地用 Rust + Bevy 做出游戏和视频, 而且效果出色。

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Playmand logo

Playmand

Rust Visual Creation Skill for AI Agents · Bevy by default

Find the look first, then build it in Rust:
games, video and web effects that look as good as the picture you had in mind.

Bevy 0.20.1 Rust 1.97.1 Avian 0.8 Claude Code Codex MIT License skills.sh

English | 简体中文

Two rolling 3D star nebulae, a ball, a globe, a ringed planet and a torus, assemble into the Claude and ChatGPT icons in four styles: vortex, rain, big bang and scan.

▶ Watch in 1080p (MP4)

Made with Playmand: 3,600 Bevy particles roll as round 3D nebulae, then assemble into the Claude and ChatGPT icons four different ways.
Fan-made tribute. Not affiliated with or endorsed by Anthropic or OpenAI; Claude and ChatGPT are their respective trademarks.

Why Bevy, now that agents write the code

Engine scorecard for the AI coding era: Bevy leads on AI coding friendliness (9.5) and ECS / data-driven design (10), and trails on the visual editor (5).
  • Top score for AI coding friendliness (9.5) and ECS / data-driven design (10). In Bevy the whole game is plain Rust: components, systems and state, with no scene files or inspector settings hidden from the agent. Cargo's compiler and tests tell the agent right away when it got something wrong.
  • The weak spot is the visual editor (5), and agents don't need one. Editors are built for humans clicking around. An agent works in code, and Playmand fills the visual side with Blender + MCP for assets and screenshot checks for what's on screen.
  • 2D and 3D are solid (8–8.5). That's enough for full games, not just prototypes.
Scores as a table
Dimension Bevy Godot Unity Unreal
AI coding friendliness 9.5 8.5 8 7.5
ECS / data-driven 10 7 8 8
2D games 8.5 9.5 8.5 7
3D games 8 8 9 10
Visual editor 5 9.5 10 10

Scores are a subjective comparison produced by an AI assistant, not a benchmark. Regenerate the chart with python assets/make_scorecard.py.

Why Rust: C speed, and a compiler that checks the agent's work

Execution time relative to C: Rust 1.04x, C++ 1.56x, Java 1.89x, Go 2.83x, C# 3.14x, JavaScript 6.52x, TypeScript 46.20x, Python 71.90x, Lua 82.91x.
  • 2nd fastest and 2nd most energy-efficient of 27 languages. In the study above, Rust needed 1.04× C's time and 1.03× its energy. That puts it ahead of C++ (1.56× / 1.34×) and far ahead of common game scripting languages: C# 3.14×, JavaScript 6.52×, Python 71.90×, Lua 82.91×.
  • No garbage collector. Nothing pauses a frame to collect memory, so frame times stay steady in games and long renders.
  • The compiler reviews the agent's code. Types, ownership and the borrow checker reject null, data-race and memory errors before the program runs. The agent gets an exact error message to fix instead of a crash at runtime. That's the feedback loop agents work best with.
  • One toolchain. cargo builds, tests and formats, and Cargo.lock pins every dependency. No project has to pick its own build system.
  • The costs are real: slow compiles and a steep learning curve. For people, that's the main reason to avoid Rust. For an agent, the strictness is what helps, and Playmand supplies the Bevy specifics.
Rust C++ C# GDScript Python TypeScript
Time vs C (study) 1.04× 1.56× 3.14× not measured¹ 71.90× 46.20×
Memory model ownership, no GC manual GC reference counting ref counting + GC GC
Errors caught before running types, ownership, borrows types types optional types none by default types, erased at runtime
Standard build tool cargo none (CMake, …) dotnet Godot editor pip, uv, … npm, pnpm, …
Compile speed slow slow fast none needed none needed fast

¹ GDScript is interpreted and was not part of the study. Benchmarks are the study's 2017 Computer Language Benchmarks Game programs; regenerate the chart with python assets/make_langchart.py.

Made with Playmand

Games and videos come from the same code: a Bevy scene you can play in real time can also be recorded frame by frame into a seamless animation. Both demos below were written by an AI coding agent (Claude Code) using this skill.

Pelican riding a bicycle ECS galaxy
A pelican pedaling a bicycle along a road, with scrolling clouds and hills A glowing spiral galaxy of 4,000 stars rotating
The well-known "pelican riding a bicycle" LLM test, popularized by Simon Willison. Here it's an animated Bevy scene instead of an SVG: wheel spin matches road speed, and the legs follow the pedals with two-bone IK. 4,000 star entities with HDR bloom, moved by one parallel ECS system. Inner stars do more laps, so the arms wind up and come back to their starting shape each loop.
▶ Watch in 1080p (MP4) ▶ Watch in 1080p (MP4)

Source: pelican.rs, galaxy.rs and the header animation icons.rs. Run them from demos/ with cargo run --bin pelican, galaxy or icons. Add -- --record frames to save one seamless loop, then python demos/encode.py frames out.webp.

Live in your browser: a card pack built in Rust

Five holographic cards with cartoon characters, fanned out side by side, one tilted toward the pointer

▶ Play it live · tear the pack, then hover the cards

Rust compiled to WebAssembly, drawing straight into WebGL2 in an ordinary web page: no engine and no JavaScript 3D library, and only 66 KB of code (WebAssembly + JS, gzipped). Tear a foil pack along a random line; five cards rise out of the slit and turn face up, each with real thickness, a clear coat that catches the light as it tilts and a character floating above the art. The characters were modelled and rendered with Bevy. It began as the TokenPet feature of EchoBird. Source and build notes: web/; what we learned is in the skill's web effects guide.

Two pictures, one living poster

A giant mecha with a glowing orange core stands in a rainy night harbour; searchlights sweep through the rain, water pours off its armour and lightning flashes behind the cranes

A dynamic poster, not character animation: the mecha and the harbour are two still pictures from an image app, and the mecha itself does not act. What moves is drawn live around them with WebGL2 from Rust and WebAssembly in 32 KB of code: rain in three layers, sweeping searchlights, flickering crane lamps, fog, rippling water, lightning and water running off the armour. It is the second screen of playmand.com. Every frame is a function of time, so the same code also records a seamless 24-second video with a soundtrack from the same timeline. Method: the skill's art direction guide.

A promo video, rendered offscreen in Rust

A 9-second promo: the Playmand title springs in letter by letter with a particle burst, a bar chart shows Rust at 1.04x C's execution time against C++, C# and JavaScript, then an end card with a play-button mark and playmand.com

A game-style video: letters that spring into place, particles on the beat, wipes on every cut, bars that overshoot and settle, ripples on the end card. One timeline (shots, cross-fades, captions, sound cues, brand kit) rendered with Bevy without a window, in 16:9, 9:16 and 1:1, with a soundtrack and SRT captions, encoded to MP4 with sound. Every frame, caption and sound comes from the same numbers: the tick as each bar lands sits on that exact frame. Source: motion-video; method: the motion graphics guide.

Make a game or a video

/playmand Build a top-down 2D action game with dashing, melee combat,
enemies that chase you, loot and leveling. Bright pixel art, punchy hit feedback.
/playmand Make a 6-second seamless looping animation of our logo assembling
from glowing particles, 1920x1080, exported as MP4 and as a WebP for the README.
/playmand Make a 20-second launch video for our app in 16:9 and 9:16:
problem, product, three key features, end card. Our brand colours and font,
burned-in captions, a soft music bed and a sound on each cut.

Use $playmand in Codex. In Claude Code, install it in one line (see Installation for other agents):

/plugin install playmand --marketplace edison7009/Playmand

What Playmand is

Playmand's value is the look. Game logic and gameplay are quick for an agent to write; what is scarce is a result that looks great. So Playmand starts by helping you find the picture you want (your references, your image app, an image API, or the host's own image generation), then uses Rust's performance (Bevy, shaders, particles, WebAssembly) to build it to that standard, and checks the result against the picture.

Playmand is a Rust skill for games and visual creation, with Bevy as the default engine. It helps AI coding agents pick the right Rust tool for the job (Bevy for games and recorded video, Avian for physics, Kira for audio, egui for debug tools, Macroquad for small 2D games, wgpu for custom GPU work, Rust → WebAssembly for effects inside web pages and Tauri apps) and turn designs into playable 2D / 3D games, animations recorded frame by frame, or effects on a page. Where Playmand is heading: roadmap.

At its core is hands-on Rust + Bevy expertise: using the API of the version you actually have, structuring ECS and gameplay state, wiring up model animation, building UI and rendering, tracking down performance problems, and shipping builds. Codex, Claude Code and other skill-capable tools are the hosts that run it.

Blender + MCP is a key part of asset creation: the agent drives Blender through a connected MCP server to create and modify models, materials, rigs and animations, checks the result, exports GLB and brings it into Bevy. The skill covers the full technical path from editable asset to in-game result.

New games default to Rust + Bevy; existing Bevy projects keep their version and structure. If the user explicitly picks another engine, that choice is respected, and existing projects are never migrated automatically. The skill does not impose a fixed development loop, and it does not shrink the user's request into a minimal demo.

Why Rust + Bevy + Agents

Rust's main appeal is performance and reliability: it compiles to native code with no garbage collector and gives fine-grained control over memory and resources, while its type system and ownership checks catch many memory and concurrency bugs at compile time. These traits suit games that care about frame time, resource usage and long-term maintainability. (Rust)

Bevy's ECS architecture organizes game logic around data, runs systems in parallel where possible, and its modular design is easy to extend. Gameplay, state and system behavior are all expressed in Rust code, which agents can read and modify, and get fast feedback on through Cargo builds and tests. (Bevy introduction)

The cost is a steep learning curve: ownership, borrowing, lifetimes, plus Bevy's queries, scheduling and resource management all have to be understood. Build times, version churn and hard-to-diagnose errors also slow iteration. Fast at runtime does not mean fast to develop.

That is exactly where Playmand and agents fit together: keep the performance and engineering strengths of Rust + Bevy, and let the agent carry more of the implementation, API verification and debugging, lowering the cost of working with this stack. You focus on gameplay, style and feel; Playmand gives the agent engine and asset-pipeline knowledge so it guesses fewer APIs and hits fewer pitfalls. Actual development speed and game quality are still measured on real projects and controlled evaluations. So far, with-skill and without-skill agents were equally correct on tasks whose answer is in the crates' source (the skill mainly saved time); on a design task (level-up feel), blind grading first preferred the agent without the skill, which exposed a gap in the guide; after fixing the guide and example, the skill's solution scored 20/20 against 16/20 and was preferred. Method, raw results and caveats: evaluation.

What's Included

Content How it helps
Rust / Bevy toolchain New project setup, version/API lookup, feature and plugin compatibility, builds and Windows linking
ECS and gameplay state Query borrow conflicts, deferred commands, system ordering, fixed-timestep input, pause and restart
Blender and MCP Connection and capability discovery, scene editing, modeling/materials/animation, GLB export and Bevy integration
Assets and animation GLB sub-scenes, instance readiness, animation graph/player wiring, per-instance material and skeleton isolation
Rendering, UI and performance 2D/3D cameras, lighting, layers, UI layout, screenshots and preview camera lifecycle
Art direction: start from a picture Gets a picture of the target before building: from the user's references, the host's own image generation, prompts for the user's image app (Gemini, Doubao, ChatGPT…), an image API the user connects, or existing pictures found as references; then a style sheet, matching assets, cut-outs and a side-by-side check
Graphic design Posters, social images, link previews and slides from one layout: print sizes with bleed at 300 dpi, platform safe areas, type scale, checks for overlaps, legible sizes and contrast, rendered on the CPU
App UI A new look for an existing app's screens: versions compared in a preview page with the app's theme and icons, brand colours read from icons, calm cards, selection without highlight borders, nothing moving on hover, stacked directory cards, then ported without changing behaviour (in a copy as a patch, or in the app's own repository), checked on the real components in a browser with the backend mocked
Asset pipeline Where assets come from (the user, open-licence libraries, generators), a manifest with sizes and licences, a checker for models, images and audio, a four-view model preview, fixing models in Blender and bringing them into Bevy
Procedural realism Making code-built 3D look real: a modelling kit, damage, baked wear, decals, wet materials, light, synthesized sound and review hooks
Motion graphics and video production Product demos, explainers, data stories and social shorts: shot list, brand kit, timing, 16:9 / 9:16 / 1:1 safe areas, captions, soundtrack, export checks
Animation and video recording Offscreen or window capture, seamless loops, bloom, WebP/GIF/MP4 encoding with sound
Physics with Avian Bodies and colliders, collision events and sensors, fast objects not tunnelling, headless physics tests
Audio with Kira Music and effect channels in decibels, fades and crossfades, pausing, checking levels without a sound card
Debug panels with egui bevy_egui setup and schedule, matching egui versions, keeping panel clicks out of the game
Small 2D games with Macroquad When Macroquad fits better than Bevy, fixed-step rules, small web builds
Custom GPU work with wgpu Compute and render passes, reading results back, running with no GPU
Web effects in Rust → WebAssembly WebGL2 effects for web pages and Tauri apps: fast first paint, size, pausing when hidden, freeing GPU memory
Game feel: rewards and level-ups Tiered feedback, anticipation and impact, rewards that keep up when players mash, cancelling safely, reduced motion
Version inspection script Reports Bevy version, features, source locations and docs links from Cargo's actual resolved graph
Runnable examples Small Rust projects run in CI on Windows and Linux: Bevy ECS, Avian physics, Kira audio, egui, Macroquad, wgpu, game feel, graphic design, video, and the whole stack together (Bevy + Avian + Kira + egui in one app)

The technical baseline is Bevy 0.20.1 / Rust 1.97.1. For other versions, check that version's source; existing projects should not be upgraded just to match the examples. Reference material is read on demand per problem; the full entry point is SKILL.md.

A Chinese copy of the skill and its references is in docs/zh-CN/playmand. Agents load the English version, and answer in whatever language you prompt in.

Installation

Claude Code (2.1.275 or later). Install the plugin straight from this repository:

/plugin install playmand --marketplace edison7009/Playmand

On older versions, run /plugin marketplace add edison7009/Playmand, then /plugin install playmand@playmand.

Any agent that reads skills (via skills.sh). This needs Node.js:

npx skills add edison7009/Playmand

Codex and Claude Code with the bundled installer. Use this to choose personal or project scope, or to install without Node.js:

Requires Codex or Claude Code, and Python 3.9+. The installer uses only the Python standard library. The engine, compiler, graphics and input tools a game needs are prepared per project; the installer never installs or purchases them.

To use Blender MCP, you also need to configure an MCP server in your host and enable the Blender-side add-on; installing the skill does not set up that connection. See the Blender MCP guide for details and boundaries.

git clone https://github.com/edison7009/Playmand.git
cd Playmand
python scripts/install_skill.py --user --target both

You can also download the GitHub ZIP, extract it, enter the folder and run the same Python command. To install for a single host, replace both with codex or claude. Without Python, copy the whole skills/playmand folder into the directory shown below.

Host Personal install (--user) Project install Explicit invocation
Codex ~/.agents/skills/playmand/ .agents/skills/playmand/ $playmand help me ...
Claude Code ~/.claude/skills/playmand/ .claude/skills/playmand/ /playmand help me ...

~ is the current user's home directory. A personal install is available across that user's projects; to share the skill with a team alongside a game project, use a project install:

python scripts/install_skill.py --project "/absolute/path/to/your/game" --target both

Choose one scope, not both, to avoid duplicate installs with the same name. A project install only copies into the given directory; the installer never touches game source or host configuration files. It refuses to proceed if a regular file occupies the install path, a same-named directory has different contents, or a path points outside the project.

Directory conventions follow the Codex skill docs and Claude Code skill docs, checked on 2026-09-13. The shared skill body uses name / description, an MIT license marker and relative paths, with no host-specific directive syntax; agents/openai.yaml is extra display metadata for Codex.

After installing, open a new session in your game project, confirm the skill is discovered, then invoke it explicitly. Older hosts or ones restricted by organization policy need their loading behavior checked against their actual version; a successful file copy does not mean the host has loaded the skill. This applies to local Codex / Claude Code; cloud tasks need the skill brought into their actual execution environment.

The installer skips identical content and exits without overwriting when it finds a same-named directory with different contents. Build output (target) and Python caches are not copied and do not count as conflicts. To update: git pull, review the diff, move the old install outside the skill discovery directory for safekeeping, then reinstall; installed copies do not sync automatically. The source of truth is skills/playmand in this repository.

First build is slow, later builds are fast

The first time a Rust game builds, Cargo downloads and compiles every dependency once. For a Bevy game that takes several minutes: a clean debug build of a small Bevy app took 6 min 15 s on an Apple M4 (10 cores) with the crates already downloaded, and used 6.8 GB in target/. Allow longer on slower machines or when crates still have to be downloaded. Nothing is stuck while it runs.

After that, Cargo reuses the compiled dependencies and rebuilds only your own code. On the same machine, editing the game and building again took 3 s. Lighter stacks are fast from the start: the Macroquad and egui examples build from scratch in 4 s and 10 s.

Expect another long build only when you delete target/, change the Rust toolchain, add or upgrade dependencies, change features, or build --release for the first time. The skill tells you before the first build so the wait is not a surprise.

Usage

New game in Codex:

$playmand Build a top-down 2D action game with Rust + Bevy.
It needs dashing, melee attacks, enemy pursuit, loot drops and leveling,
plus complete start, pause and results screens.
Use a bright pixel-art style, with strong hit feedback and tight controls.

Existing project:

$playmand Fix the current Bevy project: the GLB character renders, but its animation doesn't play.
Keep the versions in Cargo.lock, and check the scene instance, AnimationPlayer and animation graph wiring.

Asset creation:

$playmand Use the connected Blender MCP to make a low-poly treasure chest with a lid-opening animation.
Keep the editable .blend, export GLB, bring it into the current Bevy project, and play the animation on click.

In Claude Code, replace $playmand with /playmand. Other hosts can load the whole skills/playmand folder according to their own skill mechanism; this repository's installer only targets Codex and Claude Code and does not claim every tool has been tested.

Validation and Maintenance

  • Validation record: install, host and distribution checks performed, and the current validation scope.
  • Evaluation cases: evaluate correctness, development time and human intervention on real game tasks.

Maintainers can check and package locally:

python -B -m unittest discover -s tests -v
python scripts/build_package.py

Run the real Bevy example separately (requires the Rust 1.97.1 toolchain):

cd skills/playmand/examples/ecs-patterns
cargo test --locked

The packaging script uses an explicit public-file allowlist and produces dist/playmand-0.7.0.zip plus a SHA-256 manifest. GitHub Actions runs the same tests on Windows and Linux. Host behavior and engine/GPU validation scopes are documented in VALIDATION.md; passing installation does not imply any game will be completed automatically.

License

Playmand is released under the MIT License.

About

Make your AI agent fluent in Rust + Bevy, so the games and videos it builds actually look good. 让 AI 熟练地用 Rust + Bevy 做出游戏和视频, 而且效果出色。

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages