/second-brain:kb-ingestfrom second-brain
Ingests external sources into a knowledge bank with two modes: Quick (summarize and file) and Study (theme-by-theme deep dive with online research and personal notes).
Ships in second-brain. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Ingest external knowledge sources into the knowledge bank. Two modes serve different depths of engagement:
Knowledge Bank Location: Read from ~/.claude/plugins/config/second-brain/config.json.
Philosophy: The discussion between you and the user shapes what gets preserved — this is not a summarizer, it's a collaborative knowledge integration tool. A single source can touch multiple KB pages.
/second-brain:kb-ingest /path/to/article.md
/second-brain:kb-ingest https://example.com/interesting-post
Read the source document (file path → Read tool, URL → WebFetch, inline → accept directly).
For large sources (>100KB), apply the distillation guide.
Identify the source's major themes, key concepts, and actionable patterns.
After reading, use the AskUserQuestion tool to let the user choose their engagement mode:
Walk through the source theme by theme. For each theme:
The user's notes are first-class output — they're not just "discussion", they're the learning record that becomes the study docs in Step 4.
Generate concept/component/best-practice doc(s) as in the ingest guide. Target 5-8 WikiLinks.
Study mode produces three layers of documentation, each serving a different future use:
| Layer | Location | Purpose |
|---|---|---|
| Source copy | projects/{project}/sources/ | Original article with KB frontmatter — raw material for re-reading |
| Digest | projects/{project}/study/ | Numbered principles organized by category — quick reference |
| Learning notes | projects/{project}/study/ | Per-theme notes capturing the interactive discussion and online research — personal thinking record |
Plus the standard concept/component/best-practice docs distilled from the study.
Frontmatter for all docs:
---
title: Document Title
aliases: [Alt 1, Alt 2]
tags: [category, topic]
type: concept|component|best-practice|study|source
created: YYYY-MM-DD
modified: YYYY-MM-DD
project: {project}
source-type: article|document|url|gist
ingested-from: /path/to/source.md or https://url
source-doc: "[[Source Document Title]]"
---
Cross-references: Run search_cross_references.sh "keyword" [project]. Target 5-8 WikiLinks.
Obsidian Syntax: When obsidian skills are available, invoke /obsidian:obsidian-markdown before creating documents.
Updating existing docs: If new knowledge connects to or supersedes existing KB pages, update them — add cross-references, revise outdated claims, note where new data strengthens or challenges existing content.
After Study mode CREATE is complete, use the AskUserQuestion tool to ask what synthesis the user wants:
The synthesis draws from the digest + learning notes + user's personal reframings — not the raw source. The user's voice and analytical angle are the value-add over the original article.
Key principle: The user owns their voice. Present drafts, but expect the user to rewrite key passages (especially openings). Polish what they give you — don't ghostwrite.
Save synthesis outputs to the session docs folder:
docs/polished-blog-YYYYMMDD/ — original draft, polished version, changelog, feedbackdocs/polished-slack-YYYYMMDD/ — same structure for SlackAfter creating/updating documents:
source skills/common/generate_index.sh
generate_index "$KB_PATH"
source skills/common/obsidian_helpers.sh
append_kb_log "$KB_PATH" "ingest" "kb-ingest" "Ingested [source]. Created: [docs]. Updated: [docs]"
./skills/session-recap/scripts/count_wikilinks.sh document.md 5
./skills/session-recap/scripts/validate_obsidian_syntax.sh document.md
For multiple sources: "Ingest all .md files in /path/to/folder/"
| Mode | Complete when |
|---|---|
| Quick | KB doc(s) created with frontmatter and 5-8 WikiLinks, index regenerated, log appended |
| Study | Source copy + digest + learning notes + concept docs created, index regenerated, log appended |
| Study + Synthesis | All of Study, plus polished blog/slack output in session docs |
What SKILL.md sets; muted values are Claude Code's defaults
6 skills in this plugin
/kb-lintHealth-check the knowledge bank for orphan documents, stale content, broken WikiLinks, index drift, and missing frontmatter. Generates a severity-graded report. Use this skill whenever the user mentions lint, health check, KB maintenance, stale docs, broken links, orphan pages, missing references, knowledge bank quality, or hasn't run a check in a while. Also trigger when the user asks "what's not cross-referenced?", "are there any dead links?", or expresses concern about KB quality./knowledge-bank-lookupDelegates knowledge bank lookups to Explore subagents with reflections-first strategy that learns from past mistakes. Checks /reflections/ directory before documentation to extract documented failures to avoid and proven approaches to apply. Automatically triggers when user mentions services ([project-a], [project-b], [project-c], Claude Code), requests investigations, or queries past lessons. Returns structured, actionable insights achieving 69-94% context reduction. (project, gitignored)/session-managerSet the current session's name, project, tags, or summary on its session note. Use when the user names, tags, or summarizes this session, sets its project, or mentions in passing what this session has been about./session-recapDocument Claude Code sessions by extracting knowledge into cross-referenced documentation. Triggers on "recap the session", "summarize the work", or after significant code changes./wdymFrom-zero decode of this session's agent work for the person supervising it. Use when the person does not follow something the agent said or showed ('wdym', 'what do you mean'), wants it from zero ('like I have no context', 'from scratch'), asks what a word, step or output of this session means or why the agent did it that way, asks for proof ('how did you verify', 'prove it'), or says 'wdym debrief'. An explanation for an audience other than the person belongs to the eli5 skill; a pure visual request belongs to show-me.Other plugins' skills for the same job
npx claudepluginhub sxhmilyoyo/sundayhao-plugins --plugin second-brain