learn
Skill0 starsChanged 5 months agoMITView on GitHub
Extract instincts from the current session — corrections, confirmations, and tool-usage patterns
195 other projects use a version of this.
Adopted by
Most recently taken up by
- Doist/todoist-aitheir own version, first seen Nov 9, 2026
- Doist/todoist-clitheir own version, first seen Nov 8, 2026
- HughYau/AcademicForgetheir own version, first seen Nov 8, 2026
- dimsedra/skillstheir own version, first seen Nov 8, 2026
- rajanrx/skillstheir own version, first seen Nov 8, 2026
- edwinidrus/dragonhoardtheir own version, first seen Nov 8, 2026
Used with
Projects with it also use add-anydoc, add-clidash and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
TomGranotSkilladd-anydoc
Add local office-document-to-Markdown conversion to NanoClaw agent containers with the pinned Firecrawl AnyDoc CLI. Use when agents need to read attached Word, PowerPoint, Excel, OpenDocument, RTF, EPUB, CSV, or text-based PDF files without uploading them to a hosted parser.
Also in 5 projects that use this
TomGranotSkilladd-clidash
Add clidash — a zero-dependency, read-only web dashboard that derives its tabs and tables at runtime from any CLI that lists resources as JSON. Ships pre-wired for NanoClaw's ncl CLI (agent groups, sessions, channels, users, roles), plus message-activity charts, a log tail, and a read-only file viewer for group skills/CLAUDE.md/profiles.
Also in 5 projects that use this
seek888Skillopen-gstack-browser
Launch GStack Browser — AI-controlled Chromium with the sidebar extension baked in. Opens a visible browser window where you can watch every action in real time. The sidebar shows a live activity feed and chat. Anti-bot stealth built in. Use when asked to "open gstack browser", "launch browser", "connect chrome", "open chrome", "real browser", "launch chrome", "side panel", or "control my browser". Voice triggers (speech-to-text aliases): "show me the browser".
Also in 11 projects that use this
Saqlain-811Skillios-sync
Regenerate the iOS debug bridge against the latest upstream gstack templates. (gstack)
Also in 6 projects that use this
MicrosoftSkilladd-codex
Use Codex (CLI + AppServer) as the full agent provider — planning, tool orchestration, native compaction, MCP tools, session resume — in place of the Claude Agent SDK. ChatGPT subscription or OPENAI_API_KEY. Per-group via agent_provider. Distinct from using OpenAI as an MCP tool (where Claude remains the planner).
Also in 6 projects that use this
MicrosoftSkilladd-deltachat
Add DeltaChat channel integration via @deltachat/stdio-rpc-server. Native adapter — no Chat SDK bridge. Email-based messaging with end-to-end encryption.
Also in 6 projects that use this
- +5 more from TomGranot
- +1 more from microsoft
Other versions195 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 195
- garrytan/gstack★ 141ksame name
- rohitg00/ai-engineering-from-scratch★ 78ksame name
- gavrielc/nanoclaw★ 31ksame name
- nanocoai/nanoclaw★ 31ksame name
- qwibitai/nanoclaw★ 31ksame name
- tigerless-labs/autoharness★ 11ksame name
- tw93/claude-health★ 7.5ksame name
- tw93/Waza★ 7.5ksame name
- nykooi1/vibe-wise★ 3.5ksame name
- HughYau/AcademicForge★ 2.6ksame name
185 more not listed
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 repository83 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- shep/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- shep/CLAUDE.mdCLAUDE.md
- advisory-version-checkSkill
- aeo-llm-content-plannerSkill
- agency-command-centerSkill
- agency-morning-briefSkill
- agency-scorecardSkill
- agent-runbookSkill
- agent-usageSkill
- autonomy-budgetSkill
- backlink-pr-angle-generatorSkill
- brand-kit-from-urlSkill
- browser-automationSkill
- building-autonomous-agentsSkill
- capability-mapSkill
- case-study-engineSkill
- clickup-apiSkill
- client-dashboardSkill
- client-health-scoreSkill
- client-onboarding-osSkill
- cli-llm-routingSkill
- codebase-mapSkill
- command-from-your-phoneSkill
- competitor-content-gap-analysisSkill
- connection-monitorSkill
- content-brief-generatorSkill
- determinism-patternSkill
- dispatch-and-briefSkill
- division-operating-modelSkill
- dreamingSkill
- durable-stateSkill
- entity-topical-authority-mapperSkill
- first-real-jobSkill
- founding-circle-ai-securitySkill
- gbp-competitor-auditSkill
- goal-modeSkill
- host-your-agentSkill
- html-reportsSkill
- instinct-bridgeSkill
- evolveSkill
- learn-evalSkill
- promoteSkill
- skill-createSkill
- internal-linking-auditorSkill
- keyword-deep-diveSkill
- ladder-auditSkill
- lanes-momentum-frameworkSkill
- launch-websiteSkill
- llm-citation-auditSkill
- migration-seo-paritySkill
- migration-visual-checkSkill
- model-gear-routerSkill
- multi-account-gatewaySkill
- multi-model-councilSkill
- night-shiftSkill
- novaSkill
- per-client-memory-routerSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
11 rules. 0 are common, 6 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 170 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 36
Read the event log if it exists (filter to today's entries):
- Distinctive: line 77
If the similarity library is not available, fall back to a manual grep-based search:
- Very specific: line 97
Use ~/.claude/instincts/projects/<project-slug>/ if the pattern is specific to the current project (references project-specific files, …
- Very specific: line 98
Use ~/.claude/instincts/global/ if the pattern is universal (general coding practices, tool usage patterns, communication preferences).
- Very specific: line 99
If --project-only was passed, always use project scope.
- Distinctive: line 103
Create the instinct file at the appropriate path using this exact format:
- Very specific: line 154
Ensure the appropriate INSTINCTS.md index file exists (create if needed):
- Distinctive: line 188
If no instincts were extracted, say so honestly and explain why (e.g., "Session was straightforward with no corrections or non-obvious …
- Distinctive: line 192
Never fabricate patterns: If you are unsure whether something is an instinct, skip it and mention it in the "Skipped" section.
- Distinctive: line 195
One instinct per behavioral rule: Do not bundle multiple unrelated rules into a single instinct.
- Very specific: line 196
Ensure directories exist: before writing files (mkdir -p).
“Common” is measured: kept by at least 6 in 10 of the 170 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<objective>
Analyze the current session's interactions to extract behavioral instincts — corrections the user made, confirmations of non-obvious approaches, and recurring tool-usage patterns — then persist them as scored instinct files for future sessions.
</objective>Instructions
You are extracting instincts — learned behavioral rules that improve future sessions. Be conservative. Only extract clear, repeatable patterns, never one-off instructions or obvious behaviors.
Thresholds for Extraction
- A correction must be emphatic ("no, never do X", "stop doing X", "wrong") or repeated (same correction given 2+ times) to qualify. A gentle redirect ("actually, try Y instead") counts only if the original behavior was a plausible default.
- A confirmation must be for a non-obvious behavior. "Yes" to "should I save the file?" is NOT an instinct. "Yes, always use that flag" or "exactly, that ordering matters" IS an instinct.
- A tool-usage pattern must appear 3+ times in the session to qualify. Two occurrences is coincidence.
Step 1: Gather Session Context
First, determine the current date and session scope:
TODAY=$(date +%Y-%m-%d)
MONTH=$(date +%Y-%m)
EVENT_LOG="$HOME/.claude/instincts/events/${MONTH}.ndjson"Read the event log if it exists (filter to today's entries):
if [ -f "$EVENT_LOG" ]; then
grep "\"$TODAY" "$EVENT_LOG" | tail -100
fiThen review the current conversation for these signal categories:
- Corrections — Look for user messages containing: "no", "don't", "stop", "wrong", "not that", "never", "instead", "actually". The message AFTER the correction contains the desired behavior.
- Confirmations — Look for user messages containing: "yes", "exactly", "perfect", "good", "that's right", "keep doing that". The behavior being confirmed is the instinct.
- Tool-order patterns — Look for repeated sequences of tool usage (e.g., edit → lint → test, or read → grep → read).
Also check for any --project-only flag in the invocation arguments. If present, only extract project-scoped instincts.
Step 2: Extract Candidate Instincts
For each detected pattern, formulate it as a structured behavioral rule:
- Name: Short descriptive kebab-case name (e.g.,
always-run-ruff-after-python-edit) - Description: One-line summary of the rule
- Trigger patterns: What activates this instinct — file types, tool combinations, keywords, contexts
- Anti-patterns: What should NOT trigger this instinct (to avoid false positives)
- Operational rule: The prescriptive instruction — what the agent should DO
Be specific. "Be careful with files" is useless. "Run ruff check after every Python file edit in this project" is an instinct.
Step 3: Check for Duplicates
For each candidate instinct, check against existing instincts using the similarity utility:
python3 -c "
import sys; sys.path.insert(0, '$HOME/.claude/instincts/lib')
from similarity import find_similar
results = find_similar('<candidate_rule_text>', '$HOME/.claude/instincts/global/')
for r in results: print(f'{r[\"id\"]}|{r[\"similarity\"]:.2f}|{r[\"name\"]}')
"If the similarity library is not available, fall back to a manual grep-based search:
grep -rl '<key_phrase>' ~/.claude/instincts/global/ ~/.claude/instincts/projects/ 2>/dev/nullDecision logic:
- Similarity > 0.68 with an existing instinct → MERGE: Update the existing instinct's evidence array, bump
confirmationsorcorrectionscount, updateupdated_attimestamp. Do NOT create a duplicate. - Similarity <= 0.68 or no match → CREATE: Write a new instinct file.
Step 4: Write Instinct Files
Generate a unique ID for each new instinct:
SUFFIX=$(python3 -c "import secrets; print(secrets.token_hex(2))")
ID="INS-$(date +%Y%m%d)-${SUFFIX}"Determine scope:
- Use
~/.claude/instincts/projects/<project-slug>/if the pattern is specific to the current project (references project-specific files, tools, APIs, or conventions). - Use
~/.claude/instincts/global/if the pattern is universal (general coding practices, tool usage patterns, communication preferences). - If
--project-onlywas passed, always use project scope.
Derive <project-slug> from the current working directory's basename or git remote name.
Create the instinct file at the appropriate path using this exact format:
---
id: <ID>
name: "<kebab-case-name>"
description: "<one-line summary>"
type: feedback
scope: project|global
status: candidate
confidence: 0.50
score:
successes: 0
failures: 0
confirmations: 1
corrections: 0
last_applied_at: "<ISO-8601 timestamp>"
half_life_days: 21
decay_floor: 0.05
signals:
trigger_patterns:
- "<pattern1>"
- "<pattern2>"
anti_patterns: []
evidence:
- session: "<session_id_or_date>"
kind: correction|confirmation|pattern
summary: "<what happened>"
ts: "<ISO-8601 timestamp>"
lineage:
parent_ids: []
cluster_id: null
promoted_from: null
version: 1
created_at: "<ISO-8601 timestamp>"
updated_at: "<ISO-8601 timestamp>"
---
## Operational Rule
<The behavioral rule — a clear, prescriptive instruction that an AI agent can follow.
Write it as an imperative: "Always X when Y" or "Never X unless Y".
Include the WHY if it is not obvious.>Set initial confidence based on evidence strength:
- Single emphatic correction → 0.50
- Repeated correction (2+ times) → 0.65
- Explicit user instruction ("from now on, always...") → 0.75
- Observed pattern (tool sequence) → 0.40
Step 5: Update Index
Ensure the appropriate INSTINCTS.md index file exists (create if needed):
~/.claude/instincts/global/INSTINCTS.mdfor global instincts~/.claude/instincts/projects/<slug>/INSTINCTS.mdfor project instincts
Append one line per new or updated instinct:
- <ID> | <status> | <confidence> | "<name>" | created <YYYY-MM-DD>For merged/updated instincts, find and replace the existing line with updated confidence.
Step 6: Report
Output a clear summary:
## Instinct Extraction Report
**Session**: <date>
**Scope**: <global|project|both>
### New Instincts Created (N)
- INS-XXXXXXXX-XXXX | "<name>" | confidence: 0.XX | scope: <scope>
→ "<one-line description>"
### Existing Instincts Updated (N)
- INS-XXXXXXXX-XXXX | "<name>" | confidence: 0.XX → 0.XX
→ merged evidence from this session
### Skipped (N)
- "<pattern>" — reason: <too weak / one-off / already covered by INS-XXX>If no instincts were extracted, say so honestly and explain why (e.g., "Session was straightforward with no corrections or non-obvious confirmations").
Important Constraints
- Never fabricate patterns. If you are unsure whether something is an instinct, skip it and mention it in the "Skipped" section.
- Prefer project scope unless the pattern is clearly universal (applies regardless of project).
- Do not extract instincts from your own behavior — only from USER corrections, confirmations, or repeated user-driven workflows.
- One instinct per behavioral rule. Do not bundle multiple unrelated rules into a single instinct.
- Ensure directories exist before writing files (
mkdir -p).
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.

