collect-lesson

Extract structured knowledge entries from conversations and save them as dated markdown files with YAML frontmatter.

1|Updated Feb 15, 2026
One-click install
npx skills add https://github.com/n0rvyn/indie-toolkit --skill collect-lesson
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: collect-lesson
Source: https://github.com/n0rvyn/indie-toolkit/tree/main/dev-workflow/skills/collect-lesson
Command: npx skills add https://github.com/n0rvyn/indie-toolkit --skill collect-lesson

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill captures settled learnings from a conversation or debugging session and turns them into discoverable, versioned knowledge entries so insights are not lost or scattered across chat history.

Core Features & Use Cases

  • Structured extraction: Derives a title, category, keywords, and markdown body from the session content.
  • Duplicate detection and validation: Searches existing knowledge for near-duplicates and rejects drafts with unresolved gaps.
  • Persistent saving and ripple updates: Writes dated markdown files with YAML frontmatter and optionally adds mutual related: cross-references to matching entries.
  • Use case: After resolving a bug, run the skill to produce a postmortem-style lesson entry and link it to related notes in the central knowledge base.

Quick Start

Extract a lesson from this session about the bug we fixed, propose a title, category, and 3-6 keywords, and save the confirmed entry to the knowledge base.

Frequently Asked Questions about collect-lesson

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I save session lessons to a knowledge base from a debugging conversation?

To save session lessons, extract a structured entry with a title, category, keywords, and markdown body, then write it as a dated file with YAML frontmatter to a filesystem-backed knowledge base. The skill requires explicit user confirmation before saving.

How does near-duplicate detection work for postmortem knowledge entries?

Near-duplicate detection for knowledge entries works by using Grep to search existing markdown files in the knowledge base directory for similar content. It rejects drafts with unresolved gaps and validates entries before writing to prevent redundant postmortems.

What's the best way to capture architecture discoveries and bug fixes as structured knowledge?

The best way to capture architecture discoveries is to derive a structured markdown entry with 3-6 keywords and a category from the session, then save it with YAML frontmatter. This ensures insights are versioned and discoverable instead of lost in chat history.

Can I cross-reference related knowledge base entries when saving a new lesson?

Yes, you can cross-reference related entries when saving a lesson. The skill optionally adds mutual related: cross-references to matching entries in the knowledge base, linking the new postmortem or bug fix note to existing relevant records.

What format do captured lessons use when saved to the filesystem?

Captured lessons are saved as dated markdown files with YAML frontmatter. The frontmatter includes the derived title, category, and 3-6 keywords, while the body contains the markdown content extracted from the conversation or debugging session.

When should I not use automated lesson extraction for postmortems?

You should not use automated lesson extraction when the session lacks a clear resolution or when the derived draft has unresolved gaps. The skill rejects drafts that do not meet its validation criteria for title, category, keywords, and body content.