instinct
Skill2 starsChanged 5 months agoMITView on GitHub
Continuous-learning observer. PostToolUse + Stop hooks write JSONL observations; a background Haiku subagent extracts atomic "instincts" (trigger → action, confidence-rated, domain-tagged). Project-level by default; promotes to global at 2+ projects. From affaan-m/ECC continuous-learning-v2.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- bhouvana/Instincttheir own version, first seen Nov 1, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- bhouvana/Instinct★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository60 other files it gives its agents.
- .claude/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- analyzeSkill
- animation-disciplineSkill
- api-versioningSkill
- autopilotSkill
- browser-e2eSkill
- characterizeSkill
- clarifySkill
- codemodSkill
- constitution-compactSkill
- constitutionSkill
- context-budgetSkill
- creative-webSkill
- db-migrationSkill
- debugSkill
- detect-stackSkill
- dispatch-criteriaSkill
- dreamSkill
- experimentSkill
- fastapiSkill
- flag-cleanupSkill
- flag-rolloutSkill
- flask-realtimeSkill
- framework-detectorSkill
- front-end-designSkill
- grill-meSkill
- handoffSkill
- image-generationSkill
- implementSkill
- initiativeSkill
- loopSkill
- nextjsSkill
- observabilitySkill
- okr-alignSkill
- parallel-swarmSkill
- pivotSkill
- planSkill
- pr-bodySkill
- prime-disciplineSkill
- prod-observabilitySkill
- react-nodeSkill
- react-viteSkill
- release-trainSkill
- researchSkill
- reviewSkill
- security-guardSkill
- self-healSkill
- shipSkill
- skill-creatorSkill
- specifySkill
- tailwind-disciplineSkill
- tasksSkill
- tdd-loopSkill
- token-budgetSkill
- typographySkill
- verify-loopSkill
- verifySkill
- wip-checkpointSkill
- <kebab-case-skill-name>Skill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 61
Project by default: Never auto-write to ~/.claude/instincts/global.yml without the 2-project threshold.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Instinct — Continuous Learning Observer
Most learning is one-shot ("don't do X again") and lost when the session ends. Instincts persist atomic lessons across sessions.
What an instinct is
A single (trigger → action) pair with provenance:
- id: i-<sha8>
trigger: "user mentions 'prod migration'"
action: "ask about peak hours and rebuild lock duration before suggesting"
confidence: 0.7
domain: db | frontend | auth | ci | security | refactor | general
evidence:
- session: <session-id> at <iso-ts>
- commit: <sha> (or PR: <url>, or incident: incidents/<file>)
status: project | global
created: <iso-date>
reinforced: <count>
last_seen: <iso-date>How it's captured
PostToolUse hook (.claude/hooks/instinct-observer.sh) appends to .claude/memory/.cache/instincts/observations.jsonl (gap-audit G25: path now matches the observer):
{"ts":"2026-05-27T22:31:00Z","tool":"Bash","cmd":"npm test","exit":1,"err":"timeout"}
{"ts":"2026-05-27T22:31:45Z","tool":"Edit","file":"src/auth.ts","diff_hint":"add 5s timeout"}
{"ts":"2026-05-27T22:32:10Z","tool":"Bash","cmd":"npm test","exit":0}Stop hook (auto-dream-check.sh) calls .claude/scripts/instinct-extract.sh on every fire; the script self-gates on ≥50 new observations (INSTINCT_EXTRACT_MIN) — roughly every few sessions. Force manually via /instinct extract. The extraction pass:
- Spawn fresh Haiku subagent (
claude -pwith empty context). - Subagent reads observations.jsonl since last extraction.
- Subagent identifies repeated patterns: same kind of failure, same fix.
- Subagent emits 0-5 candidate instincts.
- Each candidate gets a confidence score (0.3-0.9).
- Stored at
.claude/memory/instincts/active.yml.
How it's used
- SessionStart:
session-start-context.shgreps active.yml for instincts whosetriggermatches the current branch / task / open file. Injects top 3 matching as additional context. - UserPromptSubmit:
skill-router.shchecks if user prompt matches any instinct trigger. If yes, injects the action as a system-reminder.
Promotion: project → global
Mechanics (gap-audit G26): bash .claude/scripts/instinct-promote.sh auto (dream step 4b) stages confidence-≥0.8 entries into ~/.claude/memory/instincts/global.yml as status: candidate with project provenance. When a second distinct project promotes the same trigger, the entry flips to status: global. Global instincts apply across all projects.
Hard rules
- Project by default. Never auto-write to
~/.claude/instincts/global.ymlwithout the 2-project threshold. - Confidence-gated. Instincts with confidence <0.5 are advisory only (not injected as system-reminders, only logged).
- Reinforce, don't duplicate. A repeat observation of an existing instinct increments
reinforcedand updateslast_seen; doesn't create a new entry. - PII-clean observations. Strip file paths to relative; strip URLs to domain; never log Bash stdout content (only exit codes + error class).
- Decay. Instincts not reinforced in 60 days drop confidence by 0.1; under 0.3 they archive.
Manual commands
/instinct list— show active instincts sorted by confidence/instinct extract— force an extraction pass now/instinct promote <id>— manually promote project → global/instinct promote <id> --as-skill— Round 9 A: when reinforced ≥ 10, materialize the instinct as a proposed skill via skill-creator. Writes to.claude/memory.proposed/skills/<slug>/; activate via/dream-review --approve-skill <slug>. Closes Round 5's "instinct → skill" loop./instinct archive <id>— soft-delete (kept in archive.yml)
References
- affaan-m/ECC/skills/continuous-learning-v2 (source — observer + Haiku extractor)
- Anthropic Memory Tool (parallel: per-task scratchpads in
/memories/) - The "lessons learned" pattern in
.claude/memory/incidents/(handwritten; instincts are the auto-extracted complement)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

