agentleFS
roronoazoroshao369roronoazoroshao369/vibe-coding-os/skills/core/lessons-learned-db/SKILL.md

lessons-learned-db

Skill1 starsChanged 5 months agoMITView on GitHub

Maintain a structured, searchable record of coding mistakes, root causes, fixes, and prevention rules for future similar work.

The file

Show its rules and text

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈13

    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:

    Create and use a structured record of coding mistakes and fixes so agents can learn from local project history.

    line 20
  2. Distinctive:

    After a bug fix, once the root cause and fix are known.

    line 26
  3. Distinctive:

    After a quality diff audit finding that reveals a repeatable mistake pattern.

    line 27
  4. Distinctive:

    After a review finding, especially when the same issue could recur in future coding tasks.

    line 28
  5. Distinctive:

    Before starting a similar task where past mistakes may provide prevention rules.

    line 29
  6. Distinctive:

    Ask whether the resolved issue represents a reusable mistake pattern.

    line 42
  7. Distinctive:

    If yes, collect the error, root cause, fix, and prevention rule.

    line 43
  8. Distinctive:

    If no, record why no durable lesson is needed.

    line 44
  9. Very specific:

    Use templates/lesson-entry-template.md for a consistent entry shape.

    line 47
  10. Distinctive:

    Keep entries concise, searchable, and free of secrets or sensitive raw logs.

    line 49
  11. Distinctive:

    Prefer recent and high-severity lessons first, but include older lessons when the pattern still applies.

    line 53
  12. Distinctive:

    Add only relevant rules; do not overload the prompt with unrelated history.

    line 58
  13. Distinctive:

    After implementation, verify whether the injected prevention rules were satisfied.

    line 59
  14. Distinctive:

    Search results for prior lessons relevant to the current task.

    line 64

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

Lessons Learned DB

Purpose

Create and use a structured record of coding mistakes and fixes so agents can learn from local project history. The lessons log captures what went wrong, why it happened, how it was fixed, and the prevention rule to inject before similar future tasks.

When to use

Use this skill:

  • After a bug fix, once the root cause and fix are known.
  • After a quality diff audit finding that reveals a repeatable mistake pattern.
  • After a review finding, especially when the same issue could recur in future coding tasks.
  • Before starting a similar task where past mistakes may provide prevention rules.

Inputs

  • Error description: what failed, where it appeared, and how it was detected.
  • Root cause: the specific mistaken assumption, missing check, workflow gap, or implementation defect.
  • Fix: the concrete change that resolved the issue.
  • Prevention: the rule, checklist item, test pattern, or prompt instruction that would have prevented recurrence.
  • Optional metadata: date, severity, model/agent, area, related files, validation command, and source review/audit link.

Workflow

  1. After the fix, prompt for a lesson
    • Ask whether the resolved issue represents a reusable mistake pattern.
    • If yes, collect the error, root cause, fix, and prevention rule.
    • If no, record why no durable lesson is needed.
  2. Add an entry to the lessons log
    • Use templates/lesson-entry-template.md for a consistent entry shape.
    • Store entries in the project lessons log location chosen by the repository, such as docs/lessons-learned/, .vibe/lessons-learned/, or another agreed local path.
    • Keep entries concise, searchable, and free of secrets or sensitive raw logs.
  3. Before similar tasks, search the log
    • Query by area, file type, error keyword, framework, subsystem, and severity.
    • Prefer recent and high-severity lessons first, but include older lessons when the pattern still applies.
    • Cite the lesson source when injecting guidance into a plan or implementation brief.
  4. Inject prevention rules
    • Convert matching lessons into explicit pre-coding checks, test requirements, or review checklist items.
    • Add only relevant rules; do not overload the prompt with unrelated history.
    • After implementation, verify whether the injected prevention rules were satisfied.

Outputs

  • New or updated lessons log entry using the standard template.
  • Search results for prior lessons relevant to the current task.
  • Injected prevention rules added to the implementation plan, brief, review checklist, or final verification notes.
  • A short statement when no relevant lessons were found.

Failure modes

  • Recording vague lessons that do not identify a concrete prevention rule.
  • Storing secrets, raw private logs, tokens, credentials, or unnecessary personal data.
  • Treating every small fix as a durable lesson and creating noisy history.
  • Failing to search lessons before repeating work in the same area.
  • Injecting stale or irrelevant prevention rules that distract from the current task.
  • Recording the symptom but not the root cause.
  • Skipping verification that the prevention rule was applied.

Verification checklist

  • Lesson entry includes error description, root cause, fix, and prevention rule.
  • Entry metadata includes date, severity, model/agent, and area when known.
  • Entry contains no secrets, credentials, private keys, or sensitive raw logs.
  • Similar-task search was performed before implementing related work.
  • Relevant prevention rules were injected into the active workflow.
  • Final verification confirms the prevention rule was satisfied or explains why it did not apply.

Related skills/commands

  • commands/vibe-lessons-learned.md — command entry point for search, add, and recent review
  • templates/lesson-entry-template.md — standard entry shape
  • skills/core/disciplined-diagnosis/SKILL.md — structured root-cause analysis before logging a lesson
  • skills/memory/project-memory/SKILL.md — redaction review before persisting lessons
  • skills/core/self-review-before-response/SKILL.md — ensure the lesson is complete and not noisy
  • skills/core/verification-before-done/SKILL.md — verify the prevention rule was applied

Ghi chú tiếng Việt

Duy trì cơ sở dữ liệu có cấu trúc về lỗi lập trình, nguyên nhân gốc rễ, cách sửa và quy tắc phòng ngừa. Sau mỗi lần sửa lỗi hoặc phát hiện review lặp lại, hãy ghi lại bài học. Trước task tương tự, tra cứu lessons để trích xuất các prevention rules. Luôn giữ bài học không chứa bí mật, token, hoặc dữ liệu nhạy cảm.

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.