assembly-definitions
Assembly definition management — when to create asmdefs, reference rules, Editor/Runtime/Test separation, platform filters, compilation speed optimization.
How the atomic instinct learning system works — observations, distillation, confidence scoring, project vs global scope, and promotion/evolution workflows.
$ npx -y skills add XeldarAlz/everything-claude-unity --skill unity-instincts --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/unity-instinctsContext preview
The summary Claude sees to decide when to auto-load this skill.
How the atomic instinct learning system works — observations, distillation, confidence scoring, project vs global scope, and promotion/evolution workflows.
name: unity-instincts description: "How the atomic instinct learning system works — observations, distillation, confidence scoring, project vs global scope, and promotion/evolution workflows." alwaysApply: false globs: [".claude/hooks/instinct-*.sh", ".claude/state/instincts/**/*", ".claude/commands/unity-instincts.md"]
A lightweight pattern-learning layer that turns tool-use observations into reusable project-local knowledge without any LLM calls.
Our static rules in `.claude/rules/` encode *universal* Unity truths (serialization safety, lifecycle order, perf golden rules). But every project has its own conventions the rules can't know:
The instinct system captures these project-specific patterns automatically. Universal patterns remain owned by rules.
.claude/state/instincts/
├── observations.jsonl # raw PostToolUse events
├── project/<project-hash>/ # project-scoped instincts
│ └── <instinct-id>.json
└── global/ # promoted instincts
└── <instinct-id>.jsonEach instinct:
{
"id": "h1-view-warning-hotspot",
"trigger": "before editing *View.cs",
"action": "expect quality-gate warnings; read Model first; avoid Update-loop allocations",
"confidence": 0.7,
"domain": "mvs",
"scope": "project",
"project_id": "a1b2c3d4e5f6",
"evidence_count": 9,
"first_seen": "2026-04-24T10:00:00Z",
"last_seen": "2026-04-24T17:45:00Z",
"source": "auto-distill"
}Tool use (every Edit/Write/Read/Bash/Grep/...)
│
▼ instinct-capture.sh (PostToolUse, ~10ms)
observations.jsonl
│
▼ instinct-distill.sh (Stop hook, heuristic, ~100ms)
project/<hash>/*.json (confidence bumped by 0.1 per evidence, capped 0.9)
│
▼ /unity-instincts evolve (manual)
Draft SKILL.md for review
│
▼ /unity-instincts promote (manual, cross-project check)
global/*.json**H1 — Warning hotspot by path tag.** If observations with a given `path_tag` (view/system/model/sobject/mono/editor/scene/prefab) accumulate >=2 new warnings across >=3 tool-uses in a session, an instinct is emitted or bumped.
**H2 — Tool-sequence affinity.** If `*View.cs` edits are frequently preceded by `*Model.cs` reads, emit the "read Model before editing View" instinct.
**H3 — Hook-specific recurrence.** A hook (warn-serialization, warn-filename, warn-platform-defines, quality-gate, gateguard) that fires >=3 times in one session becomes a project-level instinct.
All three are cheap string/count operations in the Stop hook — no LLM, no background agent.
| Evidence count | Confidence | Treatment | |---|---|---| | 1 | 0.3 | tentative — do not surface | | 2–3 | 0.4–0.5 | medium — include in `status` | | 4–6 | 0.6–0.7 | strong — surface during workflow planning | | 7+ | 0.8–0.9 | near-certain — candidate for `evolve` to skill |
Rules win on conflict. If a rule exists covering the same pattern, the instinct is redundant and should be discarded during `evolve`. `/unity-instincts evolve` output is intentionally a *draft* — the user reviews before promoting learning into a codified rule.
Instincts fill the gap between "obvious universal" and "deliberate project policy".
All user-facing operations are in `/unity-instincts` (see `.claude/commands/unity-instincts.md`). Hooks are automatic and silent.
The ultimate Claude Code toolkit for Unity game development. A production-ready, plug-and-play system that gives Claude Code deep Unity expertise — from writing performant C# to building scenes, profiling performance, and triggering iOS/Android builds — all
Assembly definition management — when to create asmdefs, reference rules, Editor/Runtime/Test separation, platform filters, compilation speed optimization.
Structured commit trailers — adds Constraint, Rejected, Scope-risk, and Not-tested metadata to commit messages. Captures architectural decisions and known gaps…
Ambiguity gating — detects vague feature requests and forces structured requirements gathering with scoring across scope, platform, performance, integration,…
Event system patterns — C# events, UnityEvent, SO event channels, static EventBus. When to use each, zero-allocation patterns, memory leak prevention.
Configures Claude Code's statusline to display Unity workflow state — current phase, active agent, files modified, and session duration.
Post-debugging knowledge extraction — captures non-obvious, codebase-specific learnings that pass quality gates. Invoke after resolving tricky bugs or…