agentleFS
berekvolgyipeterberekvolgyipeter/dotclaude/skills/learn/SKILL.md

learn

Skill2 starsChanged 18 days agoMITView on GitHub

Analyze conversation and update CLAUDE.md, rule files, and/or any skills, commands, or agents that were used — based on user feedback vs agent behavior. Use this skill at the end of any conversation where corrections, misunderstandings, or new patterns emerged, especially when a skill, command, or agent underperformed or needed repeated guidance. Also use when the user says things like "save what we learned", "remember this for next time", "update the rules", "let's wrap up and capture this", or any variation of wanting to persist lessons from the current session.

195 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

The file

Show its rules and text

We split this skill into the rules it gives an agent

18 rules. 0 are common, 18 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 170 edited versions we read keep these.

  • 18

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before diving into analysis, check if there's anything to learn.

    line 8
  2. Distinctive:

    Show examples: Use ✅ GOOD / ❌ BAD format when helpful

    line 74
  3. Distinctive:

    Keep examples minimal: Prefer simple 2-5 line snippets over verbose realistic ones

    line 75
  4. Distinctive:

    Prioritize by impact: If you identify more than 3-4 learnings, present the highest-impact items first: rules that prevent repeated mistakes …

    line 76
  5. Distinctive:

    Before presenting the analysis:

    line 124
  6. Distinctive:

    Read all candidate target files to check for duplicates and understand current content

    line 125
  7. Distinctive:

    Verify the section exists or note where to add it

    line 126
  8. Distinctive:

    Ensure new content doesn't conflict with existing rules or instructions

    line 127
  9. Distinctive:

    After presenting the analysis:

    line 129
  10. Distinctive:

    Ask user to confirm the updates

    line 130
  11. Distinctive:

    Ensure formatting is consistent with existing content

    line 132
  12. Distinctive:

    Place new rules in the most logical section

    line 133
  13. Distinctive:

    Update: Add specific import convention with correct example

    line 156
  14. Distinctive:

    Update: Document the project-specific error handling pattern

    line 161
  15. Distinctive:

    Update: Add an explicit output format section so every invocation is consistent

    line 166
  16. Distinctive:

    Update: Add a "finalize" section at the end with the required lint/test commands

    line 171
  17. Distinctive:

    Update: Add a scope constraint — only update docs for files explicitly passed as changed

    line 176
  18. Distinctive:

    Update: Tighten the description to exclude the false-trigger context

    line 181

“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.

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

Triage first

Before diving into analysis, check if there's anything to learn. Most conversations have zero learnings; a few have one or two. Fabricating learnings from uneventful interactions creates noise that drowns out real insights — say so and stop if the conversation was routine.

A single offhand correction in an otherwise smooth conversation may not warrant a rule. Focus on patterns that would recur across future sessions.

Analysis Process

Learnings live at two levels:

  • User-level (~/.claude/) — shared across all projects (rules, context rules, skills, commands, agents, hooks, output styles, templates)
  • Project-level (.claude/) — specific to the current project (CLAUDE.md, rules, skills, commands, agents)

Step 1: Scan for Learnings

Examine the conversation for learning signals and identify rule gaps in a single pass:

  • User corrections: "Actually, you should...", "No, the correct way is...", "Don't do X, do Y instead" — includes cases where the user had to repeat themselves or rephrase
  • Agent mistakes: Repeated errors, wrong assumptions, misunderstandings, or violations of existing rules (needs new rule or emphasis/clarification of existing one)
  • Emergent patterns: Something worked well that should be documented, or a workflow crystallized that future sessions would benefit from. Positive learnings go to the same target files as fixes — add them as recommended patterns rather than corrective rules.
  • Tool invocations: Instances of Skill tool calls (skills/commands) and Agent tool calls (agents) — these feed into Step 2

Step 2: Evaluate Used Skills, Commands, and Agents

Scan the conversation for any invocations of custom tools:

Skills — Skill tool calls where the skill parameter matches a name in ~/.claude/skills/ or .claude/skills/

Commands — slash command invocations like /fix-review, /to-plan, etc., which expand via the Skill tool

