From knowledge-base
Ingest sources into an LLM-maintained knowledge base and compile them into structured wiki articles. Sources can be Claude Code conversation transcripts (JSONL files), URLs, markdown files, PDFs, images, or pasted text. Use this skill when the user wants to add knowledge to a KB, says "add this to the KB", shares a conversation file, or wants to capture learnings from a session. Also triggers when a user wants to initialize a new knowledge base. After ingesting, this skill automatically compiles the source into wiki articles.
How this skill is triggered — by the user, by Claude, or both
Slash command
/knowledge-base:kb-ingestThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Add source material to a knowledge base and compile it into structured wiki articles. This is the primary entry point for growing a knowledge base.
Add source material to a knowledge base and compile it into structured wiki articles. This is the primary entry point for growing a knowledge base.
raw/wiki/log.mdThe user must provide two things:
/Users/harpatil/Projects/Karpathy-KB).jsonl file path, typically under ~/.claude/projects/).md, .pdf, .png, .csv, .py, .txt)If the user doesn't specify the KB path, ask for it.
Read AGENTS.md (or CLAUDE.md if it's a symlink) from the KB path to understand the schema — directory structure, article format, conventions.
If the KB path is empty or doesn't exist:
raw/, wiki/, outputs/, tools/.obsidian/app.json, .obsidian/core-plugins.json)AGENTS.md with a default schema. See references/source-types.md for the default schema.wiki/_index.md as the master indexlog.md as the chronological operation logtools/search — the default search script. See references/search-tool.md for the script.CLAUDE.md -> AGENTS.md.gitignoreEach source type has a different processing path:
Claude Code conversations are stored as .jsonl files (one JSON object per line). Read the file directly — it's typically 1-5MB. See references/conversation-parsing.md for the JSONL format.
The extraction process:
type fieldtype is user or assistant.message.content — it's either a string or an array of content blocks (look for blocks where type is text)<local-command, <command-, <bash-, <task-notification, Base directory for this skillThe synthesized document should capture:
Fetch the content using available tools (web browser skill, curl, gh for GitHub URLs). Convert to markdown and save to raw/. For GitHub issues/PRs, use gh issue view or gh pr view. For tweets, use the twitter skill if available.
Copy the file to an appropriate subdirectory in raw/. For markdown files, read and optionally enhance with a metadata frontmatter block.
Save to raw/ as a markdown file with a descriptive filename.
Every raw source document gets a YAML frontmatter block with metadata and a link manifest. The link manifest is the key innovation — it captures all outbound links with hints about what knowledge they point to, so someone (human or LLM) can reconstruct the full knowledge by following them.
---
title: Descriptive Title of the Source
source_type: conversation | url | file | text
source_path: original path or URL
date: YYYY-MM-DD
topics:
- topic-1
- topic-2
links:
- url: https://github.com/org/repo/pull/123
hint: PR implementing the feature discussed
- url: https://issues.redhat.com/browse/PROJ-456
hint: Customer ticket reporting the original problem
- url: https://docs.example.com/page
hint: Official documentation for the API used
---
Writing good link hints:
GitHub PR / Good: PR implementing inject_gomaxprocs precreate hook in CRI-OJira ticket / Good: Customer ticket: 512-core baremetal thread explosion, Westpac BankingAfter saving the raw source, automatically compile it into wiki articles. Invoke the kb-compile skill logic:
AGENTS.md for the wiki article formatwiki/_index.md to understand existing articleswiki/<topic>/ directory## Sources sectionwiki/_index.md with entries for any new articlesWhen creating or updating wiki articles:
AGENTS.md[[wikilinks]] for internal cross-references (Obsidian-compatible)## Sources section, include link hints from the frontmatter:
## Sources
- [[raw/crio-gomaxprocs-investigation.md]] — CRI-O GOMAXPROCS hook and customer case analysis
- [PR #9860](https://github.com/cri-o/cri-o/pull/9860) — PR implementing inject_gomaxprocs precreate hook
- [OCPBUGS-61881](https://redhat.atlassian.net/browse/OCPBUGS-61881) — 512-core baremetal thread explosion, Westpac Banking
Append an entry to log.md in the KB root. Create the file if it doesn't exist (with a # Knowledge Base Log heading). Each entry uses this format:
## [YYYY-MM-DD] ingest | Source Title
- **Source:** original path or URL
- **Raw:** `raw/filename.md`
- **Topics:** topic-1, topic-2, ...
- **Links captured:** N with hints
- **Articles created:** list of new wiki articles
- **Articles updated:** list of existing articles that were modified
The date prefix makes the log parseable: grep "^## \[" log.md | tail -5 shows the last 5 operations.
Tell the user what was created/updated:
AGENTS.md first. Different KBs may have different article formats, directory conventions, or topic structures. Don't assume.npx claudepluginhub harche/productivity --plugin knowledge-baseBuilds and maintains a personal LLM-powered knowledge base with raw/ and wiki/ directories. Ingests web sources, compiles articles, queries knowledge, and validates quality.
Use when compiling raw sources into the wiki, querying the knowledge base, running health checks or lint on the wiki, evolving or improving wiki coverage, or when user says 'compile', 'update the wiki', 'query', 'lint', 'health check', 'evolve', 'what's missing', or 'suggest improvements'. Also triggers on questions that should be answered from the knowledge base.
Builds and maintains an LLM-curated personal knowledge base of markdown files from ingested sources (papers, articles, notes). Compiles sources once into structured, cross-referenced wiki pages to accumulate knowledge over time.