[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6KG9B60VBK16ZBAZRZJB1GA":3,"skill-same:01M6KG9B60VBK16ZBAZRZJB1GA":66},{"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":36,"linkOnly":37,"markdownContent":38,"markdownBody":39,"frontMatter":40,"refName":45,"commitSha":46,"skillDirectory":47,"forksCount":48,"repositoryHtmlUrl":49,"repositoryHomepageUrl":6,"ownerHtmlUrl":50,"ownerBlogUrl":6,"ownerDescription":51,"updatedAt":52,"install":53,"resources":65},"01M6KG9B60VBK16ZBAZRZJB1GA","wave4-ijobchunk-full-anatomy",null,"Low-level parallel chunk iteration with explicit enableable-component mask handling, type handle management, and per-chunk metadata access.","dyCuong03\u002Funity-agent-team","dyCuong03","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F137050365?v=4","01M6KFXC85HQHXZJC2VC1KY6EZ","CuongND","01M6KFXCCHP6CD5MTA8NECJC36",8,"MIT","https:\u002F\u002Fgithub.com\u002FdyCuong03\u002Funity-agent-team\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Funity-dots\u002Fwave4-ijobchunk-full-anatomy\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35],"wave4 ijobchunk full anatomy","full","anatomy","iteration","chunks","enableable","true","mask","with","type","component","jobs","management","parallel","access","metadata","chunk","2026-11-10 10:12:30",false,"﻿---\nname: wave4-ijobchunk-full-anatomy\ndescription: Low-level parallel chunk iteration with explicit enableable-component mask handling, type handle management, and per-chunk metadata access.\ntags: [jobs, chunks]\nmetadata:\n  internal-only: true\n  tier: 3\n---\n\n# IJobChunk — Full Anatomy with Enableable Mask\n\n## Intent\nLow-level parallel chunk iteration with explicit enableable-component mask handling, type handle management, and per-chunk metadata access.\n\n## Use When\n- Per-chunk metadata needed: `unfilteredChunkIndex`, `DidChange`, SharedComponent values, `ChunkHeader`.\n- Fine-grained enableable-component masking required.\n- ECB.ParallelWriter sort key must be `unfilteredChunkIndex` for deterministic parallel playback.\n- IJobEntity source generation is insufficient.\n\n## Avoid When\nStandard entity iteration without per-chunk metadata — use IJobEntity (less boilerplate, identical performance).\n\n## Senior Pattern\n```csharp\n[BurstCompile]\npublic struct MyChunkJob : IJobChunk\n{\n    public ComponentTypeHandle\u003CVelocity> VelocityHandle;\n    [ReadOnly] public ComponentTypeHandle\u003CSpeed> SpeedHandle;\n    public EntityTypeHandle EntityHandle;\n    public EntityCommandBuffer.ParallelWriter Ecb;\n    public float DeltaTime;\n\n    [BurstCompile]\n    public void Execute(in ArchetypeChunk chunk, int unfilteredChunkIndex,\n        bool useEnableMask, in v128 chunkEnabledMask)\n    {\n        var velocities = chunk.GetNativeArray(ref VelocityHandle);\n        var speeds     = chunk.GetNativeArray(ref SpeedHandle);\n        var entities   = chunk.GetNativeArray(EntityHandle);\n\n        var enumerator = new ChunkEntityEnumerator(useEnableMask, chunkEnabledMask, chunk.Count);\n        while (enumerator.NextEntityIndex(out var i))\n        {\n            velocities[i] = new Velocity { Value = velocities[i].Value + speeds[i].Value * DeltaTime };\n            if (speeds[i].Value > 100f)\n                Ecb.RemoveComponent\u003CSpeed>(unfilteredChunkIndex, entities[i]);\n        }\n    }\n}\n\n\u002F\u002F In OnUpdate:\nvar job = new MyChunkJob\n{\n    VelocityHandle = state.GetComponentTypeHandle\u003CVelocity>(),\n    SpeedHandle    = state.GetComponentTypeHandle\u003CSpeed>(true),\n    EntityHandle   = state.GetEntityTypeHandle(),\n    Ecb            = ecbSystem.CreateCommandBuffer().AsParallelWriter(),\n    DeltaTime      = SystemAPI.Time.DeltaTime\n};\nstate.Dependency = job.ScheduleParallel(myQuery, state.Dependency);\n```\n\n## Anti-Patterns\n- Not passing `useEnableMask`\u002F`chunkEnabledMask` to `ChunkEntityEnumerator` — silently processes disabled entities.\n- Caching `ComponentTypeHandle\u003CT>` across frames — stale after structural changes; always call `state.GetComponentTypeHandle\u003CT>()` in OnUpdate.\n- Using `chunk.Count` directly when query has enableable components — iterates disabled entities.\n\n## Runtime Risks\n- Stale type handles throw safety errors in development builds; silently corrupt data in release builds.\n- Wrong ECB.ParallelWriter sort key (not `unfilteredChunkIndex`) = non-deterministic command playback order.\n\n## Performance Notes\n- Direct NativeArray access via type handles = maximum cache locality (chunk memory is contiguous).\n- `ScheduleParallel` distributes whole chunks across workers.\n- Per-chunk scheduling overhead is lower than per-entity scheduling.\n\n## Architecture Guidance\nAlways use `unfilteredChunkIndex` as ECB.ParallelWriter sort key. Reserve IJobChunk for systems where per-chunk information genuinely changes behavior — otherwise use IJobEntity.\n\n## Related Skills\n[[ijobchunk-chunk-job]], [[enableable-component]], [[ecb-parallel-writer]], [[job-dependency-chain]]\n","# IJobChunk — Full Anatomy with Enableable Mask\n\n## Intent\nLow-level parallel chunk iteration with explicit enableable-component mask handling, type handle management, and per-chunk metadata access.\n\n## Use When\n- Per-chunk metadata needed: `unfilteredChunkIndex`, `DidChange`, SharedComponent values, `ChunkHeader`.\n- Fine-grained enableable-component masking required.\n- ECB.ParallelWriter sort key must be `unfilteredChunkIndex` for deterministic parallel playback.\n- IJobEntity source generation is insufficient.\n\n## Avoid When\nStandard entity iteration without per-chunk metadata — use IJobEntity (less boilerplate, identical performance).\n\n## Senior Pattern\n```csharp\n[BurstCompile]\npublic struct MyChunkJob : IJobChunk\n{\n    public ComponentTypeHandle\u003CVelocity> VelocityHandle;\n    [ReadOnly] public ComponentTypeHandle\u003CSpeed> SpeedHandle;\n    public EntityTypeHandle EntityHandle;\n    public EntityCommandBuffer.ParallelWriter Ecb;\n    public float DeltaTime;\n\n    [BurstCompile]\n    public void Execute(in ArchetypeChunk chunk, int unfilteredChunkIndex,\n        bool useEnableMask, in v128 chunkEnabledMask)\n    {\n        var velocities = chunk.GetNativeArray(ref VelocityHandle);\n        var speeds     = chunk.GetNativeArray(ref SpeedHandle);\n        var entities   = chunk.GetNativeArray(EntityHandle);\n\n        var enumerator = new ChunkEntityEnumerator(useEnableMask, chunkEnabledMask, chunk.Count);\n        while (enumerator.NextEntityIndex(out var i))\n        {\n            velocities[i] = new Velocity { Value = velocities[i].Value + speeds[i].Value * DeltaTime };\n            if (speeds[i].Value > 100f)\n                Ecb.RemoveComponent\u003CSpeed>(unfilteredChunkIndex, entities[i]);\n        }\n    }\n}\n\n\u002F\u002F In OnUpdate:\nvar job = new MyChunkJob\n{\n    VelocityHandle = state.GetComponentTypeHandle\u003CVelocity>(),\n    SpeedHandle    = state.GetComponentTypeHandle\u003CSpeed>(true),\n    EntityHandle   = state.GetEntityTypeHandle(),\n    Ecb            = ecbSystem.CreateCommandBuffer().AsParallelWriter(),\n    DeltaTime      = SystemAPI.Time.DeltaTime\n};\nstate.Dependency = job.ScheduleParallel(myQuery, state.Dependency);\n```\n\n## Anti-Patterns\n- Not passing `useEnableMask`\u002F`chunkEnabledMask` to `ChunkEntityEnumerator` — silently processes disabled entities.\n- Caching `ComponentTypeHandle\u003CT>` across frames — stale after structural changes; always call `state.GetComponentTypeHandle\u003CT>()` in OnUpdate.\n- Using `chunk.Count` directly when query has enableable components — iterates disabled entities.\n\n## Runtime Risks\n- Stale type handles throw safety errors in development builds; silently corrupt data in release builds.\n- Wrong ECB.ParallelWriter sort key (not `unfilteredChunkIndex`) = non-deterministic command playback order.\n\n## Performance Notes\n- Direct NativeArray access via type handles = maximum cache locality (chunk memory is contiguous).\n- `ScheduleParallel` distributes whole chunks across workers.\n- Per-chunk scheduling overhead is lower than per-entity scheduling.\n\n## Architecture Guidance\nAlways use `unfilteredChunkIndex` as ECB.ParallelWriter sort key. Reserve IJobChunk for systems where per-chunk information genuinely changes behavior — otherwise use IJobEntity.\n\n## Related Skills\n[[ijobchunk-chunk-job]], [[enableable-component]], [[ecb-parallel-writer]], [[job-dependency-chain]]\n",{"name":5,"tags":41,"metadata":42,"description":7},[30,23],{"tier":43,"internal-only":44},3,true,"main","fe4746b9f07e6c7c2b6d3932002183af9b9f6fa2",".claude\u002Fskills\u002Funity-dots\u002Fwave4-ijobchunk-full-anatomy",0,"https:\u002F\u002Fgithub.com\u002FdyCuong03\u002Funity-agent-team","https:\u002F\u002Fgithub.com\u002FdyCuong03","Game developer","2026-07-25 22:22:25",{"source":8,"skillName":5,"commands":54,"prompt":64,"zipAvailable":44},[55,58,61],{"tool":56,"command":57},"npx","npx skills add dyCuong03\u002Funity-agent-team --skill wave4-ijobchunk-full-anatomy",{"tool":59,"command":60},"bunx","bunx skills add dyCuong03\u002Funity-agent-team --skill wave4-ijobchunk-full-anatomy",{"tool":62,"command":63},"pnpm","pnpm dlx skills add dyCuong03\u002Funity-agent-team --skill wave4-ijobchunk-full-anatomy","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FdyCuong03\u002Funity-agent-team\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Funity-dots\u002Fwave4-ijobchunk-full-anatomy\u002FSKILL.md",[],[67,92,115,139,159,180],{"skillNo":68,"name":69,"nameZh":6,"description":70,"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":73,"publishedAt":36},"01M6KH55FFS00ET877QSMRYGX4","dots-update-groups","How to choose the right ECS system group and ordering so per-frame and per-fixed-step work is deterministic and never races its own readers. Covers InitializationSystemGroup \u002F SimulationSystemGroup \u002F PresentationSystemGroup \u002F FixedStepSimulationSystemGroup \u002F VariableRateSimulationSystemGroup, UpdateBefore \u002F UpdateAfter peer ordering, OrderFirst \u002F OrderLast group-boundary placement, RateManager, and the cross-group ordering trap. Use when adding an ISystem, fixing \"value visible one frame late\" bugs, or coupling simulation to a fixed timestep.","https:\u002F\u002Fgithub.com\u002FdyCuong03\u002Funity-agent-team\u002Fblob\u002Fmain\u002Fworkspace\u002Fdots-program\u002Fscratch\u002Fwave-2-orchestrator-drafts\u002Fdots-update-groups\u002FSKILL.md",[],[74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91],"update","dots update groups","boundary","simulation","how","system","choose","work","use","never","peer","deterministic","how to","coupling","ecs","bugs","frame","value",{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":36},"01M6KH50PWYEFQDCGYBZ0326F1","dots-transform-patterns","The Entities 1.x transform model — LocalTransform (writable input) vs LocalToWorld (system-owned matrix), Parent\u002FChild hierarchy, reparenting cost, uniform vs non-uniform scale (PostTransformMatrix), and when to opt out with custom transform systems. Use when designing parent\u002Fchild hierarchies, runtime reparenting (mount\u002Fdismount\u002Fsocket), or choosing transform components at the Baker boundary.","https:\u002F\u002Fgithub.com\u002FdyCuong03\u002Funity-agent-team\u002Fblob\u002Fmain\u002Fworkspace\u002Fdots-program\u002Fscratch\u002Fwave-2-orchestrator-drafts\u002Fdots-transform-patterns\u002FSKILL.md",[],[99,100,101,102,76,79,103,104,82,105,106,107,108,27,109,110,111,112,113,114],"patterns","transform","dots transform patterns","components","mount","model","cost","runtime","systems","input","matrix","socket","at","child","custom","hierarchy",{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":126,"publishedAt":36},"01M6KH4VW4MA14DQW4KQYPFT0S","dots-singleton-patterns","Model cross-system shared configuration and game state as a single-entity component with a strict single-writer contract. Covers RequireForUpdate gating, SystemAPI.GetSingleton \u002F GetSingletonRW \u002F HasSingleton \u002F TryGetSingleton, bake-time vs runtime-created vs ECB-system singletons, the \"exactly one entity\" runtime invariant, and the single-writer rule. Use when designing frame-stable global config, shared mutable state, or any component intended to exist on exactly one entity.","https:\u002F\u002Fgithub.com\u002FdyCuong03\u002Funity-agent-team\u002Fblob\u002Fmain\u002Fworkspace\u002Fdots-program\u002Fscratch\u002Fwave-2-orchestrator-drafts\u002Fdots-singleton-patterns\u002FSKILL.md",[121],{"categoryNo":122,"categoryName":123,"taxonomyType":124,"taxonomyTypeDesc":125},"01JBSEEDCAT000000000000037","律师与法务","PROFESSION","适用职业",[99,127,128,29,129,130,131,79,104,82,132,133,134,106,135,136,27,90,137,138],"singleton","dots singleton patterns","config","state","game","writer","time","shared","contract","as","ecb","gating",{"skillNo":140,"name":141,"nameZh":6,"description":142,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":143,"categories":144,"keywords":145,"publishedAt":36},"01M6KH4PR076AYNDZHD63HHWX6","dots-hybrid-bridge","The one-way bridge between DOTS-owned runtime state and Unity-owned presentation. Covers UnityObjectRef for managed asset refs in components, the DOTS-writes \u002F Unity-reads ownership rule, when to use managed IComponentData vs UnityObjectRef vs CompanionComponent, baker-bridge vs runtime-bridge, and SubScene boundary rules. Use when an entity must reference Unity assets (Mesh, Material, AudioClip, ScriptableObject), a MonoBehaviour view must read entity state, or input\u002FUI must trigger ECS work.","https:\u002F\u002Fgithub.com\u002FdyCuong03\u002Funity-agent-team\u002Fblob\u002Fmain\u002Fworkspace\u002Fdots-program\u002Fscratch\u002Fwave-2-orchestrator-drafts\u002Fdots-hybrid-bridge\u002FSKILL.md",[],[146,147,148,149,102,130,76,150,151,81,152,153,82,106,154,155,108,156,157,158],"bridge","hybrid","dots hybrid bridge","mesh","assets","Rules","read","view","trigger","unity","material","for","managed",{"skillNo":160,"name":161,"nameZh":6,"description":162,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":163,"categories":164,"keywords":165,"publishedAt":36},"01M6KH4FGRQ9AP2ND5H5HX4D83","dots-event-driven-ecs","Model one-frame events and external requests in ECS without dual ownership, polling, or persistent state leaks. Covers request-tag pattern with ECB, enableable command components (no structural change), event buffers (IBufferElementData), explicit consumer ownership, one-frame latency rules, and the banned C# event \u002F UnityEvent \u002F static bus anti-patterns. Use when input\u002FUI\u002Fnetwork must trigger ECS work, when a one-frame signal fans out to N consumers (damage, hit, collision), or when state changes must be processed exactly once.","https:\u002F\u002Fgithub.com\u002FdyCuong03\u002Funity-agent-team\u002Fblob\u002Fmain\u002Fworkspace\u002Fdots-program\u002Fscratch\u002Fwave-2-orchestrator-drafts\u002Fdots-event-driven-ecs\u002FSKILL.md",[],[166,167,88,168,169,102,170,171,172,104,81,173,174,99,175,176,108,177,178,179],"event driven","driven","event","dots event driven ecs","change","ui","network","command","anti-patterns","pattern","structural","events","static","request",{"skillNo":181,"name":182,"nameZh":6,"description":183,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":184,"categories":185,"keywords":197,"publishedAt":36},"01M6KH4BWRGCEBJ8PKCKCSGT33","valid_skill","A complete, well-formed test fixture skill for SkillHub validation testing. Covers basic task routing and code review for Unity projects.","https:\u002F\u002Fgithub.com\u002FdyCuong03\u002Funity-agent-team\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fvalid_skill\u002FSKILL.md",[186,191,194],{"categoryNo":187,"categoryName":188,"taxonomyType":189,"taxonomyTypeDesc":190},"01JBSEEDCAT000000000000007","代码审查","SCENARIO","使用场景",{"categoryNo":192,"categoryName":193,"taxonomyType":189,"taxonomyTypeDesc":190},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":195,"categoryName":196,"taxonomyType":189,"taxonomyTypeDesc":190},"01JBSEEDCAT000000000000023","Skill与智能体开发",[198,199,200,201,202,203,204,205,206,207,208,209,210,211,155,212,157],"valid skill","valid","code review","testing","review","test","routing","code","validation","projects","fixture skill","task","fixture","basic","complete"]