# Bevy ecs components

> Bevy ecs components is an open-source agent skill for developer tools. Guides an agent through Bevy 0.20 ECS components, required components, observers. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/shinyobjectz/raea-skills/tree/main/skills/bevy/pack/bevy-ecs-components
- **Repository:** https://github.com/shinyobjectz/raea-skills
- **GitHub stars:** 38
- **License:** MIT
- **Skill name:** bevy-ecs-components
- **Collection:** https://github.com/shinyobjectz/raea-skills
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-01

## About

This skill gives an AI coding agent working knowledge of how Bevy 0.20 components are defined and wired together. It covers deriving Component, declaring required components with the require attribute, choosing Table or SparseSet storage, and writing entity-targeted observers that use the On parameter type. It also documents the lifecycle events for add, insert, discard, remove and despawn, along with the on_add, on_insert, on_discard and on_remove hooks.

The skill includes a canonical Rust example that puts these pieces together in a small app, showing plain components, a required-component marker, a sparse tag, a discard hook that logs values, a custom entity event handled by an observer, and a lifecycle observer. It also contains a cheat sheet mapping each lifecycle pattern to the moment it fires, and a list of breaking changes from Bevy 0.18 to 0.20 that helps the agent fix compiler errors after an upgrade.

The guidance is Rust-specific and targets the Bevy game engine. It has no scripts or bundled files; the agent uses it as reference instructions while editing code. It cross-references related skills for queries, systems and migration between Bevy versions.

## When your agent uses it

> Use when defining `#[derive(Component)]`, declaring required components with `#[require(...)]`, writing observers with `On<E>` or lifecycle observers with `On<Add<T>>` (NOT `On<Add, T>`), choosing Table versus SparseSet storage, or registering `on_add`/`on_insert`/`on_discard`/`on_remove` hooks in Bevy 0.20.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/shinyobjectz/raea-skills/tree/HEAD/skills/bevy/pack/bevy-ecs-components)
- [License: MIT](https://github.com/shinyobjectz/raea-skills/tree/HEAD/skills/bevy/pack/bevy-ecs-components)

## Features

- **Component definition patterns:** Shows how to derive Component on plain structs and tag types for game state.
- **Required components:** Explains the require attribute and its forms for auto-inserting companion components on spawn.
- **Storage selection:** Describes choosing Table or SparseSet storage and the trade-offs between them.
- **Observers and entity events:** Covers writing observers with the On parameter and defining custom entity-targeted events.
- **Lifecycle hooks and events:** Lists add, insert, discard, remove and despawn triggers and the hook functions tied to them.
- **Bevy 0.18 to 0.20 changes:** Summarizes renamed and removed APIs so the agent can resolve upgrade errors.

## Good for

- Define a Bevy component with default values and required companions
- Write an observer that reacts to a custom entity event
- Pick Table or SparseSet storage for a frequently toggled tag
- Add a lifecycle hook that runs when a component is overwritten
- Fix compiler errors after upgrading a Bevy project to 0.20

## Install

### Claude Code

This skill ships in the `raea` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add shinyobjectz/raea-skills
/plugin install raea@raea
```

Or copy only this skill to `~/.claude/skills/bevy-ecs-components`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/shinyobjectz/raea-skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/bevy-ecs-components &&
cp -R "$tmp/skills/bevy/pack/bevy-ecs-components" ~/.claude/skills/bevy-ecs-components &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/bevy-ecs-components` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/bevy-ecs-components` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/shinyobjectz/raea-skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/bevy-ecs-components &&
cp -R "$tmp/skills/bevy/pack/bevy-ecs-components" ~/.agents/skills/bevy-ecs-components &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/bevy-ecs-components` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/bevy-ecs-components` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/shinyobjectz/raea-skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/bevy-ecs-components &&
cp -R "$tmp/skills/bevy/pack/bevy-ecs-components" ~/.cursor/skills/bevy-ecs-components &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/bevy-ecs-components` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/shinyobjectz/raea-skills.git --path skills/bevy/pack/bevy-ecs-components
```

Or copy the folder to `~/.gemini/skills/bevy-ecs-components` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/bevy-ecs-components`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/shinyobjectz/raea-skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/bevy-ecs-components &&
cp -R "$tmp/skills/bevy/pack/bevy-ecs-components" ~/.copilot/skills/bevy-ecs-components &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/bevy-ecs-components` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/shinyobjectz/raea-skills.git
```

Then copy `raea-skills/skills/bevy/pack/bevy-ecs-components` into your agent's skills folder as `bevy-ecs-components`. Agents that support SKILL.md read one folder per skill.

## FAQ

### Which Bevy version does Bevy ecs components target?

It is written for Bevy 0.20 and includes notes on changes from 0.17 through 0.19.

### Does the skill run any scripts or need extra tools?

No scripts are included and it bundles only the SKILL.md file. It has no tool requirements set.

### When should the agent use Bevy ecs components?

When defining Bevy components, required components, observers, lifecycle hooks or storage types in Bevy 0.20 code.

### What license applies?

The SKILL.md frontmatter states the MIT license, and the repository is listed under Apache-2.0.

### How do I install Bevy ecs components in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/bevy-ecs-components to use it in all your projects, or to .claude/skills/bevy-ecs-components in one project. Or install the raea plugin, which includes it: /plugin marketplace add shinyobjectz/raea-skills, then /plugin install raea@raea.

### Does Bevy ecs components run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Bevy ecs components?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Bevy ecs components?

The closest alternatives to Bevy ecs components are Bevy ecs systems, Bevy ecs queries, Bevy core concepts, Bevy migration 0 17 to 0 18 and Bevy.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Bevy ecs systems](https://ai-powered.com/skills/bevy-ecs-systems): Bevy ecs systems is an open-source agent skill for developer tools.
- [Bevy ecs queries](https://ai-powered.com/skills/bevy-ecs-queries): Bevy ecs queries is an open-source agent skill for developer tools.
- [Bevy core concepts](https://ai-powered.com/skills/bevy-core-concepts): Bevy core concepts is an open-source agent skill for developer tools.
- [Bevy migration 0 17 to 0 18](https://ai-powered.com/skills/bevy-migration-0-17-to-0-18): Bevy migration 0 17 to 0 18 is an open-source agent skill for developer tools.
- [Bevy](https://ai-powered.com/skills/bevy-shinyobjectz): Bevy is an open-source agent skill for developer tools.
- [Bevy assets](https://ai-powered.com/skills/bevy-assets): Bevy assets is an open-source agent skill for developer tools.
- [Bevy migration 0 19 to 0 20](https://ai-powered.com/skills/bevy-migration-0-19-to-0-20): Bevy migration 0 19 to 0 20 is an open-source agent skill for developer tools.
- [Bevy save load](https://ai-powered.com/skills/bevy-save-load): Bevy save load is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/bevy-ecs-components
