self-learning
Skill11 starsChanged 11 days agoMITView on GitHub
Promote recurring lessons into house-style instincts. Use when the user says "what have we learned", "promote this pattern", "review patterns", "run self-learning", "check instincts", or invokes /self-learning. Reads episodes from agent notes, curates patterns, and promotes instincts with human approval.
13 other projects use a version of this.
Adopted by
Most recently taken up by
- Grinv/anilist-mcp-servertheir own version, first seen Nov 27, 2026
- Grinv/steam-games-mcptheir own version, first seen Nov 20, 2026
- Grinv/tmdb-mcptheir own version, first seen Nov 16, 2026
- Proboi-ai/rolestheir own version, first seen Nov 8, 2026
- gopalparashar421/agent-skillstheir own version, first seen Nov 8, 2026
- Grinv/mal-mcptheir own version, first seen Oct 22, 2026
Used with
Projects with it also use changelog-style, docs-consistency-check and 4 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.
GrinvSkillchangelog-style
Turn a commit range into CHANGELOG.md entries following common-changelog style. Use when finishing a PR (adding to the [Unreleased] section) or cutting a release (moving [Unreleased] under a new version heading).
Also in 4 projects that use this
GrinvSkilldocs-consistency-check
Check README/manifest.json/server.json/CHANGELOG.md/AGENTS.md and docs/*.md for drift against the actual registered tools and source. Use after adding, renaming, or removing a tool, or as part of a live-audit pass.
Also in 4 projects that use this
MicrosoftSkillrelease
Use ONLY when the user explicitly asks to cut/publish a Huabu desktop release or tag a version. Performs an outward action — bumps the version in apps/desktop/package.json, commits + annotated-tags vX.Y.Z, and pushes the branch + tag. That tag push auto-builds the macOS/Windows installers and publishes a GitHub Release. Provides `status`, `bump`, `tag-push`, and a one-command `run` (bump → tag-push).
Also in 4 projects that use this
- +3 more from Grinv
Other versions13 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 13
- Kulaxyz/self-learning-skills★ 956same name
- ychampion/claude-self-learning★ 9same name
- Grinv/tmdb-mcp★ 8same name
- Grinv/steam-games-mcp★ 5same name
- Grinv/mal-mcp★ 3same name
- EvianEvans/rumor-checker★ 2same name
- gopalparashar421/agent-skills★ 2same name
- Grinv/anilist-mcp-server★ 2same name
- Proboi-ai/roles★ 1same name
- VibeEngineering-LLC/agent-ops-doctrine★ 1same name
3 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 repository45 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- analyze-dataSkill
- brainstormingSkill
- craft-lessonSkill
- create-agentSkill
- create-skillSkill
- customize-agentSkill
- customize-skillSkill
- designSkill
- deslopSkill
- developSkill
- discovery-reportSkill
- elicitationSkill
- empathy-mapSkill
- explore-ideaSkill
- grill-meSkill
- help-meSkill
- humanizeSkill
- incidentSkill
- iterateSkill
- journey-mapSkill
- jtbdSkill
- kanbanSkill
- launchSkill
- legal-safety-auditSkill
- maintenance-executeSkill
- maintenance-planSkill
- memorySkill
- motionSkill
- phaseSkill
- planSkill
- research-planSkill
- retroSkill
- reviewSkill
- root-causeSkill
- round-tableSkill
- shape-upSkill
- shut-upSkill
- statusSkill
- teach-meSkill
- testSkill
- unpack-problemSkill
- validate-ideaSkill
- validation-patternsSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 1 is distinctive, and 5 are very specific to this project.
0
Common
Most of the 9 edited versions we read keep these.
1
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
- Very specific: line 30
After a @retro, to decide which lessons are now general practice.
- Distinctive: line 31
When the same approach has solved a problem repeatedly across agents.
- Very specific: line 34
Do not invoke to record a single one-off lesson — that is a normal @memory-controller write to lessons-learned.md.
- Very specific: line 50
If the user invokes /self-learning mid-session, stop:session-end has not captured the current conversation yet.
- Very specific: line 52
Run node .agents/scripts/self_learn.js suggest --since=30d to inspect past episodes, promotion candidates, and skill/agent boost …
- Very specific: line 93
No action needed. @memory-controller loads instincts.md first at step 0.1 of session start.
“Common” is measured: kept by at least 6 in 10 of the 9 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
Self-Learning — episodes → patterns → instincts
What this skill does
This skill runs the 3-tier promotion pipeline defined in Phase 2 F2.11–F2.15. It does not guess: every promotion rule is a mechanical check in .agents/scripts/self_learn.js.
Skill vs. background automation
The skill is the human control surface, not the engine. Two mechanisms do the automatic work:
| Mechanism | What it does automatically | Frequency |
stop:session-end hook → self_learn.js auto-capture | Appends one Tier-1 episode to .agents/state/episodes.ndjson and records assistant [INSTINCT: ...] cite events | every session end |
auto-capture digest refresh | Rebuilds state/self-learning-digest.md | at most once per day |
Promotion is never automatic. A pattern becomes a pattern only when you review it and call promote-pattern; an instinct requires explicit --approve. That is deliberate — the plan's anti-patterns forbid auto-promotion. Invoke this skill to review candidates and decide; do not invoke it to "run self-learning", because capture already happened in the background.
When to invoke
- After a
@retro, to decide which lessons are now general practice. - When the same approach has solved a problem repeatedly across agents.
- On demand: "what patterns have we learned?", "promote this to an instinct", "which instincts are stale?"
Do not invoke to record a single one-off lesson — that is a normal @memory-controller write to lessons-learned.md.
The 3 tiers
| Tier | Storage | Promotion rule | Lifetime | Volume |
| 1 — Episodes | .agents/state/episodes.ndjson | — | until next retro | high |
| 2 — Patterns | artifacts/memory/patterns-and-conventions.md | ≥3 occurrences, ≥2 agents, ≥7 day span — all required | until archived | 10–50 |
| 3 — Instincts | artifacts/memory/instincts.md | pattern stable ≥30 days and referenced by ≥2 ADRs, plus human --approve | permanent until demoted | 3–10 |
Instincts are loaded first in every session by @memory-controller under a ~200 token cap. They are the only tier applied automatically.
Procedure
0. Mid-session check (when the session has NOT ended yet)
If the user invokes /self-learning mid-session, stop:session-end has not captured the current conversation yet. Do both:
- Run
node .agents/scripts/self_learn.js suggest --since=30dto inspect past episodes, promotion candidates, and skill/agent boost suggestions. - Combine that output with what you have learned in the current session (corrections the user made, repeated edge cases, multi-step workarounds, or missing review perspectives) and present concrete suggestions right away:
- Offer to record a key takeaway now with
node .agents/scripts/self_learn.js episode ...so it is not lost before session end. - Recommend
/create-skillor/create-agentusing the Boost Decision Guide below whenever a takeaway outgrows a 1-line instinct. Never auto-create a skill or agent; present the proposed scope and let the user run the command.
- Offer to record a key takeaway now with
Boost Decision Guide (Instinct vs. /create-skill vs. /create-agent)
| What you learned | Best target | Why |
| Short 1-line rule that applies to every task | Instinct (instincts.md) | Always loaded at session start inside the 200-token cap. |
| Repeatable multi-step workflow, checklist, or script sequence | Custom Skill (/create-skill) | Loaded on demand when triggered; keeps the 200-token instinct budget clean. |
| Missing specialist perspective, guardrail, or domain ownership | Custom Agent (/create-agent) | Gives the swarm an independent persona and Socratic challenge stance. |
1. Scan episodes
node .agents/scripts/self_learn.js scan-episodes --since=30d
node .agents/scripts/self_learn.js find-patterns --min-occurrences=3 --min-agents=2 --min-span-days=7Review each candidate title. The clustering is lexical, so merge obvious synonyms by hand before promoting.
2. Promote a pattern
node .agents/scripts/self_learn.js promote-pattern \
--title="{stable pattern}" --occurrences=3 --agents=@developer,@qa-engineer --last-seen=YYYY-MM-DDThe script updates occurrences and last_seen when the pattern already exists — it never creates a duplicate. Every promotion is human-reviewed: you chose the candidate from step 1.
3. Promote an instinct (human-in-the-loop)
node .agents/scripts/self_learn.js promote-instinct --pattern="{pattern title}" --approveThe script refuses without --approve, and refuses when the pattern is younger than 30 days or has fewer than 2 ADR references. Never bypass those checks.
4. Auto-load
No action needed. @memory-controller loads instincts.md first at step 0.1 of session start. When you apply an instinct, emit [INSTINCT: INS-NNN] in your response so the citation-rate metric can count it.
5. Maintain
node .agents/scripts/self_learn.js scan # writes state/self-learning-digest.md
node .agents/scripts/self_learn.js scan-patterns --stale # last_seen > 90d AND occurrences < 3
node .agents/scripts/self_learn.js instinct-cost --since=7d
node .agents/scripts/self_learn.js demote-instinct --id=INS-001 --reason="..."Stale patterns are archive candidates, not automatic deletions. Demotion is explicit and records a reason under ## Demoted Instincts.
Outcome metrics (F2.15.a–c)
| Metric | Definition | Target |
| Instinct citation rate | sessions with a cite ÷ sessions with a load, per instinct, 14d window | >50%, report only with ≥10 standard-mode sessions — directional, not a gate |
| Pattern freshness | last_seen > 90d AND occurrences < 3 → stale | archive candidate |
| Token cost of instincts | instinct-cost --since=7d: total / avg / p95 / over_cap | cap 200 tokens; if over_cap_count > 0, @retro Step 1 produces demotion candidates |
Anti-patterns
- Promoting on age alone — a pattern must clear occurrences, agents and span.
- Auto-promoting an instinct —
--approveis a human gate, never implied by a skill step. - Deleting a demoted instinct or pattern — move it to the demoted section / archive.
- Over-fitting one session's vocabulary into a "house style".
- Treating the citation rate as a gate — it is directional (09 risk R39).
- Writing episodes directly into
instincts.md— that bypasses the whole pipeline.
Done when
scanproducedstate/self-learning-digest.md.- Any promoted pattern shows
occurrences,agents, andlast_seen. - Any instinct has a source pattern, ADR evidence, and a human approval record.
- Stale patterns and over-cap instincts have named owners (default: @retro Step 1).
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.

