[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EXV1X47C142AV6NPDHREQY":3,"skill-same:01M6EXV1X47C142AV6NPDHREQY":67},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":33,"linkOnly":34,"markdownContent":35,"markdownBody":36,"frontMatter":37,"refName":38,"commitSha":39,"skillDirectory":40,"forksCount":41,"repositoryHtmlUrl":42,"repositoryHomepageUrl":43,"ownerHtmlUrl":44,"ownerBlogUrl":6,"ownerDescription":45,"updatedAt":46,"install":47,"resources":60},"01M6EXV1X47C142AV6NPDHREQY","bevy-ecs-expert",null,"Master Bevy's Entity Component System (ECS) in Rust, covering Systems, Queries, Resources, and parallel scheduling.","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",66,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fsickn33\u002Fbevy-ecs-expert\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32],"expert","bevy ecs expert","ecs","safe","rust","component","system","parallel","master","scheduling","queries","community","systems","resources","2026-11-10 10:12:30",false,"---\nname: bevy-ecs-expert\ndescription: Master Bevy's Entity Component System (ECS) in Rust, covering Systems, Queries, Resources, and parallel scheduling.\nrisk: safe\nsource: community\n---\n\n# Bevy ECS Expert\n\n## Overview\n\nA guide to building high-performance game logic using Bevy's data-oriented ECS architecture. Learn how to structure systems, optimize queries, manage resources, and leverage parallel execution.\n\n## When to Use This Skill\n\n- Use when developing games with the Bevy engine in Rust.\n- Use when designing game systems that need to run in parallel.\n- Use when optimizing game performance by minimizing cache misses.\n- Use when refactoring object-oriented logic into data-oriented ECS patterns.\n\n## Step-by-Step Guide\n\n### 1. Defining Components\n\nUse simple structs for data. Derive `Component` and `Reflect`.\n\n```rust\n#[derive(Component, Reflect, Default)]\n#[reflect(Component)]\nstruct Velocity {\n    x: f32,\n    y: f32,\n}\n\n#[derive(Component)]\nstruct Player;\n```\n\n### 2. Writing Systems\n\nSystems are regular Rust functions that query components.\n\n```rust\nfn movement_system(\n    time: Res\u003CTime>,\n    mut query: Query\u003C(&mut Transform, &Velocity), With\u003CPlayer>>,\n) {\n    for (mut transform, velocity) in &mut query {\n        transform.translation.x += velocity.x * time.delta_seconds();\n        transform.translation.y += velocity.y * time.delta_seconds();\n    }\n}\n```\n\n### 3. Managing Resources\n\nUse `Resource` for global data (score, game state).\n\n```rust\n#[derive(Resource)]\nstruct GameState {\n    score: u32,\n}\n\nfn score_system(mut game_state: ResMut\u003CGameState>) {\n    game_state.score += 10;\n}\n```\n\n### 4. Scheduling Systems\n\nAdd systems to the `App` builder, defining execution order if needed.\n\n```rust\nfn main() {\n    App::new()\n        .add_plugins(DefaultPlugins)\n        .init_resource::\u003CGameState>()\n        .add_systems(Update, (movement_system, score_system).chain())\n        .run();\n}\n```\n\n## Examples\n\n### Example 1: Spawning Entities with Bundles\n\n```rust\n#[derive(Bundle)]\nstruct PlayerBundle {\n    player: Player,\n    velocity: Velocity,\n    sprite: SpriteBundle,\n}\n\nfn setup(mut commands: Commands, asset_server: Res\u003CAssetServer>) {\n    commands.spawn(PlayerBundle {\n        player: Player,\n        velocity: Velocity { x: 10.0, y: 0.0 },\n        sprite: SpriteBundle {\n            texture: asset_server.load(\"player.png\"),\n            ..default()\n        },\n    });\n}\n```\n\n### Example 2: Query Filters\n\nUse `With` and `Without` to filter entities efficiently.\n\n```rust\nfn enemy_behavior(\n    query: Query\u003C&Transform, (With\u003CEnemy>, Without\u003CDead>)>,\n) {\n    for transform in &query {\n        \u002F\u002F Only active enemies processed here\n    }\n}\n```\n\n## Best Practices\n\n- ✅ **Do:** Use `Query` filters (`With`, `Without`, `Changed`) to reduce iteration count.\n- ✅ **Do:** Prefer `Res` over `ResMut` when read-only access is sufficient to allow parallel execution.\n- ✅ **Do:** Use `Bundle` to spawn complex entities atomically.\n- ❌ **Don't:** Store heavy logic inside Components; keep them as pure data.\n- ❌ **Don't:** Use `RefCell` or interior mutability inside components; let the ECS handle borrowing.\n\n## Troubleshooting\n\n**Problem:** System panic with \"Conflict\" error.\n**Solution:** You are likely trying to access the same component mutably in two systems running in parallel. Use `.chain()` to order them or split the logic.\n","# Bevy ECS Expert\n\n## Overview\n\nA guide to building high-performance game logic using Bevy's data-oriented ECS architecture. Learn how to structure systems, optimize queries, manage resources, and leverage parallel execution.\n\n## When to Use This Skill\n\n- Use when developing games with the Bevy engine in Rust.\n- Use when designing game systems that need to run in parallel.\n- Use when optimizing game performance by minimizing cache misses.\n- Use when refactoring object-oriented logic into data-oriented ECS patterns.\n\n## Step-by-Step Guide\n\n### 1. Defining Components\n\nUse simple structs for data. Derive `Component` and `Reflect`.\n\n```rust\n#[derive(Component, Reflect, Default)]\n#[reflect(Component)]\nstruct Velocity {\n    x: f32,\n    y: f32,\n}\n\n#[derive(Component)]\nstruct Player;\n```\n\n### 2. Writing Systems\n\nSystems are regular Rust functions that query components.\n\n```rust\nfn movement_system(\n    time: Res\u003CTime>,\n    mut query: Query\u003C(&mut Transform, &Velocity), With\u003CPlayer>>,\n) {\n    for (mut transform, velocity) in &mut query {\n        transform.translation.x += velocity.x * time.delta_seconds();\n        transform.translation.y += velocity.y * time.delta_seconds();\n    }\n}\n```\n\n### 3. Managing Resources\n\nUse `Resource` for global data (score, game state).\n\n```rust\n#[derive(Resource)]\nstruct GameState {\n    score: u32,\n}\n\nfn score_system(mut game_state: ResMut\u003CGameState>) {\n    game_state.score += 10;\n}\n```\n\n### 4. Scheduling Systems\n\nAdd systems to the `App` builder, defining execution order if needed.\n\n```rust\nfn main() {\n    App::new()\n        .add_plugins(DefaultPlugins)\n        .init_resource::\u003CGameState>()\n        .add_systems(Update, (movement_system, score_system).chain())\n        .run();\n}\n```\n\n## Examples\n\n### Example 1: Spawning Entities with Bundles\n\n```rust\n#[derive(Bundle)]\nstruct PlayerBundle {\n    player: Player,\n    velocity: Velocity,\n    sprite: SpriteBundle,\n}\n\nfn setup(mut commands: Commands, asset_server: Res\u003CAssetServer>) {\n    commands.spawn(PlayerBundle {\n        player: Player,\n        velocity: Velocity { x: 10.0, y: 0.0 },\n        sprite: SpriteBundle {\n            texture: asset_server.load(\"player.png\"),\n            ..default()\n        },\n    });\n}\n```\n\n### Example 2: Query Filters\n\nUse `With` and `Without` to filter entities efficiently.\n\n```rust\nfn enemy_behavior(\n    query: Query\u003C&Transform, (With\u003CEnemy>, Without\u003CDead>)>,\n) {\n    for transform in &query {\n        \u002F\u002F Only active enemies processed here\n    }\n}\n```\n\n## Best Practices\n\n- ✅ **Do:** Use `Query` filters (`With`, `Without`, `Changed`) to reduce iteration count.\n- ✅ **Do:** Prefer `Res` over `ResMut` when read-only access is sufficient to allow parallel execution.\n- ✅ **Do:** Use `Bundle` to spawn complex entities atomically.\n- ❌ **Don't:** Store heavy logic inside Components; keep them as pure data.\n- ❌ **Don't:** Use `RefCell` or interior mutability inside components; let the ECS handle borrowing.\n\n## Troubleshooting\n\n**Problem:** System panic with \"Conflict\" error.\n**Solution:** You are likely trying to access the same component mutably in two systems running in parallel. Use `.chain()` to order them or split the logic.\n",{"name":5,"risk":22,"source":30,"description":7},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Faiskillstore\u002Fmarketplace\u002Fsickn33\u002Fbevy-ecs-expert",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":48,"prompt":58,"zipAvailable":59},[49,52,55],{"tool":50,"command":51},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill bevy-ecs-expert",{"tool":53,"command":54},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill bevy-ecs-expert",{"tool":56,"command":57},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill bevy-ecs-expert","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fsickn33\u002Fbevy-ecs-expert\u002FSKILL.md",true,[61],{"path":62,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":65,"sourceHtmlUrl":66},"skill-report.json","REFERENCE","参考文档",10804,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fsickn33\u002Fbevy-ecs-expert\u002Fskill-report.json",[68,82,92,101,107,114],{"skillNo":69,"name":70,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":78,"publishedAt":33},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[73],{"categoryNo":74,"categoryName":75,"taxonomyType":76,"taxonomyTypeDesc":77},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[79,80,81],"model","model hierarchy","model hierarchy skill",{"skillNo":83,"name":84,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":88,"publishedAt":33},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[87],{"categoryNo":74,"categoryName":75,"taxonomyType":76,"taxonomyTypeDesc":77},[89,90,91],"MCP","zoom","zoom mcp",{"skillNo":93,"name":94,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":33},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[98,99,100,90],"sdk","zoom apps sdk","apps",{"skillNo":102,"name":103,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":33},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[103],{"skillNo":108,"name":109,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":113,"publishedAt":33},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[112],{"categoryNo":74,"categoryName":75,"taxonomyType":76,"taxonomyTypeDesc":77},[109],{"skillNo":115,"name":116,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":33},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[116]]