跳过主要内容
BVY
Skill免费GameSkill 出品 · 调优版

Bevy ECS

/bevy-ecs

Structure a Bevy app around ECS: plugins, components and resources, systems with Query and Commands, system ordering and Time.

许可证
Apache-2.0
出品
GameSkill 出品
下载 ZIP

所属合集

Awesome Gamedev Agent Skills

77 portable SKILL.md skills across 12 engines (Godot, Unity, Unreal, Phaser, PixiJS, three.js, Bevy, pygame, LÖVE, Roblox, Defold, Ebitengine), with a router.

我们测过

在 Bevy 0.20.1 (Rust 1.99.1) 上通过 27/27 项检查(2026-10-30):能触发、有可运行示例、有截图和自检清单、单一职责、中英文文档齐全。触发检查是把提示词和 skill 描述做匹配,不是真实 agent 运行。

测试报告

这个 skill 做什么

什么时候触发

Structure a Bevy app around its Entity Component System: build the App with plugins, define Component/Resource types, write systems with Query/Res/Commands, filter and order systems …

GameSkill 测过的版本

GameSkill 调优版:skill 文件取自提交 19d93f97c9c1,按我们的 skill 流程加上可运行示例、测试报告、自检清单和中文指南。

下载测过的 ZIP(47 KB)路线图:引擎基础

协议:基于 gamedev-skills/awesome-gamedev-agent-skills(作者 gamedev-skills),协议 Apache-2.0。ZIP 保留协议文件(LICENSE, NOTICE),CHANGES.md 列出了 GameSkill 加的所有文件。

Bevy ECS

自检清单

  • 移动乘 time.delta_secs(),不要假设固定帧时间 / Multiply motion by time.delta_secs(); never assume a fixed frame time
  • 同一个 system 里两个 Query 写同一组件会 panic,用 With/Without 或 ParamSet 分开 / Two queries writing the same component panic; make them disjoint with With/Without or ParamSet
  • Commands 是延迟的,同一帧后面的 system 才看得到新实体 / Commands are deferred; a later system in the same frame sees the new entity
  • Resource 已经继承 Component,只 derive Resource,不要两个都 derive / Resource extends Component; derive Resource alone
  • 需要顺序就用 .chain() 或显式约束,不要靠默认并行顺序 / Enforce order with .chain() or explicit constraints; don't rely on default parallel order

中文指南

这个 skill 做什么

这个 skill 讲怎么用 Bevy 的 ECS 组织 Rust 游戏:用 App 和插件搭起来,定义 Component 和 Resource,写带 Query、Res、Commands 的 system,过滤和排序 system,用 Time 资源做与帧率无关的移动。新示例针对 Bevy 0.20,已有项目按 Cargo.toml 里锁定的版本走。

什么时候用

  • 用 Bevy 写游戏,要搭 App、加插件、注册 system
  • 定义 Component/Resource,或写 Query、Commands 的 system
  • 修 Bevy 的借用冲突 panic、帧率相关移动、system 执行顺序问题

怎么装

下载本页的 ZIP,把 bevy-ecs/ 整个文件夹放进 agent 的 skills 文件夹:Claude Code 用 .claude/skills/,Codex、Gemini CLI、OpenCode 用 .agents/skills/,Cursor 用 .cursor/skills/,Copilot 用 .github/skills/,Windsurf 用 .windsurf/skills/,然后重启 agent。也可以直接对 agent 说:Install the skill from https://gameskill.dev/skills/bevy-ecs/install.md

最小示例

gameskill/examples/ 是一个 Bevy 小例子:src/lib.rs 里放组件、资源和 system,src/bin/checks.rs 跑检查,tests/card.py 生成结果卡片,版本锁在 Cargo.toml 和 Cargo.lock。

我们怎么测的

总分 27/27。在 Bevy 0.20 无头模式下跑 15 项检查:启动时生成 herder 和 embers;移动距离与帧率无关;delta_secs 是 f32 秒;位置被限制在场地内;With/Without 过滤把 herder 排除在外;每颗 ember 只计一次分,跨帧不重复计;收集后的 ember 被 Without 排除;run_if 在达到上限后停住;用 chain 排序后计数 system 能看到收集结果;Res 和 ResMut 读写资源;Commands 延迟到 system 结束才生效;despawn 后组件被移除;插件 build 后资源已存在;场地资源是半宽。没有窗口和显卡,只用 MinimalPlugins 和手动时间步长跑 ECS 核心,所以截图是检查结果卡片,不是游戏画面。审查时修了:第一帧 delta 为 0(测试改为第二帧再比);资源改在插件 build 时插入;去掉了初稿里会让程序崩溃的 debug_assert;补了一个真正验证 Commands 延迟生效的检查。结果在 gameskill/test-report.json。

搭配

  • game-ai:引擎无关的 AI 逻辑,和 ECS 分开写
  • procedural-gen:程序化生成算法,不放进 system 里
  • performance-optimization:ECS 结构定好后再调性能

安装

告诉你的 AI

Install the skill from https://gameskill.dev/skills/bevy-ecs/install.md

GameSkill 测过的版本

测过的版本装到 .claude/skills/
mkdir -p .claude/skills
curl -fsSL https://gameskill.dev/dl/skills/bevy-ecs.zip -o /tmp/gameskill-bevy-ecs.zip
unzip -oq /tmp/gameskill-bevy-ecs.zip -d .claude/skills
rm /tmp/gameskill-bevy-ecs.zip

包含内容

  • Worked steps: Cargo.toml + minimal App; Components, resources, and spawning; A system with a query + the Time resource; Query filters
  • A pitfalls section with the mistakes to avoid
  • Bundled 1 reference doc the agent reads when needed

适合

  • Building or debugging a Bevy game in Rust

试试这条提示词

提示词
Set up a Bevy app with plugins, a player component and a movement system.

关于这个 Skill

Structure a Bevy app around its Entity Component System: build the App with plugins, define Component/Resource types, write systems with Query/Res/Commands, filter and order systems, and use the Time resource for frame-rate-independent motion. Use when building or debugging a Bevy game in Rust — when the user mentions Bevy, ECS, App::new, add_systems, Query, Commands, components/systems, or a Cargo.toml depending on bevy.

From the bevy-ecs SKILL.md in gamedev-skills/awesome-gamedev-agent-skills.

What's inside

  • Cargo.toml + minimal App
  • Components, resources, and spawning
  • A system with a query + the Time resource
  • Query filters (With / Without / Changed)
  • Resources: read and write
  • Ordering, run conditions, and plugins

常见问题

同赛道 PRO 商业源码$8.25/mo

游戏打磨流程 Game Polish Workflow

让 AI 把游戏真正改好的可复用流程:10 步打磨循环、中英双语提示词、AI 做游戏常见问题排障清单,以及试玩和发布检查表。

  • 10 步打磨循环,每步有完成标准
  • 14 条中文 + 14 条英文提示词

基于 gamedev-skills/awesome-gamedev-agent-skills (作者 gamedev-skills,协议 Apache-2.0)。ZIP 里保留原作者的 LICENSE 和 NOTICE,ATTRIBUTION.md 和 CHANGES.md 写明来源提交和 GameSkill 加的内容。

搭配使用

作者标注的相关 Skills,或更适合相邻任务的 Skills。

Awesome Gamedev Agent Skills 中的更多 Skills

查看全部 44 个

相似 skills