evolve
Skill0 starsChanged 5 months agoMITView on GitHub
Cluster related instincts by trigger family and lexical similarity, identify skill-creation candidates
41 other projects use a version of this.
Adopted by
Most recently taken up by
- SethGammon/Citadeltheir own version, first seen Nov 4, 2026
- vidit19sharma/neogentstheir own version, first seen Nov 1, 2026
- cabernect/caberostheir own version, first seen Nov 1, 2026
- Snowflake-Labs/coco-skillstheir own version, first seen Nov 1, 2026
- NobiResearch/Ovenbirdtheir own version, first seen Nov 1, 2026
- ES-92/esctheir own version, first seen Oct 20, 2026
Used with
Projects with it also use instinct-export, instinct-import and 9 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.
TheKREATORSSkillinstinct-export
Export instincts from project/global scope to a file
Also in 4 projects that use this
TheKREATORSSkillinstinct-import
Import instincts from file or URL into project/global scope
Also in 4 projects that use this
AWSSkillmap
Map verified service capabilities against customer-provided control framework and threat model. Produces mapping-results.json, controls-catalog.md, and framework-mapping.md. Supports pluggable frameworks: CCMv4, NIST 800-53, CIS Benchmarks, ISO 27001, etc. Split into 4 focused sub-skills for better accuracy; this skill orchestrates them.
Also in 5 projects that use this
diego-tobalinaSkillbuild-fix
Fix build and compilation errors systematically. Run when build fails.
Also in 3 projects that use this
qtzx06Skilleval
Evaluate trained YOLO model accuracy with mAP metrics and per-class error analysis. Identifies failure cases for targeted improvement. Use after training.
Also in 5 projects that use this
MontimageSkilltest-coverage
Improve test coverage by finding untested branches, error paths, and edge cases. Use when measuring or strengthening a project's tests. Don't use for production debugging, code review, or feature implementation.
Also in 3 projects that use this
- +1 more from TheKREATORS
Other versions41 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 41
- revfactory/harness★ 9.1ksame name
- Q00/ouroboros★ 6.3ksame name
- yologdev/yoyo-evolve★ 1.9ksame name
- iovisor/ubpf★ 996same name
- SethGammon/Citadel★ 927same name
- GAIR-NLP/ASI-Evolve★ 867same name
- Kanevry/session-orchestrator★ 53same name
- mycelium-hq/ai-brain-starter★ 50same name
- Snowflake-Labs/coco-skills★ 49same name
- unclejobs-ai/second-claude-code★ 41same name
31 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
- learn-evalSkill
- learnSkill
- 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
Show its rules and text
We split this skill into the rules it gives an agent
22 rules. 0 are common, 11 are distinctive, and 11 are very specific to this project.
0
Common
Most of the 36 edited versions we read keep these.
11
Distinctive
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 25
No flags → load global only (default to --global behavior)
- Very specific: line 32
If --project <slug> was passed, also load:
- Very specific: line 47
Filter: Only keep instincts where status is active or proven.
- Distinctive: line 49
If fewer than 2 active/proven instincts remain after filtering, output:
- Distinctive: line 73
If the cluster library is unavailable (ImportError or non-zero exit), fall back to manual pairwise comparison using trigram_jaccard.
- Distinctive: line 102
Start with each instinct in its own singleton group.
- Distinctive: line 104
When assigning cluster names and trigger families:
- Very specific: line 105
Look at the union of all trigger_patterns from member instincts
- Distinctive: line 116
Ensure the clusters directory exists:
- Very specific: line 158
After writing each cluster file, update each member instinct's lineage.cluster_id using the confidence library helper:
- Very specific: line 172
If the helper fails, use the Edit tool to do a targeted replacement of cluster_id: null with cluster_id: <CLU_ID> in the instinct's …
- Very specific: line 192
Read ~/.claude/instincts/global/INSTINCTS.md.
- Very specific: line 209
Use the Edit tool to replace the existing ## Clusters section content with the rebuilt version.
- Distinctive: line 238
If there are 0 promotion candidates, omit that section entirely.
- Distinctive: line 239
If there are 0 singletons (all instincts clustered), omit the singletons section.
- Distinctive: line 240
If there are 0 updated clusters, omit that section.
- Very specific: line 246
mkdir -p before writing any files: Always ensure ~/.claude/instincts/global/clusters/ exists before attempting to write CLU-*.md files.
- Distinctive: line 247
Prefer updates over creates: If a matching CLU file already exists, update it rather than creating a duplicate cluster.
- Very specific: line 248
Preserve instinct file integrity: When updating lineage.cluster_id, only change that one field.
- Very specific: line 249
Graceful fallback: If the cluster library is unavailable, fall back to manual trigram_jaccard comparison.
- Distinctive: line 250
Batch Python calls: Run pairwise comparisons in a single Python invocation, not one per pair.
- Distinctive: line 251
Be conservative with skill hypotheses: Only propose a skill if the cluster represents a clearly generalizable behavioral pattern.
“Common” is measured: kept by at least 6 in 10 of the 36 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>
Cluster active and proven instincts by lexical similarity and trigger family, write CLU-*.md cluster files, identify project instincts eligible for promotion, and update the INSTINCTS.md index with a Clusters section.
</objective>Instructions
You are clustering existing instincts — not extracting new ones and not promoting anything automatically. This is the structural pass that groups related behavioral rules so future skills can act on them.
Step 1: Load Instincts
Determine scope from the invocation arguments:
--global→ only load from~/.claude/instincts/global/--project <slug>→ load from global AND~/.claude/instincts/projects/<slug>/- No flags → load global only (default to
--globalbehavior)
GLOBAL_DIR="$HOME/.claude/instincts/global"
ls "$GLOBAL_DIR"/INS-*.md 2>/dev/nullIf --project <slug> was passed, also load:
PROJECT_DIR="$HOME/.claude/instincts/projects/<slug>"
ls "$PROJECT_DIR"/INS-*.md 2>/dev/nullFor each instinct file found, read the full content and parse the YAML frontmatter. Extract:
id,name,status,confidencesignals.trigger_patterns(list of strings)lineage.cluster_id(current cluster assignment if any)score.successes,score.confirmations,score.opportunities(or len of evidence array as opportunity proxy)evidence(array length = opportunity count)created_at- The
## Operational Rulebody text (the rule text used for similarity)
Filter: Only keep instincts where status is active or proven. Candidates are too immature to cluster.
If fewer than 2 active/proven instincts remain after filtering, output:
Not enough instincts to cluster.
Found N total instinct(s) but only M with status=active or status=proven.
Clustering requires at least 2 active/proven instincts.Then stop.
Step 2: Cluster by Similarity
First, try the cluster library:
python3 -c "
import sys, json; sys.path.insert(0, '$HOME/.claude/instincts/lib')
from cluster import cluster_instincts
clusters = cluster_instincts('$HOME/.claude/instincts/global/', min_similarity=0.55)
print(json.dumps(clusters, default=str))
" 2>/dev/nullIf the cluster library is unavailable (ImportError or non-zero exit), fall back to manual pairwise comparison using trigram_jaccard. Run the comparison across ALL loaded instincts (global + project if applicable):
python3 - <<'PYEOF'
import sys, json, os
sys.path.insert(0, os.path.expanduser('~/.claude/instincts/lib'))
from similarity import trigram_jaccard, parse_instinct_file
# Build instinct list from all loaded files
files = <LIST_OF_INSTINCT_FILE_PATHS>
instincts = [parse_instinct_file(f) for f in files]
instincts = [i for i in instincts if i and i.get('rule_text')]
# Pairwise similarity
pairs = []
for i in range(len(instincts)):
for j in range(i + 1, len(instincts)):
a, b = instincts[i], instincts[j]
sim = trigram_jaccard(a['rule_text'], b['rule_text'])
if sim >= 0.55:
pairs.append({'a': a['id'], 'b': b['id'], 'sim': round(sim, 4),
'a_name': a['name'], 'b_name': b['name']})
pairs.sort(key=lambda x: x['sim'], reverse=True)
print(json.dumps(pairs))
PYEOFClustering logic (union-find approach): Start with each instinct in its own singleton group. For each similar pair (similarity >= 0.55), merge their groups. After processing all pairs, groups with 2+ members become clusters. Singletons are listed in the "No Clusters" section of the report.
When assigning cluster names and trigger families:
- Look at the union of all
trigger_patternsfrom member instincts - Find the common theme (e.g., "slack-api", "digest-format", "git-workflow")
- Name the cluster after that theme in kebab-case
trigger_family= the shortest common prefix/theme across all trigger patterns
For each cluster, compute:
avg_confidence= mean of all member instincts'confidencevaluesskill_hypothesis= one-line description of what skill this cluster could become (e.g., "A skill that enforces correct Slack unread detection and triage patterns")
Step 3: Write Cluster Files
Ensure the clusters directory exists:
mkdir -p "$HOME/.claude/instincts/global/clusters"For each cluster with 2+ members, generate a unique ID:
SUFFIX=$(python3 -c "import secrets; print(secrets.token_hex(2))")
CLU_ID="CLU-$(date +%Y%m%d)-${SUFFIX}"Check if a cluster file for this group already exists by reading existing CLU-*.md files in ~/.claude/instincts/global/clusters/ and comparing their member_ids sets. If an existing cluster contains a subset or superset of the current member set (overlap >= 50%), treat it as the same cluster and update rather than create.
For a NEW cluster, write ~/.claude/instincts/global/clusters/CLU-YYYYMMDD-XXXX.md:
---
id: CLU-YYYYMMDD-XXXX
name: "<generalized cluster name in kebab-case>"
member_ids: [INS-..., INS-...]
avg_confidence: 0.XX
trigger_family: "<common pattern>"
skill_hypothesis: "<one-line: what skill would this cluster become?>"
status: candidate
created_at: "<ISO-8601>"
updated_at: "<ISO-8601>"
---
## Members
- INS-... | "<name>" | confidence: 0.XX | scope: global|project
- INS-... | "<name>" | confidence: 0.XX | scope: global|project
## Trigger Family
Shared patterns: <comma-separated list>
## Skill Hypothesis
<2-4 sentences describing the generalized behavioral rule this cluster represents and what a synthesized skill would enforce.>For an UPDATED cluster (existing CLU file gains a new member), update member_ids, avg_confidence, updated_at, and the ## Members section. Append the new member line.
After writing each cluster file, update each member instinct's lineage.cluster_id using the confidence library helper:
python3 -c "
import sys
sys.path.insert(0, '$HOME/.claude/instincts/lib')
from confidence import update_instinct_file
update_instinct_file('<INSTINCT_PATH>', {
'lineage.cluster_id': '<CLU_ID>',
'updated_at': '<ISO_TIMESTAMP>',
})
"If the helper fails, use the Edit tool to do a targeted replacement of cluster_id: null with cluster_id: <CLU_ID> in the instinct's frontmatter.
Step 4: Identify Promotion Candidates
This step only runs if project instincts were loaded (i.e., --project <slug> was passed).
Scan all proven project instincts (those with scope: project and status: proven). For each, check all three promotion eligibility criteria:
- Confidence threshold:
confidence >= 0.85 - Opportunity threshold:
opportunities >= 15(uselen(evidence)as opportunity count proxy if no explicit field) - Generality check: Count tokens in the
## Operational Ruletext that are project-specific (project names, file paths, tool names unique to the project, API endpoints, etc.). The ratio of project-specific tokens to total tokens must be < 30%.
For the generality check, use this heuristic:
- Project-specific tokens include: the project slug name, filenames like
*.py/*.jsthat appear to be project-specific, API URLs with project-specific domains, team names, ClickUp/Linear IDs. - Universal tokens include: generic tool names (git, python, bash), general patterns (always, never, when, if), verbs (run, check, validate, use).
Report each eligible instinct but do NOT modify it. Only /promote moves instincts.
Step 5: Update INSTINCTS.md
Read ~/.claude/instincts/global/INSTINCTS.md. Find the ## Clusters section. If it does not exist, append it at the end of the file.
Rebuild the ## Clusters section from scratch by reading ALL CLU-*.md files currently in ~/.claude/instincts/global/clusters/:
## Clusters
- CLU-XXXXXXXX-XXXX | N members | avg_conf: 0.XX | "<trigger family>"
- CLU-XXXXXXXX-XXXX | N members | avg_conf: 0.XX | "<trigger family>"Sort entries by avg_confidence descending. If there are no clusters at all, keep the section as:
## Clusters
(none yet)Use the Edit tool to replace the existing ## Clusters section content with the rebuilt version. Do not touch any other section.
Step 6: Report
Output a summary to the user:
## Instinct Evolution Report
**Analyzed**: N instincts (N active, N proven) across N scope(s)
**Clusters formed**: N new, N updated
### New Clusters (N)
- CLU-XXXXXXXX-XXXX | N members | "<trigger family>" | skill hypothesis: "<one-line>"
Members: INS-XXX ("name"), INS-XXX ("name")
Avg confidence: 0.XX | Min similarity: 0.XX
### Updated Clusters (N)
- CLU-XXXXXXXX-XXXX | added INS-XXX | N→N+1 members | "<trigger family>"
### Promotion Candidates (N)
- INS-XXX | "<name>" | confidence: 0.XX | opportunities: N | scope: project/<slug>
→ Eligible for /promote — run /promote <id> to move to global scope
### No Clusters (N singletons)
- INS-XXX | "<name>" — no similar instincts found (best pair similarity: 0.XX)
- INS-XXX | "<name>" — no similar instincts found (no pairs above 0.55 threshold)If there are 0 promotion candidates, omit that section entirely. If there are 0 singletons (all instincts clustered), omit the singletons section. If there are 0 updated clusters, omit that section.
Important Constraints
- Never auto-promote. This skill only identifies promotion candidates. Moving an instinct to global scope is a user action via
/promote. - Only cluster active/proven instincts. Candidates are too immature — clustering them would embed low-quality signals into the structural layer.
- mkdir -p before writing any files. Always ensure
~/.claude/instincts/global/clusters/exists before attempting to write CLU-*.md files. - Prefer updates over creates. If a matching CLU file already exists, update it rather than creating a duplicate cluster.
- Preserve instinct file integrity. When updating
lineage.cluster_id, only change that one field. Never rewrite the whole instinct file. - Graceful fallback. If the cluster library is unavailable, fall back to manual trigram_jaccard comparison. If similarity.py is also unavailable, report "Similarity library unavailable — cannot cluster" and exit cleanly without writing any files.
- Batch Python calls. Run pairwise comparisons in a single Python invocation, not one per pair.
- Be conservative with skill hypotheses. Only propose a skill if the cluster represents a clearly generalizable behavioral pattern. "Two instincts about Slack" is not enough for a skill hypothesis if they are about unrelated Slack behaviors.
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.

