agentleFS
vasilievyakovvasilievyakov/miracle-infrastructure/skills/learned-lessons/SKILL.md

learned-lessons

Skill17 starsChanged 9 months agoMITView on GitHub

Accumulates knowledge from solved problems. Activates automatically after web search or MCP tools are used to solve technical problems. Also activates during debugging to check the knowledge base first. Invoke explicitly via "/til" to record a lesson manually. Triggers: "/til", "record a lesson", "what lessons do we have".

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. About 0 are common, 12 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈12

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    After using MCP tools: if a technical problem was solved

    line 19
  2. Distinctive:

    During debugging: check the knowledge base first

    line 20
  3. Distinctive:

    After successfully using web search or MCP tools to solve a technical problem:

    line 25
  4. Distinctive:

    Ask the user briefly:

    line 27
  5. Very specific:

    If yes, add an entry to the knowledge base file (default: ~/.claude/knowledge-base.md):

    line 32
  6. Distinctive:

    Add entries at the TOP of the file (newest lessons first)

    line 45
  7. Distinctive:

    When systematic-debugging activates or during explicit debugging:

    line 49
  8. Distinctive:

    Search for similar problems by keywords and tags

    line 52
  9. Distinctive:

    If relevant match found, show the user

    line 53
  10. Distinctive:

    If nothing found, continue normal debugging

    line 54
  11. Distinctive:

    Do NOT record trivial things (typos, forgotten imports)

    line 77
  12. Distinctive:

    Read this file during debugging to check for known solutions.

    line 101
  13. Distinctive:

    Create it on first use if it does not exist.

    line 102

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “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

Learned Lessons: Knowledge Base

Purpose

This skill accumulates knowledge from solved problems so you never search for the same thing twice.

When it activates

  1. After web search for problem solving: offer to record the lesson
  2. After using MCP tools: if a technical problem was solved
  3. During debugging: check the knowledge base first
  4. Explicit invocation: user says "/til" or "record a lesson"

Workflow after search/MCP

After successfully using web search or MCP tools to solve a technical problem:

  1. Ask the user briefly:
    Record this lesson to the knowledge base? (yes/no)
  2. If yes, add an entry to the knowledge base file (default: ~/.claude/knowledge-base.md):
    ## [YYYY-MM-DD] Brief title
    
    **Problem**: What was not working
    
    **Symptoms**: How it manifested (errors, behavior)
    
    **Solution**: What helped
    
    **Tags**: #python #asyncio #networking
  3. Add entries at the TOP of the file (newest lessons first)

Workflow during debugging

When systematic-debugging activates or during explicit debugging:

  1. Read ~/.claude/knowledge-base.md first
  2. Search for similar problems by keywords and tags
  3. If relevant match found, show the user
  4. If nothing found, continue normal debugging

Entry Format

Each entry contains:

FieldDescription
DateWhen it was learned
TitleGist in 5-7 words
ProblemWhat you were trying to do
SymptomsErrors, traceback, behavior
SolutionSpecific steps or code
TagsFor search (#python, #docker, #api)

Commands

  • /til: record a lesson manually (asks for details)
  • /lessons: show last 5 lessons
  • /search-lessons <query>: search the knowledge base

Important

  • Do NOT record trivial things (typos, forgotten imports)
  • Record what was NON-OBVIOUS and required research
  • Record SPECIFIC solutions, not general advice
  • Tags help search. Use technologies and concepts

Example

User: why does requests hang in asyncio?

Claude: [uses web search]
Claude: Found it! requests blocks the event loop. Use
        aiohttp or run_in_executor instead.

        Record this lesson to the knowledge base? (yes/no)

User: yes

Claude: Recorded with tags #python #asyncio #requests

Knowledge Base

The file ~/.claude/knowledge-base.md contains all accumulated lessons. Read this file during debugging to check for known solutions. Create it on first use if it does not exist.

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.