capture-knowledge
БесплатноБез исполняемых скриптовНе проверенCapture reusable cross-project technical knowledge into the user's Obsidian vault as a markdown note. Use whenever the user wants to save a learning, pattern…
от ArjenSchwarz★ 20 звёзд на GitHubОб этом скилле
Capture project knowledge
This skill writes a markdown note into the user's Obsidian vault capturing reusable, cross-project technical knowledge. The user invokes you from inside one of their software projects; you distill what you've learned (from the code, conversation, or your own investigation) into a note that future-them can find and apply on a different project.
Resolving the vault path
The vault is named Main but lives at a different absolute path on different machines (e.g. /Users/arjen/Documents/Obsidian/Main on one Mac, /Users/arjenschwarz/Documents/Obsidian/Main/Main on another). Never hardcode the path. The skill keeps a per-machine cache of the path so it doesn't depend on Obsidian (or its CLI) being available at write time.
Cache location: ~/.config/capture-knowledge/config.json, with shape:
{
"vault_path": "/Users/arjen/Documents/Obsidian/Main"
}
Resolution workflow
On every invocation, run this in order — stop at the first step that yields a path:
Read the cache. If
~/.config/capture-knowledge/config.jsonexists and hasvault_pathpointing at an existing directory, use it. No further checks. This is the hot path.VAULT_PATH=$(python3 -c "import json,os,sys; p=os.path.expanduser('~/.config/capture-knowledge/config.json'); print(json.load(open(p))['vault_path']) if os.path.exists(p) else None" 2>/dev/null) [ -d "$VAULT_PATH" ] || VAULT_PATH=""Try the Obsidian CLI as a one-shot to propose a path to the user:
obsidian vaults verbose | awk -F'\t' '$1=="Main"{print $2}'. If it returns a directory that exists, ask the user "I found your Main vault at<path>— save that as the vault path on this machine?" and on yes, write the cache and continue.Ask the user outright: "I don't have your Obsidian Main vault path cached yet on this machine. What's the absolute path?" Validate that the directory exists, then write the cache and continue.
Writing the cache
When you've resolved a path the user has confirmed (step 2 or 3), persist it:
mkdir -p ~/.config/capture-knowledge
python3 -c "import json,os; p=os.path.expanduser('~/.config/capture-knowledge/config.json'); json.dump({'vault_path': '$VAULT_PATH'}, open(p, 'w'), indent=2)"
Tell the user briefly that you've cached the path so future invocations won't ask. The cache is per-machine and not synced — that's intentional.
If the cache exists but points at a directory that no longer exists (e.g. drive was renamed), treat it as "not cached" and re-run the resolution flow, overwriting the stale entry.
Where the note goes
Inside the vault, notes from this skill always go into:
<VAULT_PATH>/03-Notes/Generated/
Create that folder with mkdir -p if it doesn't exist. All notes from this skill go here regardless of project or topic — topic categorization is done via tags, not subfolders, so the user isn't locked into a folder hierarchy that might not fit later.
If the user clearly asks for a different location, respect that. Otherwise stick with the default.
What makes a good note
The note answers a how/why question with enough specifics that future-you in a different codebase can apply it. Lean concrete: real code, real config, the actual gotcha. Avoid generic prose that re-explains what's in any tutorial — the value is the glue, the non-obvious bit, and the integration knowledge.
A typical structure:
- H1 title phrased the way the user would search for it. e.g.
# How to run an MCP server inside a Swift app. Match the filename. - Summary (1–2 short paragraphs) framing the problem and what this solves.
- The substance — code blocks, sequenced steps, diagrams. Lift specific examples from the source project, but rewrite identifiers and naming so the example reads as a pattern, not as project-specific code. The source project name lives in frontmatter, not buried in every code block.
- Gotchas / why it works. If you only know the recipe and not the deeper why, say so explicitly — that calibrates the reader.
- References. Upstream docs, repo URL or path, related vault notes via wikilinks.
If the topic is too thin for that structure, write fewer sections — don't pad. A 200-line note that's 80% filler is worse than a 40-line note that's all substance.
Don't tie the body to a single project
Phrasing like "in our Transit codebase, we…" should become "in a Swift app using Foo, you…". The source project is recorded in frontmatter for traceability; the body should generalize. This is the single most important style rule for this skill — the whole reason these notes live outside per-project folders is so they're useful when you're in a different project later.
Frontmatter
Always include this exact frontmatter at the top of every note:
---
created: <ISO 8601 with timezone offset>
updated: <same as created on first write>
type: knowledge
tags:
- generated
- <topic 1>
- <topic 2
Установить capture-knowledge в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл capture-knowledge?
Capture reusable cross-project technical knowledge into the user's Obsidian vault as a markdown note. Use whenever the user wants to save a learning, pattern, recipe, or how-to that would help future projects — phrases like "save this to my vault", "write this up as a note", "capture this for future reference", "document how X works", "remember this pattern", "add to my knowledge base", or any time after solving something non-obvious in their current repo. Examples are "how to set up an MCP server in a Swift app", "the GraphQL pagination pattern we used here", "how Transit wires up its dependency injection". Use this skill PROACTIVELY whenever the user finishes investigating something they'd plausibly want to reuse on a different project, even if they don't say "save it" explicitly — offer to capture it. Do NOT use for project-specific notes that only make sense inside one repo (those belong in that project's own notes), and do NOT use for daily/journal entries.
Как установить скилл capture-knowledge?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл capture-knowledge запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic