# Bevy Genre Educational

Route a Bevy 0.20 educational loop.

- Repository: https://github.com/thedivergentai/Game-Dev-Agentic-Skills (917 stars)
- Category: Engineering
- License: LGPL-3.0
- Last updated: 2026-10-16
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill bevy-genre-educational -g -a claude-code -y`
Codex: `npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill bevy-genre-educational -g -a codex -y`
Cursor: `npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill bevy-genre-educational -g -a cursor -y`
Gemini CLI: `npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill bevy-genre-educational -g -a gemini-cli -y`

## Description

Route a Bevy 0.20 educational loop. Use when prompts and choices are components, lesson totals are one resource, and grading must run after selection in one chain. Keywords: Bevy, Educational, LessonProgress, Choice, chain, genre.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Bevy Educational (thin router)

Genre router. Domain work lives in the Bevy skills below.

## When to use

Load this for prompts, answers, and progress flags.

## ECS shape

- **Components** hold a prompt and each choice as plain data.
- **Resources** hold how many answers were graded and how many were correct.
- **Systems** select a choice, then grade it. `.chain()` keeps the grade after the selection.
- **Schedule:** gameplay mode changes go through bevy-state-machines.

```toml
[package]
name = "educational"
version = "0.1.0"
edition = "2021"

[dependencies]
bevy = "0.20"
```

One prompt, two choices, one progress resource.

```rust
#[derive(Component)]
struct Prompt {
    text: String,
}

#[derive(Component)]
struct Choice {
    label: String,
    correct: bool,
    picked: bool,
    graded: bool,
}

#[derive(Resource, Default)]
struct LessonProgress {
    answered: u32,
    correct: u32,
}

fn spawn_lesson(mut commands: Commands) {
    commands.spawn(Prompt {
        text: "Which way is north?".to_string(),
    });
    commands.spawn(Choice {
        label: "Up".to_string(),
        correct: true,
        picked: false,
        graded: false,
    });
    commands.spawn(Choice {
        label: "Down".to_string(),
        correct: false,
        picked: false,
        graded: false,
    });
    commands.init_resource::<LessonProgress>();
}

fn pick_first(mut choices: Query<&mut Choice>) {
    for mut choice in &mut choices {
        if choice.correct && !choice.graded && !choice.picked {
            choice.picked = true;
            break;
        }
    }
}

The rest: https://github.com/thedivergentai/Game-Dev-Agentic-Skills/blob/HEAD/skills/bevy-genre-educational/SKILL.md
