a5af81c8a8
Move the dots-dev skill from machine-local ~/.claude/skills/ into the repo at .claude/skills/dots-dev/ so it travels with a clone. Update the CLAUDE.md per-machine setup note to reflect that the skill no longer needs manual placement; unity-mcp-skill and native memory/ stay local. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
3.5 KiB
3.5 KiB
context7 — DOTS library IDs & query playbook
context7 is the primary source of truth for every DOTS API, signature, and "current best practice." Unity's Entities/Netcode packages change between minor versions; training-data recall is stale. Resolve → query before writing DOTS code.
Flow
resolve-library-id(libraryName, query)→ pick the Context7 ID (prefer High reputation + high snippet count + version matching the installed package).query-docs(libraryId, query)with a specific question ("How do I declare an IInputComponentData and read it in a predicted system in Netcode 1.x?"), not a bare keyword.- Cross-check working patterns against the official ECS Samples repo ID below.
- Limit: ≤3
resolvecalls and ≤3querycalls per question (the tool enforces this). Reuse IDs across a session.
Pin to the installed version
Before querying, read the installed version from Packages/packages-lock.json (or manage_packages action=list). If it differs from a seed ID's version, re-resolve and prefer the doc set matching what's installed. The seeds below were captured during skill authoring and may lag the project.
Seed library IDs (re-resolve if installed version differs)
| Package | Primary Context7 ID | Alt | Notes |
|---|---|---|---|
| Entities (DOTS) | /websites/unity3d_packages_com_unity_entities_1_4 |
/needle-mirror/com.unity.entities |
~7,099 snippets, High. Core ECS. |
| Netcode for Entities | /websites/unity3d_packages_com_unity_netcode_1_10_api |
/websites/unity3d_packages_com_unity_netcode_1_9 |
~2,512 snippets, High. Ghosts/prediction/RPC/input. |
| Entities Graphics | /websites/unity3d_packages_com_unity_entities_graphics_1_4 |
— | Rendering entities under URP/HDRP. |
| Official ECS Samples | /unity-technologies/entitycomponentsystemsamples |
— | Working sample patterns; Entities, Netcode, Physics, Graphics. |
| Unity Physics | resolve at runtime | — | resolve-library-id(libraryName="Unity Physics", query="DOTS collision/triggers"). |
| Burst | resolve at runtime | — | libraryName="Unity Burst". |
| Collections | resolve at runtime | — | libraryName="Unity Collections" (Native/Unsafe containers, allocators). |
| Mathematics | resolve at runtime | — | libraryName="Unity Mathematics" (float3/quaternion/math). |
Confirm Netcode for Entities is
com.unity.netcode(the ECS netcode), notcom.unity.netcode.gameobjects(Netcode for GameObjects). They are different products.
Query patterns that work (examples)
- "Entities 1.x: declare an
IJobEntitythat writes through anEntityCommandBuffer.ParallelWriterand schedule it with the right dependency." - "Netcode for Entities: minimal
GhostAuthoringComponent+[GhostField]setup for a predicted player-controlled ghost." - "Netcode for Entities: read
IInputComponentDatainside a system inPredictedSimulationSystemGroup, filtered bySimulate." - "Entities: correct
Baker<T>use ofGetEntitywithTransformUsageFlagsandDependsOn." - "Netcode for Entities: subclass
ClientServerBootstrapto create client/server worlds and target systems withWorldSystemFilter." - "Entities:
IEnableableComponentvs add/remove tag — API and when each is cheaper."
When NOT to use context7
- Genre/design precedent ("how do other games pace waves") →
WebSearch/WebFetch. - Pure C#/algorithm questions unrelated to a library → reason directly.
- The project's own conventions/design →
CLAUDE.md+ the vault.