Agents — Agent tool calls where subagent_type matches a name in ~/.claude/agents/ or .claude/agents/

Also consider skills that the user expected to use but didn't trigger — a missing trigger is itself a learning (update the description to cover the missed context).

For each one found (or expected but missing), read its current definition file, then ask:

  • Did the instructions lead to clear, correct behavior?
  • Did the agent improvise steps that should be documented?
  • Were there steps that were unnecessary or slowed things down?
  • Did the user correct the output in a way that reveals a missing instruction?
  • Did the description cause it to trigger at the wrong time (or fail to trigger)?

Step 3: Determine Target File(s)

Decide whether a learning is universal (applies to all projects → user-level ~/.claude/) or project-specific (→ project-level .claude/).

Rule files (user-level ~/.claude/): @~/.claude/shared/rules-index.md

Rule files (project-level .claude/):

  • Project specific details → .claude/CLAUDE.md
  • Project-specific rules → .claude/rules/<topic>.md

Automation definition files (at either level):

  • Skill → skills/<name>/SKILL.md
  • Command → commands/<name>.md
  • Agent → agents/<name>.md
  • Output style → output-styles/<name>.md — only when an output style was active and the learning is about its communication contract (verbosity, tone, default response/comment format). Generic communication preferences with no active style belong in a rule file instead.

This includes the learn skill itself — if the learning process was suboptimal, update its SKILL.md.

New user-level files: each entry under ~/.claude/<dir>/ is a symlink into the dotclaude repo, so edits to existing files through ~/.claude/ land in the repo, but a newly created top-level file would not. Create new user-level files at the repo path instead — the repo root is two levels above readlink -f ~/.claude/skills/learn — then run make install in the repo.

Step 4: Formulate Updates

For substantial rewrites of skill, command, or agent instructions, invoke the prompt-engineering skill to ensure the new content follows best practices for AI prompt design. For simple additions like a single rule line in CLAUDE.md, just match the existing style — the overhead of invoking another skill isn't worth it for small changes.

For each learning, create a clear, actionable update:

  • Match content to scope: General rules (~/.claude/) must use universally applicable text and examples — never use actual class, function, variable, or file names from the current project. Fabricate minimal generic names (e.g. is_valid, has_items, MyClass). Project-specific learnings (.claude/) may use domain terms and reference actual code patterns. When a learning is general, extract the universal principle and craft a fully generic example. Self-check before writing: re-read every proposed example and verify no name from the current project leaked in.
  • Be concise: One clear point per rule
  • Be actionable: The next agent running this skill/command/agent should know exactly what to do differently
  • Show examples: Use ✅ GOOD / ❌ BAD format when helpful
  • Keep examples minimal: Prefer simple 2-5 line snippets over verbose realistic ones
  • Prioritize by impact: If you identify more than 3-4 learnings, present the highest-impact items first: rules that prevent repeated mistakes > rules that save significant time > nice-to-have documentation. Ask the user if they want the rest.

Update Format

For 1-2 learnings, keep it brief — state what happened, what to change, and where.

For 3+ learnings, use this structured template:

## Conversation Analysis

### Rule Updates

1. [Learning title]
   - Context: [What happened in the conversation]
   - Issue: [What went wrong or what pattern emerged]
   - File: [Target rule file]

### Skill / Command / Agent Updates

1. [skill-name | /command-name | agent-name] — [What to improve]
   - Context: [What happened when it ran]
   - Issue: [What was missing, wrong, or redundant in the instructions]
   - File: [`~/.claude/` or `.claude/` path to the definition file]

Example (filled in):

## Conversation Analysis

### Rule Updates

1. Test commands must run from project root
   - Context: Agent ran `pytest` from a subdirectory, tests failed with import errors, user corrected twice
   - Issue: No rule about working directory for test commands
   - File: `.claude/CLAUDE.md`

### Skill / Command / Agent Updates

1. /pr-review — Add diff-size gate
   - Context: User ran /pr-review on a 2000-line PR; the command tried to review every file and hit context limits
   - Issue: No guidance on handling large diffs — should summarize by file first, then deep-dive on request
   - File: `~/.claude/commands/review/pr-review.md`

