name: kb description: Manage an Obsidian-based AI knowledge vault with /kb add/find/process-pending/compile/health/tidy/add-video.
/kb - AI Knowledge Vault
Manage the knowledge/ directory in this repository as a reusable AI knowledge vault.
Triggers
/kb process-pending/kb add [content or URL]/kb find [query]/kb add-video [file-or-directory]/kb compile/kb health/kb tidy
Guardrails
- Do not scan every
knowledge/*.mdfile by default; start fromknowledge/_index.md - Store all knowledge entries under
knowledge/ - Keep the original source content in full under
## 原始内容 - Reuse existing tags and concept names when possible
- Prefer local config files for API keys; use environment variables as fallback
- Treat
knowledge/concepts/as the primary navigation layer andknowledge/reports/as reusable query output /kb addand/kb process-pendinguse the same ingestion action: first produce a pending Markdown source with frontmatter, then create the normalized entry, update the index, and archive the source
Workflows
1) /kb process-pending
Process files in knowledge/inbox/manual/pending/ and turn them into structured entries.
Expected behavior:
- Read
knowledge/_index.mdfirst for existing tags and concepts - For each pending Markdown file, extract metadata, summarize 1-3 key points, optionally add
我的思考 - Write a normalized entry to
knowledge/YYYY-MM-DD-title.md - Update
knowledge/_index.md - Move the source file to
knowledge/inbox/manual/processed/orreview/when uncertain
This workflow is handled directly by the agent, not by a Python CLI command.
2) /kb add
Add a single piece of knowledge from text, notes, or a URL.
Expected behavior:
- Detect source type
- If the input is a URL, prefer Defuddle CLI to fetch clean Markdown content instead of WebFetch:
defuddle parse "<URL>" --md -o "knowledge/inbox/manual/pending/YYYY-MM-DD-short-title.md"
If title or domain metadata is needed, use:
defuddle parse "<URL>" -p title
defuddle parse "<URL>" -p domain
The pending file must include frontmatter:
datesourcesource_typesource_urltags(can start as an empty list and be finalized during ingestion)confidence: raw
Keep the full Defuddle Markdown output as the body without truncation.
3. If the input is pasted text or notes, also write it first to knowledge/inbox/manual/pending/YYYY-MM-DD-short-title.md with the same frontmatter and full original body
4. Process the new pending source using the same action as /kb process-pending:
- Read
knowledge/_index.mdfor existing tags, concepts, and recent entries - Summarize 1-3 key points with the current agent
- Optionally add
我的思考 - Choose tags by reusing existing names when possible
- Choose related concepts from the index concept navigation
- Write a normalized entry to
knowledge/YYYY-MM-DD-title.md - Preserve the pending file body under
## 原始内容 - Update
knowledge/_index.md - Move the pending source to
knowledge/inbox/manual/processed/
- Return the created entry path, tags, related concepts, and suggested links to existing entries
Fallbacks:
- If
defuddleis not installed, install it withnpm install -g defuddle-cli - If Defuddle cannot fetch meaningful content, try another reader; if that still fails, keep a URL-only pending source with
confidence: rawand move it toknowledge/inbox/manual/review/ - If Defuddle output is too short, mostly navigation, or lacks substantive body content, do not ingest it directly; move it to
review/
3) /kb find
Search the knowledge vault and optionally generate a reusable report.
Command:
python3 .claude/skills/kb/scripts/knowledge_ops.py find "context engineering"
Output should prioritize:
- matching concepts
- matching entries
- key takeaways
- suggested follow-up reading
4) /kb add-video
Transcribe local video or audio files, lightly clean the transcript, and create knowledge entries.
Prerequisites:
pip3 install dashscopeffmpegandffprobeavailable on the machine- Copy
.claude/skills/kb/config.example.jsonto.claude/skills/kb/config.local.jsonand fill indashscope_api_keyor setDASHSCOPE_API_KEY
Default input directory:
knowledge/inbox/video/raw/
Command:
python3 .claude/skills/kb/scripts/video_ingest.py [path]
Outputs:
knowledge/inbox/video/transcripts/*.raw.txtknowledge/inbox/video/transcripts/*.clean.txtknowledge/inbox/video/transcripts/*.meta.jsonknowledge/inbox/video/logs/ingest.log- new knowledge entry files under
knowledge/
Quality rules:
- Only do light transcript cleanup
- Do not invent facts
- Leave
核心观点blank for the current agent to fill in later
5) /kb compile
Compile timeline entries into concept pages, related links, index, and Bases view.
Command:
python3 .claude/skills/kb/scripts/knowledge_ops.py compile
6) /kb health
Generate a health report for isolated entries, concept gaps, stale raw files, and report coverage.
Command:
python3 .claude/skills/kb/scripts/knowledge_ops.py health
7) /kb tidy
Normalize tags and rebuild concepts, index, health report, and Bases view.
Command:
python3 .claude/skills/kb/scripts/knowledge_ops.py tidy
Troubleshooting
- If
find,compile, orhealthfail to locate the repo root, setKB_ROOT=/absolute/path/to/repo - If
add-videofails, verifydashscopeinstallation, API key config, andffmpegavailability
Priorisation de Tâches
Productivite
Priorise vos tâches avec les frameworks Eisenhower, ICE et RICE.
Generateur de Rapport Hebdomadaire
Productivite
Generez des rapports de statut hebdomadaires structures et concis.
Rapport de Daily Standup
Productivite
Génère des rapports de daily standup structurés et concis.