Install
$ agentstack add skill-xeldaralz-everything-claude-unity-unity-instincts ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
Unity Instinct Learning System
A lightweight pattern-learning layer that turns tool-use observations into reusable project-local knowledge without any LLM calls.
Why it exists
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:
- This project stores Models in
Runtime/Domain/, notScripts/Models/. - Editing *View.cs reliably triggers quality-gate warnings here because developers hand-roll input handling.
- VContainer scopes are nested by feature, not by scene.
The instinct system captures these project-specific patterns automatically. Universal patterns remain owned by rules.
Data model
.claude/state/instincts/
├── observations.jsonl # raw PostToolUse events
├── project// # project-scoped instincts
│ └── .json
└── global/ # promoted instincts
└── .json
Each 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"
}
Pipeline
Tool use (every Edit/Write/Read/Bash/Grep/...)
│
▼ instinct-capture.sh (PostToolUse, ~10ms)
observations.jsonl
│
▼ instinct-distill.sh (Stop hook, heuristic, ~100ms)
project//*.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
Heuristics currently emitted
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.
Confidence ladder
| 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 |
Scope rules
- Default scope on creation:
project. /unity-instincts promoterequires the same trigger to appear in another project hash, OR--force.- Global instincts are loaded on session start for every project (TODO: wire into session-restore).
Interaction with static rules
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.
When NOT to use
- For enforcing known Unity correctness (e.g., FormerlySerializedAs on rename) — that's a rule, not an instinct.
- For one-shot migration learnings — those belong in the migration PR description.
- For cross-cutting project decisions (architecture, pipeline choice) — those belong in CLAUDE.md.
Instincts fill the gap between "obvious universal" and "deliberate project policy".
Commands
All user-facing operations are in /unity-instincts (see .claude/commands/unity-instincts.md). Hooks are automatic and silent.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: XeldarAlz
- Source: XeldarAlz/everything-claude-unity
- License: MIT
- Homepage: https://github.com/XeldarAlz/everything-claude-unity#readme
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.