Implementation

Before presenting the analysis:

  1. Read all candidate target files to check for duplicates and understand current content
  2. Verify the section exists or note where to add it
  3. Ensure new content doesn't conflict with existing rules or instructions

After presenting the analysis:

  1. Ask user to confirm the updates
  2. Apply changes to the appropriate file(s)
  3. Ensure formatting is consistent with existing content
  4. Place new rules in the most logical section
  5. Verify the whole document stays consistent after the edit — re-read the surrounding rules and confirm the change introduced no contradiction, no duplicated guidance, and no diverging terminology. A refinement that conflicts with a neighbouring rule, or repeats it in different words, is worse than no edit. If the new wording supersedes an existing rule, update or remove that rule too so the document speaks with one voice.

Handling Existing Content

Default to refining existing rules, not adding new ones. Adding a fresh section or bullet on every invocation bloats rule files until they overflow context and degrade performance. Before writing anything new, genuinely analyze the target document: most learnings belong inside an existing rule — as a sharpened wording, an added example, or a broadened scope — not as a standalone addition. Only add a new rule when the learning is truly distinct from everything already there. Adding a new section is the exception, refinement is the norm.

Rule files accumulate institutional knowledge that's hard to reconstruct, so treat existing content carefully:

  • Find the closest existing rule first — read the whole section the learning relates to and ask "does an existing rule or section already cover this?" Merge into or generalize the closest match rather than appending a near-sibling beside it; this is what keeps you from creating a near-duplicate.
  • Exact duplicate → Skip
  • Similar but incomplete → Enhance with more detail
  • Conflicting → Flag for user review. If a new learning directly supersedes an old rule, propose replacing the old one rather than adding alongside it — stale rules create confusion.
  • Complementary → Add as a new distinct rule
  • Outdated → If you notice a rule that's clearly no longer relevant while reading the file, mention it to the user as a cleanup candidate
  • File size → If a rule file exceeds ~100 lines, suggest the user consolidate related rules or prune outdated ones
  • Be objective: Focus on patterns observed in the conversation. User preferences expressed through corrections are valid learnings — capture them as preferences, not as universal rules

Example Scenarios

Scenario 1: Agent repeatedly used wrong import pattern

  • Learning: Agent imported from wrong module despite correction
  • Target: The relevant language-specific context rule (e.g., ~/.claude/context-rules/<language>-code.md)
  • Update: Add specific import convention with correct example

Scenario 2: Agent missed project-specific pattern

  • Learning: Project uses specific error handling pattern agent didn't follow
  • Target: .claude/CLAUDE.md
  • Update: Document the project-specific error handling pattern

Scenario 3: Skill produced incomplete output

  • Learning: A skill's instructions didn't specify output format, causing the agent to improvise each time
  • Target: The relevant SKILL.md (at ~/.claude/skills/ or .claude/skills/)
  • Update: Add an explicit output format section so every invocation is consistent

Scenario 4: Command missing a finalization step

  • Learning: A command didn't remind the agent to run linting after the last fix, and the user had to ask
  • Target: The relevant command file (at ~/.claude/commands/ or .claude/commands/)
  • Update: Add a "finalize" section at the end with the required lint/test commands

Scenario 5: Agent over-scoped its work

  • Learning: An agent updated docs the user didn't want touched
  • Target: The relevant agent definition file
  • Update: Add a scope constraint — only update docs for files explicitly passed as changed

Scenario 6: Skill triggered in wrong context

  • Learning: A skill's description matched too broadly and triggered when another tool was more appropriate
  • Target: The relevant SKILL.md description field
  • Update: Tighten the description to exclude the false-trigger context

Success Criteria

A good update should:

  • ✅ Prevent the same mistake from happening again
  • ✅ Be clear enough that any agent can follow it without extra context
  • ✅ Include concrete examples when applicable
  • ✅ Fit naturally into the existing file structure
  • ✅ Not conflict with existing rules
  • ✅ (For skill/command/agent updates) Improve how future invocations are guided

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.