agentleFS
puedingpueding/houserules/skills/learn/SKILL.md

learn

Skill1 starsChanged 3 months agoMITView on GitHub

Author CLAUDE.md rules from what actually happened in your sessions. Reads recent Claude Code session history, finds the patterns you had to repeat, and proposes instructions that encode them — new rules where there were none, sharper wording where a rule exists but is not working. Use when the user runs /houserules:learn, or asks to learn from past sessions, find repeated corrections, detect patterns in how they work, or suggest CLAUDE.md instructions based on session history. Where houserules:migrate fits the file to the model, this fits it to the user.

194 other projects use a version of this.

Adopted by

Most recently taken up by

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.
  • TomGranotSkill

    add-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

  • TomGranotSkill

    add-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

  • seek888Skill

    open-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-811Skill

    ios-sync

    Regenerate the iOS debug bridge against the latest upstream gstack templates. (gstack)

    Also in 6 projects that use this

  • MicrosoftSkill

    add-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

  • MicrosoftSkill

    add-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 versions194 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 194

    1. garrytan/gstack★ 142ksame name
    2. rohitg00/ai-engineering-from-scratch★ 79ksame name
    3. gavrielc/nanoclaw★ 31ksame name
    4. nanocoai/nanoclaw★ 31ksame name
    5. qwibitai/nanoclaw★ 31ksame name
    6. tigerless-labs/autoharness★ 11ksame name
    7. tw93/claude-health★ 7.6ksame name
    8. tw93/Waza★ 7.6ksame name
    9. nykooi1/vibe-wise★ 3.5ksame name
    10. HughYau/AcademicForge★ 2.6ksame name

    184 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 repository3 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

10 rules. 0 are common, 6 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 167 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every re-steer — "no, use pnpm", "I said don't add comments", "again?" — is a rule the file should already have carried.

    line 14
  2. Very specific:

    Never read ~/.claude/projects/ directly — it is routinely gigabytes, and the overwhelming majority of records are tool results, not human …

    line 48
  3. Very specific:

    If ${CLAUDE_PLUGIN_ROOT} is unset — running the skill from a clone rather than a plugin install — use the path to this repo's scripts/ …

    line 55
  4. Very specific:

    If the window is empty, say so and offer a wider --days.

    line 72
  5. Very specific:

    Every record also carries a day field.

    line 115
  6. Distinctive:

    Read the relevant CLAUDE.md before proposing anything.

    line 133
  7. Distinctive:

    Do not report it as a win that a rule exists.

    line 147
  8. Distinctive:

    Only the numbers named.

    line 214
  9. Distinctive:

    Place each rule in the section where it belongs.

    line 217
  10. Distinctive:

    Do not read raw transcripts into context: Use the script.

    line 237

“Common” is measured: kept by at least 6 in 10 of the 167 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

houserules:learn

Author rules from evidence. Most CLAUDE.md content is written from imagination — the user guessing, in advance, how they will want to work. This skill writes it from the record instead: what they actually asked for, how often, and what they had to say twice.

Every re-steer — "no, use pnpm", "I said don't add comments", "again?" — is a rule the file should already have carried. The correction cost a round trip; the same correction next week costs another.

Two kinds of output, both grounded in the same evidence:

  • A rule that does not exist yet — the pattern is real and nothing covers it.
  • A rule that exists and is not working — it is in the file, read every session, and they still had to correct you. That one is worth more.

Where houserules:migrate fits the file to the model, this fits it to the user.

Same output contract as houserules:migrate: a briefing, then a numbered table the user picks from. Nothing is written that they did not name by number.

The tension with houserules:migrate — read this first

migrate re-fits the file to the model. This one re-fits it to the user. Both can add and both can rewrite, so run carelessly they undo each other and CLAUDE.md oscillates.

If the user wants both, use houserules:fit instead of running the two. It reconciles their conflicts and writes in a single pass; running them separately leaves the reconciliation to the user and lets the second pass invalidate the line numbers the first one cited.

The resolution: this skill is conservative by default. A pattern earns a rule only when the evidence is strong. Every proposed rule costs tokens on every future session, forever. A rule that fires once is worse than no rule.


Phase 1 — Extract

Never read ~/.claude/projects/ directly — it is routinely gigabytes, and the overwhelming majority of records are tool results, not human input.

python3 "${CLAUDE_PLUGIN_ROOT}/scripts/mine-sessions.py" --days 14

If ${CLAUDE_PLUGIN_ROOT} is unset — running the skill from a clone rather than a plugin install — use the path to this repo's scripts/ directory instead. The scripts are standalone and dependency-free.

Flags: --days N (window), --project SUBSTR (one project only, matches on cwd so worktrees are included), --all (every typed prompt, not just corrections), --json.

The script keeps only promptSource == "typed" — actual human keystrokes. On a typical machine that is a few hundred records out of tens of thousands.

It classifies a prompt as a correction when a strong cue ("no,", "don't", "I said", "instead", "you forgot", "why did you") appears in the first 150 characters, or the whole prompt is under 300 characters. Position and length are what separate no, use pnpm from a long spec that happens to contain the word "stop" somewhere in the middle. Expect roughly 5-10% of typed prompts to qualify.

If the window is empty, say so and offer a wider --days. Do not pad the report.


Phase 2 — Cluster into candidate rules

