einargudnig/dotfiles/knowledge-system
Claude Code and agent skill by einargudnig/dotfiles
- community
Checking that the SKILL.md file is still in the repository.
Operate or fix Einar's knowledge pipeline — breadcrumbs, qmd recall, concierge, memory sync. Not for lookups.
Install
npx vskill@latest install einargudnig/dotfiles/knowledge-systemSKILL.md
The same SKILL.md was published earlier as einargudnig/dotfiles/knowledge-system.
Knowledge system — operations runbook
The single source of truth for how Einar's capture + recall + memory pipeline works. It is a runbook for the system, not a search tool — to find notes, use the concierge agent or let per-prompt recall surface them.
Keep this file factual and in sync with reality. A drifted runbook is worse than none — if you change a hook or knob, update the matching line here.
The loop (what fires, when, where it lives)
Everything lives in ~/dotfiles/claude/ and is symlinked into ~/.claude/ by dotfiles/claude/link.sh. Hooks are wired in dotfiles/claude/settings.json.
| Trigger | Component | Does | |
|---|---|---|---|
| SessionStart (startup/resume/clear) | hooks/breadcrumb-briefing.py | Injects the newest breadcrumbs for the cwd's project (MAX_NOTES=4) + qmd BM25 knowledge hits (MAX_KNOWLEDGE=3, weak on bare repo names). | |
| UserPromptSubmit (every prompt) | hooks/qmd-recall.py | BM25 recall over the vault; injects up to MAX_HITS=3 notes. ~0.25s, fails open. | |
| SessionEnd (clean exit only) | hooks/breadcrumb-capture.py | Auto-/done: if the session is substantial and didn't already capture, spawns a detached claude -p that writes one breadcrumb. | |
| SessionEnd | hooks/memory-autocommit.sh | Commits + pushes the private memory repo if changed (pushes whenever ahead, so missed pushes self-heal). | |
| SessionEnd | hooks/qmd-refresh.sh | qmd update && qmd embed (detached) so the index never goes stale. | |
manual /done, /memento | skills/done, skills/memento | Deliberate breadcrumb (richer than auto-capture). /done ends the session. | |
manual /memento-defrag | skills/memento-defrag | Archives stale breadcrumbs to claude-breadcrumbs/_archive/. | |
| on demand | agents/concierge.md | Searches the whole vault via qmd to answer knowledge questions. The CLAUDE.md global rule tells the main agent to consult it. |
All leftover hooks from the retired ~/memento vault (memento-triage.py, memento-sweeper.py, vault-commit.sh) were deleted 2026-05-28.
Where things are
- Vault:
~/personal/obsidian/second-brain/—claude-breadcrumbs/(session logs),80 slip-box/(Zettelkasten knowledge),40 reference/+60 reference/,weekly-reviews/,30 planner/(journal; excluded from recall). - qmd index: collection
second-brain(the whole vault). Semantic search engine. - memento.yml:
~/.config/memento-vault/memento.yml—vault_path→ second-brain; capture thresholds (exchange_threshold: 15,file_count_threshold: 3,notable_patterns). - Repos: public
dotfiles(config only) ; privateclaude-memory=~/.claude/projects/<home-slug>/memory/(auto-memory; work/personal content). Never put work content in public dotfiles.
Invariants (decisions — don't silently break)
- One vault. Capture goes to
second-brain/claude-breadcrumbs/. The old~/mementovault is RETIRED (tombstoned). Never write there or re-introduce thenotes//projects/atomic-note layout. - Public/private split. Config → public dotfiles. Work/personal notes, auto-memory, global CLAUDE.md → private (or local-only). The global
CLAUDE.mdis intentionally local-only (mentions Maul). - Clean exit required. All three SessionEnd hooks only fire on
/quit,/clear, ctrl-D — NOT on a hard kill or closed window. A missed memory push / index refresh self-heals next clean exit; only that one session's breadcrumb is lost.
The knobs
- Recall (
hooks/qmd-recall.py):MIN_SCORE=0.5(raise → quieter),MAX_HITS=3,MIN_PROMPT_LEN=16,MIN_KEYWORDS=2,STOPWORDS(the conversational-word filter), excludesarchive/planner/excalidraw. Per-session de-dupe cache in$TMPDIR/qmd-recall-<session>.txt. - Briefing (
hooks/breadcrumb-briefing.py):MAX_NOTES=4,MAX_KNOWLEDGE=3. - Capture substantiality (
hooks/breadcrumb-capture.pyvia memento.yml): >15 exchanges, or >3 files, or touched anotable_patternsfile. - Defrag (
skills/memento-defrag): unchecked follow-ups stop protecting a breadcrumb after 60 days (the boxes are never ticked in practice).
qmd cheatsheet
Gotcha: qmd search (BM25) is AND-based — one query word absent from a note drops the note entirely. That's why recall strips conversational words to content terms before searching. If recall misses obvious notes, suspect a stray word survived the STOPWORDS filter.
Troubleshooting
- Recall too quiet / misses obvious notes → a non-content word survived
STOPWORDS(AND-match killed it); add it. Or lowerMIN_SCORE. Test:qmd search "<content terms>" -c second-brain --files. - Recall too noisy → raise
MIN_SCORE, dropMAX_HITS, or add a path to the exclusions. - Concierge / recall returns nothing at all → index stale or empty.
qmd collection list(check "Updated"), thenqmd update && qmd embed. Confirm collection is namedsecond-brain. - A SessionEnd thing didn't happen → did the session exit cleanly? Hard kills skip all SessionEnd hooks.
- Auto-capture didn't write a breadcrumb → session wasn't "substantial," or
/done//mementoalready captured (dedupe), or the detachedclaude -pis still running (it writes ~30s after exit; indexed next session). - `qmd query` hangs first time → it's downloading the ~2GB expansion model. Use
search/vsearchmeanwhile.
Extending it
- Add a hook: drop the script in
dotfiles/claude/hooks/, add an entry tosettings.json, rundotfiles/claude/link.sh(it links new hooks automatically), commit + push. - New machine:
git clonedotfiles →./claude/link.sh. Then clone the privateclaude-memoryrepo into the memory path. Runqmd update && qmd embedonce. - Change a knob: edit the constant in the relevant hook; update the Knobs section above.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingclaude/.claude/skills/knowledge-system/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/einargudnig/dotfiles/knowledge-system)