wiki-tags-refreshlisted
Install: claude install-skill ihudak/ihudak-claude-plugins
# wiki-tags-refresh
Read `skills/wiki-schema/SKILL.md` fully before proceeding.
Invoke with: `/wiki-tags-refresh [directory]`
If no directory argument is given, scan the entire vault (excludes `.obsidian/`).
---
## Step 1 — Resolve VAULT_PATH and scan scope
Vault path: `~/obsidian_vault` by default; set `VAULT_PATH` to override. WSL users with a Windows-side vault must set `VAULT_PATH` explicitly (e.g. `/mnt/c/Users/<name>/obsidian_vault`).
Scan scope: the vault root (default) or the given directory argument.
---
## Step 2 — Read the current tag index
Read `.obsidian/copilot/tag-index.md` fully. Extract every documented tag (lines matching
`` `#tagname` ``).
---
## Step 3 — Collect tags from scanned pages
Scan every `.md` file under the scan scope for frontmatter `tags:` entries only.
A broad grep would also match `related:` wikilinks — use the awk approach below
to stay strictly within the `tags:` block:
```bash
find "<scope>" -name "*.md" -not -path "*/.obsidian/*" -print0 | xargs -0 awk '
FNR==1{front=0; intags=0}
/^---/{if(front==0) front=1; else front=0; next}
!front{next}
/^tags:/{intags=1; next}
/^[a-zA-Z]/{intags=0; next}
intags && /^ - /{gsub(/^ - /, ""); print}
' | sort -u
```
> Note: tags must use the YAML multi-line block form (`tags:` followed by ` - tagname` lines); inline arrays (`tags: [a, b]`) are silently skipped by this script. `-print0`/`xargs -0` is required — vault filenames routinely contain spaces (e.g. `Daily/2026-07-13 S