Group corrections by what the user was actually asking for. Ignore the surface topic; cluster on the behavior being corrected.

ClusterLooks like
Tooling preference"use pnpm", "not npm", "we use uv here"
Output shape"too long", "tldr", "just the answer", "stop explaining"
Scope"I only asked for X", "don't touch Y", "revert that part"
Process"you forgot to run tests", "commit first", "ask before pushing"
Comprehension"I don't understand", "explain simply", "what does that mean"
Repetitionthe same instruction given in two or more separate sessions

The strongest signal is the same correction in different sessions. Once is a one-off. Twice across sessions is a rule the file should be carrying.


Phase 3 — The evidence gate

A pattern must clear this bar to reach the table. State the evidence for each.

Propose a rule only when both hold:

  1. It occurred 2+ times, and
  2. across 2+ distinct sessions or 2+ distinct days.

Either qualifies, and the or is load-bearing. A session id survives resumes — one id routinely spans a week — so counting sessions alone collapses independent occasions into one and silently drops real patterns below the gate. Counting days alone has the opposite failure: two unrelated sessions on the same afternoon read as one. Take whichever count is higher.

The extractor reports both, so this is checkable rather than estimated:

correction-shaped: 22 (6%)   across 12 sessions / 11 days

Every record also carries a day field. Show the count you used in the evidence line — 3x / 2 sessions or 3x / 2 days, whichever cleared the gate — so the user can see which reading justified the row.

Never propose from:

  • A single occurrence, however annoying it reads.
  • Project-specific facts that belong in that project's CLAUDE.md, not the global one — route those to the project file and say so.
  • Anything about the content of their work (product decisions, domain choices). You are mining how they want you to behave, not what they are building.

Borderline evidence goes in the table marked WEAK with the count shown, so the user can overrule. Do not silently drop it and do not silently promote it.


Phase 4 — Check against the CLAUDE.md that already exists

Read the relevant CLAUDE.md before proposing anything. Three outcomes:

SituationVerdict
No rule covers itADD
A rule covers it, and no corrections sincenothing to do — do not report
A rule covers it and they still had to correct youREWRITE

That third row is the most valuable finding this skill produces, and it is invisible to anyone reading the file alone. The rule exists, it is being read every session, and it is not working. Usually it is buried, too abstract, or contradicted elsewhere in the file. Quote the existing rule, quote the correction that happened anyway, and propose sharper wording.

Do not report it as a win that a rule exists. Report that it failed.


Phase 5 — Briefing, then the pickable table

Tier 0 — the briefing

## What your sessions show
Window: last <N> days · <S> sessions · <P> typed prompts · <C> corrections (<pct>%)

Where the friction is
  <project>  <n> corrections  — <one-line characterization>

What you repeated most
  • "<theme>" — <n>x across <m> sessions

Tier 1 — the table

| # | Pattern | Evidence | Verdict | Proposed rule (short) |
| - | ------- | -------- | ------- | --------------------- |
| 1 | asked for shorter output | 4x / 3 days     | REWRITE | existing terse rule is buried |
| 2 | "explain simply" | 3x / 2 days     | REWRITE | on-ramp rule exists, not firing |
| 3 | pnpm over npm         | 2x / 2 sessions | ADD     | pin the package manager |
| 4 | ask before force-push | 1x / 1 session  | WEAK    | below the gate — your call |

Order by evidence strength. WEAK rows last.

Tier 2 — full text per row

### 1 · asked for shorter output — REWRITE
Evidence: 4 corrections across 3 days (1 session id — resumed)
  [2026-07-26 learn-ai-visually] "I don't understand what you said. tldr"
  [<date> <project>] "<verbatim>"

EXISTING RULE (<file>:<line>)
  <verbatim — the rule that did not work>

PROPOSED
  <verbatim replacement>

WHY IT FAILED
  <one line: buried / too abstract / contradicted at L<n>>

Quote corrections verbatim. The user recognizes their own words and can judge the inference instantly; a paraphrase hides whether you understood it.

The prompt

Reply with the numbers you want:
  apply 1,3     test 1,3     apply all     apply none

test N hands those rows to houserules:test, which A/B's each rule against a real probe in separate headless runs before anything is written.


Phase 6 — Apply

Only the numbers named.

  1. Back up first. cp "<target>" "<target>.bak-$(date +%Y-%m-%d-%H%M%S)"
  2. Place each rule in the section where it belongs. A rule filed in the wrong section is a rule that will not be found — which is how row-3-type failures start.
  3. Global behavior goes in ~/.claude/CLAUDE.md. Project-specific facts go in that project's file. Never write a project fact to the global file.
  4. Show the diff and the backup path. Name any rows the user skipped.

Anti-goals

  • Do not decide for the user. Produce the table; they pick the numbers.
  • Do not propose a rule from one occurrence. The gate exists because every rule is a permanent tax on every future session.
  • Do not mine the content of their work. Product decisions, architecture choices, and domain arguments are not behavioral rules. You are looking for how they want you to work, not what they want built.
  • Do not paraphrase corrections. Quote them.
  • Do not grow CLAUDE.md just because you ran. Zero proposed rules is a legitimate and common result. Say so plainly and stop.
  • Do not read raw transcripts into context. Use the script.
  • Do not write without a backup. Ever.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.