vault-stubs
БесплатноБез исполняемых скриптовНе проверенWork-namespace redirect-stub classification in an Obsidian vault. Use when cleaning stubs, converting duplicates to redirects, or merging content into…
от laurigates★ 61 звезда на GitHubОб этом скилле
Work-namespace Stub Management
When to Use This Skill
| Use this skill when... | Use the alternative instead when... |
|---|---|
| Classifying and consolidating work-namespace redirect stubs in the vault | Triaging generic orphan notes outside the work namespace — use vault-orphans |
| Promoting a work-namespace note into the canonical Zettelkasten location | Repairing the wikilinks that point at the moved note afterwards — use vault-wikilinks |
| Merging unique work-namespace content back into a Zettelkasten note | Adding the merged note into a Map of Content hub — use vault-mocs |
A work-namespace subtree (a directory such as work/z/) is a knowledge base that mirrors select Zettelkasten notes as tiny redirect stubs. Content lives in Zettelkasten/; the work-namespace subtree points to it so work-context queries still find the topic.
Canonical Redirect Stub Format
---
tags: [redirect]
context: work
---
See Zettelkasten/Docker|Docker in the main knowledge base.
Properties:
- Size ≤ 200 bytes (whitespace excluded)
- Tags is exactly
[redirect] - Body is a single wikilink with alias to the canonical note
context: work
Classifications (from vault-agent's stubs analyzer)
| Class | Meaning | Action |
|---|---|---|
clean_redirect |
≤ 200 B, redirect tag, Zettelkasten match |
✓ keep as-is |
broken_redirect |
redirect tag but >200 B or missing target |
Rewrite body to the canonical one-liner |
stale_duplicate |
Full article, basename exists in Zettelkasten | Merge content into Zettelkasten, convert stub to clean_redirect |
ns_original |
Full article, no Zettelkasten match | Legitimate — leave alone |
Consolidation: stale_duplicate → clean_redirect
When a work/z/Foo.md has substantive content AND Zettelkasten/Foo.md exists, you must decide:
- Is the work-namespace content a subset of Zettelkasten? → Replace stub with canonical redirect. No content merge needed.
- Does the work-namespace note have unique content? → Merge the unique sections into
Zettelkasten/Foo.mdfirst, then replace stub. - Is the work-namespace note better than Zettelkasten? → Rare, but flag for user review. The user decides which becomes canonical.
Merge Heuristic
Compare by section. If a heading in work/z/Foo.md has text that doesn't appear in Zettelkasten/Foo.md, that text needs migration. Use word-level comparison, not exact match — minor wording differences don't count as "unique content."
When in doubt, flag for user review rather than auto-merging. A bad merge is worse than leaving a duplicate.
Conversion Recipe
Replace the whole work-namespace file body:
---
tags: [redirect]
context: work
---
See Zettelkasten/Foo|Foo in the main knowledge base.
Commit message:
refactor(stubs): convert work/z/Foo.md to redirect (content merged into Zettelkasten)
Promoting ns_original → Zettelkasten
Occasionally a file classified ns_original is actually general-interest content that belongs in Zettelkasten/. Signs:
- No work-specific references (internal check-ins, internal tools, internal URLs)
- Could be useful in personal contexts
If promoting:
- Move file to
Zettelkasten/Foo.md - Create a
work/z/Foo.mdredirect stub in its place - Strip
context: workfrom the promoted note's frontmatter - Commit as
refactor(stubs): promote Foo from work/z to Zettelkasten
Don't promote aggressively — the work namespace exists for a reason.
Detection
# All work-namespace files ordered by size
fd -e md . work/z -x wc -c {} | sort -n
# Ones with `redirect` tag
rg -l '^tags:.*\bredirect\b' work/z/ --glob '*.md'
# Large ones without `redirect` tag (candidates for conversion)
rg -L -l '^tags:.*\bredirect\b' work/z/ --glob '*.md'
Vault-agent's analyze_stubs gives the full classification.
Offline Fallback (App Closed)
The detection methodology above is unchanged — only the data source changes when Obsidian (and its obsidian CLI / live link index) is closed. The obsidian CLI and vault-agent analyzers are the live-index path; parsing the .md corpus directly with the fd/rg Detection snippet above is the deterministic headless default, and for batch/scheduled audits it is often the better choice (reproducible, free of app/index state). vault-frontmatter already operates this way.
Parse the corpus directly:
- Frontmatter — read each note's YAML block between the leading
---fences; extracttags,aliases,context. Seevault-frontmatterfor YAML-block mechanics. - Wikilinks — match
Target,Target|Alias,Target#Heading,folder/Target, and!embed. Resolve each target to a note by basename, then relative path, then alias (from frontmatter), all case-insensitive. Resolve!embedagainst attachments as well as notes — the attachment folder is per-vault configurable, so read it from `.obsid
Установить vault-stubs в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadEditWriteGrepGlobFAQ
Что делает скилл vault-stubs?
Work-namespace redirect-stub classification in an Obsidian vault. Use when cleaning stubs, converting duplicates to redirects, or merging content into Zettelkasten.
Как установить скилл vault-stubs?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл vault-stubs запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic