kb-enrich

Generates cross-links, backlinks, citations, and indexes for knowledge base lessons.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Knowledge base lessons stored as individual Markdown files become disconnected and hard to navigate over time, with stale indexes and missing cross-references that make related fixes difficult to discover. ## Core Features & Use Cases - Cross-Link Enrichment: Scans all lesson files, matches them by shared tags or category, and appends forward links to each lesson's Related section without duplicating existing links. - Backlink Generation: Builds a reverse index from forward links and maintains a Cited by section in each lesson, removing stale entries idempotently. - Citation and Index Maintenance: Adds documentation links from a local lookup table (no network requests), regenerates index.md grouped by category, and appends entries to log.md with automatic rotation at 500 lines. - Use Case: After capturing a new lesson about a LiteLLM authentication error, run this skill to link it to related lessons, add the LiteLLM docs citation, and rebuild the index so the fix is discoverable. ## Quick Start Run /kb-enrich to cross-link all lessons in the knowledge base and regenerate the index and log files.

Frequently Asked Questions about kb-enrich

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

FAQPage Schema
How do I add cross-links between Markdown knowledge base entries?▼

Run the enrichment procedure, which parses each lesson's YAML frontmatter, finds other lessons sharing tags or category, and appends missing links to the Related section. It never duplicates links or links a lesson to itself.

How to generate backlinks for a file-based knowledge base?▼

Backlinks are derived automatically from forward links in Related sections. The skill builds a reverse index and writes a Cited by section listing each inbound lesson, omitting the section entirely when no inbound links exist.

Does kb-enrich require network access to add citations?▼

No, citations are resolved from a local lookup table mapping tags like litellm, git, and python to known documentation URLs. No network requests are made, and tags without a known doc root are skipped silently.

Is running kb-enrich multiple times safe?▼

Yes, enrichment is idempotent. Running it twice produces the same result because it checks existing Related and Citations entries before appending and removes stale backlinks that no longer have corresponding forward links.

What happens when the knowledge base log file gets too large?▼

When log.md exceeds 500 lines, it is rotated: the current file is renamed to log-YYYY-MM.md based on its oldest month, a fresh log.md is created, and a backlink to the archived file is added at the top.