kb-capture

Creates a new error lesson file and registers it in the knowledge base index.

Updated Jun 22, 2026
One-click install
npx skills add https://github.com/ozand/knowledge-base-template --skill kb-capture-ozand
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: kb-capture
Source: https://github.com/ozand/knowledge-base-template/tree/main/_template/skills/kb-capture
Command: npx skills add https://github.com/ozand/knowledge-base-template --skill kb-capture-ozand

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? After fixing a recurring or non-obvious error, the fix is often forgotten and the same debugging happens again. This Skill records the resolution as a structured, searchable lesson in the Pi error knowledge base so it is never solved twice. ## Core Features & Use Cases - Structured Lesson Creation: Generates a lessons/KB-XXXX-<slug>.md file from the SCHEMA.yaml template with required frontmatter fields including mandatory error_signatures for future matching. - Index Registration: Appends the new lesson to index.yaml, increments the lesson count, and updates the updated date to keep the searchable index in sync. - Post-Capture Automation: Triggers kb-enrich for cross-links and backlinks, regenerates the viz.html graph, commits the change to git, and attempts a best-effort push to the remote. - Use Case: After resolving a tricky extension load timeout, invoke the skill to capture the symptom, root cause, and resolution as KB-0003, then have it indexed, linked, committed, and pushed automatically. ## Quick Start Ask the agent to run kb-capture to record the error you just fixed as a new lesson in the knowledge base.

Frequently Asked Questions about kb-capture

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

FAQPage Schema
How do I record a new error lesson in the Pi knowledge base?▼

Invoke the kb-capture skill after resolving an error. It determines the next KB id from index.yaml, creates a lesson file from the SCHEMA.yaml template with mandatory error_signatures, registers it in the index, and commits the change to git.

What fields are required when creating a knowledge base lesson?▼

Required frontmatter fields include id, type, title, category, tags, severity, status, created/updated dates, and error_signatures. The error_signatures field is mandatory and must contain 2-6 substrings from the real error text so future lookups can match.

When should I capture a lesson versus skip it?▼

Capture a lesson only after fixing an error that is not already covered by an existing KB lesson and is likely to recur. Do not capture one-off errors or duplicates of existing lessons, since that would add noise to the index.

What happens if the git push fails after capturing a lesson?▼

The lesson is always saved locally first, so push failures never lose data. The skill reports the number of pending commits and suggests running /kb-sync to push them later.

Does kb-capture update the knowledge base visualization automatically?▼

Yes, it runs the kb-generate-viz script to rebuild viz.html after capture. If the script is not installed, it skips this step and notes that you should run /kb-visualize or bootstrap to install it.