Use this skill to interact with the repo's persistent knowledge bank (.knowledge-bank/). Triggers when the user says: "store this", "remember this", "save a learning", "create an ADR", "what do we know about X", "recall X", "search the knowledge bank", "initialize the knowledge bank", "kb-init", "kb-store", "kb-recall", "kb-adr", or any request to persist knowledge between sessions. Also use this skill automatically at session end to store significant learnings.
How this skill is triggered — by the user, by Claude, or both
Slash command
/obsidian-knowledge-bank:knowledge-bankThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
The knowledge bank is a `.knowledge-bank/` directory inside the repo. It stores markdown files
The knowledge bank is a .knowledge-bank/ directory inside the repo. It stores markdown files
organized by category, indexed for fast lookups. It survives between Claude sessions and is
committed to git alongside code.
Categories:
adr/ — Architecture Decision Records (ADR-NNNN-title format)learnings/ — Lessons learned, discoveries, gotchasdecisions/ — Technical decisions (lighter-weight than ADRs)context/ — Background info, domain knowledge, system explanationssessions/ — Per-session summaries auto-captured at end of sessionIndex system: Every write updates .knowledge-bank/INDEX.md with a single-line comment
entry per record. This allows instant grep-based search across thousands of files without
reading them all.
Read $ARGUMENTS or the conversation context and classify the request as one of:
Then jump to the matching step below.
When: User runs /kb-init or says "set up the knowledge bank".
Check if .knowledge-bank/ already exists with the Read or Glob tool.
Create the directory structure using the Bash tool:
mkdir -p .knowledge-bank/{adr,learnings,decisions,context,sessions}
Create .knowledge-bank/INDEX.md with this exact content:
# Knowledge Bank Index
This file is the master index for `.knowledge-bank/`. Each entry is a single-line HTML
comment in a grep-friendly format. Never edit entries manually — use the kb commands.
Search examples:
- All ADRs: `grep 'category=adr' .knowledge-bank/INDEX.md`
- By tag: `grep 'tags=.*auth' .knowledge-bank/INDEX.md`
- By keyword in title: `grep -i 'title=.*cache' .knowledge-bank/INDEX.md`
- Recent entries: `tail -20 .knowledge-bank/INDEX.md`
## Entries
Create category-level INDEX.md files for each of: adr/, learnings/, decisions/, context/, sessions/.
Each should contain:
# [Category Name] Index
<!-- KB entries for this category are listed below. One line per entry. -->
Create .knowledge-bank/.gitkeep so empty directories commit cleanly.
Check if CLAUDE.md exists in the repo root using the Read tool.
knowledge-bank):
## Knowledge Bank
This repo has a persistent knowledge bank at `.knowledge-bank/`. Before starting work on
any non-trivial task, check for relevant context:
- **All entries index:** `.knowledge-bank/INDEX.md`
- **ADRs:** `.knowledge-bank/adr/INDEX.md`
- **Learnings:** `.knowledge-bank/learnings/INDEX.md`
- **Decisions:** `.knowledge-bank/decisions/INDEX.md`
- **Context:** `.knowledge-bank/context/INDEX.md`
Search the index first: `grep -i 'title=.*<keyword>' .knowledge-bank/INDEX.md`
Then read the specific file referenced in the `file=` field.
CLAUDE.md does not exist, tell the user to add this block to their CLAUDE.md manually,
or offer to create a CLAUDE.md with the block.Tell the user the knowledge bank is initialized and explain what was created. Show the CLAUDE.md snippet if applicable.
When: User wants to save a learning, discovery, decision, or context note.
Gather the following information. If not provided in $ARGUMENTS, extract from conversation context.
Ask the user only if genuinely ambiguous:
learnings, decisions, context, sessions
(for formal ADRs use the ADR flow in Step 2c)Compute the next entry ID:
grep -c '^<!-- KB:' .knowledge-bank/INDEX.md 2>/dev/null || echo 0
Increment by 1 and zero-pad to 4 digits (e.g., 0042).
Build the file path:
YYYY-MM-DD (today)YYYY-MM.knowledge-bank/<category>/YYYY-MM/YYYY-MM-DD-<slug>.mdmkdir -p .knowledge-bank/<category>/YYYY-MM
Write the file with this frontmatter format. Read references/learning-template.md for the full template:
---
id: "0042"
title: "Your Title Here"
date: "2026-03-28T14:30:00"
category: learnings
tags: [tag1, tag2, tag3]
---
## Summary
One paragraph summary.
## Details
Full content here.
## Related
- Any related KB entries or external links
Append the index entry to both .knowledge-bank/INDEX.md and
.knowledge-bank/<category>/INDEX.md:
<!-- KB: id=0042 date=2026-03-28 category=learnings tags=tag1,tag2,tag3 title=Your Title Here file=learnings/2026-03/2026-03-28-your-title-here.md -->
The entry must be a single line starting with <!-- KB: and ending with -->.
Confirm to the user: file path created, ID assigned, tags indexed.
When: User says "create an ADR", "record an architecture decision", or runs /kb-adr.
Gather:
Proposed, Accepted, Deprecated, SupersededCompute the next ADR number by counting existing ADR files:
ls .knowledge-bank/adr/ADR-*.md 2>/dev/null | wc -l
Increment by 1, zero-pad to 4 digits: ADR-0001.
Build the file path: .knowledge-bank/adr/ADR-<NNNN>-<slug>.md
Write the ADR file. Read references/adr-template.md for the exact format.
Compute the next global ID and append to both index files (same as Step 2b-5 but category=adr).
Confirm to the user: ADR number, file path, status.
When: User asks "what do we know about X", "recall X", or runs /kb-recall <query>.
Parse the query from $ARGUMENTS or conversation context.
Search the master index using the Grep tool (do NOT read individual files yet):
pattern: (case-insensitive) title=.*<query> OR tags=.*<query>
file: .knowledge-bank/INDEX.md
Also try category-specific indexes if the user specified a category.
If no results, try a broader search:
grep -ri "<query>" .knowledge-bank/INDEX.md
If still no results, inform the user and suggest related terms.
Present the matching index entries as a numbered list: ID, date, category, title, tags. Ask the user which entries they want to read in full (or read all if ≤ 3 results).
For each requested entry, extract the file= field from the index line and read that file
using the Read tool.
Present the content clearly. If there are multiple results, group by category.
When: User asks "list knowledge", "show recent learnings", "list ADRs", or runs /kb-recall with no query.
Determine the filter:
tail -20 equivalent using Grep)date=YYYY-MMParse the matching lines and present as a formatted table:
ID Date Category Title
──────────────────────────────────────────────────────────
0042 2026-03-28 learning JWT Token Expiry Handling
0041 2026-03-27 adr ADR-0003 Use PostgreSQL for...
Offer to read any entry in full.
When: Triggered by the session-end hook, or user says "save session notes", "store what we learned today".
Review the conversation history. Identify:
If there are 3 or more significant insights, create a session summary entry:
sessionsSession YYYY-MM-DD: <1-line summary of main theme>For any individual learning significant enough to stand alone, create separate learnings entries.
For any architectural decisions made during the session, prompt the user: "This session included an architectural decision about X. Should I create a formal ADR?"
Confirm what was stored.
.knowledge-bank/ exists before storing. If it doesn't, prompt the user to run /kb-init first.<!-- KB: — this is what makes grep work.auth,jwt,security).references/adr-template.md.learnings for discoveries and decisions for choices made.npx claudepluginhub stilero/claude-plugins --plugin obsidian-knowledge-bankExtracts reusable strategic knowledge from session history (architecture, patterns, ops) and updates local CLAUDE.md. Triggers on 'learn', 'save knowledge', or session ends.
Analyzes conversations to extract learnings, best practices, institutional knowledge, saving to topic-specific markdown KB files and updating CLAUDE.md references.
Captures solved problems as structured JSONL knowledge entries for fast recall in future sessions. Automatically activates after bug fixes or when a solution should be preserved.