Index of every page on this site: llms.txt
All skills
thedivergentai avatar

/bevy-testing-patterns

@db004d7
Run it yourself

Tests Bevy schedule logic with cargo test, MinimalPlugins, and app.update(). Use for unit tests of systems, resources, and .chain() order. Keywords: Bevy, cargo test, MinimalPlugins, world, libtest.

Use this Skill: https://skilld.dev/gh/thedivergentai/game-dev-agentic-skills/bevy-testing-patterns

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesecs-ownership.md

≈218 tokens on demand. Your agent reads this file only when SKILL.md points to it.

ECS ownership - bevy-testing-patterns

Who owns each piece of state, and on which schedule.

Target: Bevy 0.20+.

Need Owner Schedule
Per-entity Component + Query Update or FixedMain
App-wide Resource insert in Startup
Spawn Commands Startup or the runtime schedule
Ordered mutation .chain() same schedule
Plugin setup Plugin build before run

The test inserts the resource, runs one Update, and reads it back. That is the same owner the game plugin uses.

#[derive(Resource)]
struct Score(u32);

fn add_point(mut score: ResMut<Score>) {
    score.0 += 1;
}

#[test]
fn score_moves_once() {
    let mut app = App::new();
    app.insert_resource(Score(0)).add_systems(Update, add_point);
    app.update();
    assert_eq!(app.world().resource::<Score>().0, 1);
}

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts1mo3 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    This skill provides technical guidelines and code patterns for unit testing Bevy game engine logic using standard Rust testing tools. It contains no malicious patterns, obfuscation, or unsafe external references.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: LOW · No issues

Signed by skilld at db004d7. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last month.

Steadyupdated last month

README badge

README badge for thedivergentai/game-dev-agentic-skills/bevy-testing-patterns