# Bevy ecs queries

> Bevy ecs queries is an open-source agent skill for developer tools. Guides an agent through writing Bevy 0.20 ECS queries, filters and lenses correctly. It is available on Claude Code and Cursor.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Cursor
- **Website:** https://github.com/shinyobjectz/raea-skills/tree/main/skills/bevy/pack/bevy-ecs-queries
- **Repository:** https://github.com/shinyobjectz/raea-skills
- **GitHub stars:** 38
- **License:** MIT
- **Skill name:** bevy-ecs-queries
- **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 agent reference guidance for writing Bevy 0.20 ECS queries in Rust. It covers filtering with With, Without and Or, change detection with Changed and Added, parallel iteration with par_iter_mut, many-entity lookups with iter_many, and borrowing narrower views with transmute_lens. It also includes a canonical example system set and a table of the generic query bounds that Bevy 0.19 and later require.

The guidance focuses on migration pitfalls from Bevy 0.18 to 0.20. It explains that iter_many variants now yield Result values and how to handle misses with matched(), that broad queries also match hidden resource entities and need Without<IsResource> to avoid conflicts with ResMut, and that several FilteredResources and DeferredWorld query APIs are deprecated. It also notes that Changed and Added are tick-based and can miss updates in skipped frames.

The skill is plain Rust guidance with no scripts. It expects a Bevy 0.20 project and is released under the MIT license per its metadata. It points to related skills for components, systems and migration notes.

## When your agent uses it

> Use when writing `Query<D, F>` with `With`/`Without`/`Or`, detecting changes with `Changed<T>`/`Added<T>`, parallelising with `par_iter_mut`, looking up entity lists with `iter_many(..).matched()`, building a lens with `transmute_lens`, filtering resource entities with `Without<IsResource>`, or fixing generic-query errors naming `IterQueryData` or `SingleEntityQueryData` 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-queries)
- [License: MIT](https://github.com/shinyobjectz/raea-skills/tree/HEAD/skills/bevy/pack/bevy-ecs-queries)

## Features

- **Query filter patterns:** Shows how to combine With, Without and Or filters to select entities by presence.
- **Change detection rules:** Explains the difference between Changed and Added and their tick-based limits.
- **Parallel and many-entity iteration:** Covers par_iter_mut and iter_many with the Result-based behaviour introduced in Bevy 0.20.
- **Resource entity filtering:** Describes how broad queries match resource entities and how to exclude them.
- **Generic query bounds:** Lists the IterQueryData, SingleEntityQueryData and ArchetypeQueryData bounds and what requires them.
- **Bevy 0.18 to 0.20 gotchas:** Collects deprecations and compile-breaking changes to watch for when porting query code.

## Good for

- Write a Bevy system that moves entities using velocity components in parallel
- Fix a compile error about IterQueryData in a generic query function
- Update old iter_many loops to handle the Result type in Bevy 0.20
- Count only gameplay entities without including hidden resource entities
- React to components that were just added or changed in a Bevy system

## 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-queries`:

```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-queries &&
cp -R "$tmp/skills/bevy/pack/bevy-ecs-queries" ~/.claude/skills/bevy-ecs-queries &&
rm -rf "$tmp"
```

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

### Codex

Copy the skill folder to `~/.agents/skills/bevy-ecs-queries` 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-queries &&
cp -R "$tmp/skills/bevy/pack/bevy-ecs-queries" ~/.agents/skills/bevy-ecs-queries &&
rm -rf "$tmp"
```

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

### Cursor

Copy the skill folder to `~/.cursor/skills/bevy-ecs-queries` 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-queries &&
cp -R "$tmp/skills/bevy/pack/bevy-ecs-queries" ~/.cursor/skills/bevy-ecs-queries &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/bevy-ecs-queries` 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-queries
```

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

### VS Code

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

```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-queries &&
cp -R "$tmp/skills/bevy/pack/bevy-ecs-queries" ~/.copilot/skills/bevy-ecs-queries &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/bevy-ecs-queries` 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-queries` into your agent's skills folder as `bevy-ecs-queries`. Agents that support SKILL.md read one folder per skill.

## FAQ

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

It targets Bevy 0.20, with migration notes covering changes from 0.18 and 0.19.

### Does Bevy ecs queries require any scripts or external tools?

No scripts are included. It is a single SKILL.md file with guidance and example Rust code.

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

It applies when writing Query types with filters, change detection, parallel iteration, iter_many, transmute_lens, or when fixing generic query errors naming IterQueryData or SingleEntityQueryData in Bevy 0.20.

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

Copy the skill folder from GitHub to ~/.claude/skills/bevy-ecs-queries to use it in all your projects, or to .claude/skills/bevy-ecs-queries 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 queries 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 queries?

Claude Code and Cursor. 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 queries?

The closest alternatives to Bevy ecs queries are Bevy ecs components, Bevy ecs systems, Bevy, Bevy assets and Bevy migration 0 19 to 0 20.

## Where this comes from

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

## Alternatives

- [Bevy ecs components](https://ai-powered.com/skills/bevy-ecs-components): Bevy ecs components is an open-source agent skill for developer tools.
- [Bevy ecs systems](https://ai-powered.com/skills/bevy-ecs-systems): Bevy ecs systems 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 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 core concepts](https://ai-powered.com/skills/bevy-core-concepts): Bevy core concepts is an open-source agent skill for developer tools.
- [Bevy testing](https://ai-powered.com/skills/bevy-testing): Bevy testing is an open-source agent skill for developer tools.

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