vault-compact
Installation
SKILL.md
Compact
Consolidate clusters of small related notes into canonical files while preserving content and wikilinks.
Parameters
- target path (default: current working directory)
--mode report|apply-safe|apply(default:report)--yesexecute without confirmation--max-lines Nthreshold for small files (default: 50)--min-cluster Nminimum files per cluster (default: 2)
Scope
Scan markdown recursively in target path, excluding hidden/system directories
and all raw/* paths (raw/sources/, raw/processed/, raw/assets/).
Clustering
Prioritize these signals:
- Date-series basename matches (strongest)
- High-overlap tags + similar topic in same area
- Small sibling fragments in same folder
Confidence Rubric
high: strong date-series/basename match and low link rewrite riskmedium: tag/folder similarity with manageable rewrite risklow: weak semantic similarity or ambiguous destination
Workflow
- Discover small-note candidates under threshold.
- Build clusters and assign confidence.
- Plan destination files and wikilink rewrites.
- Generate preview plan.
- Execute by mode:
report: plan onlyapply-safe: executehighconfidence clusters onlyapply: execute all user-confirmed clusters
- In write modes, confirm unless
--yes. - Execute merge:
- merge content with one canonical frontmatter block
- preserve content (strip only duplicate per-file frontmatter/H1)
- update wikilinks
- archive originals to mirrored
archive/paths
- Append operation entry to
log.md.
Safety
- Default to report-first.
- Do not hard-delete originals unless explicitly requested.
- Verify merged output contains all source entries before archiving originals.
- Keep operations reversible and report touched files.
Output
Return:
- clusters by confidence
- selected execution set by mode
- destination files
- link updates applied/proposed
- archive moves applied/proposed
- touched files
Related skills
More from markphelps/agent-plugins
vault-lint
Hygiene pass over notes/ and projects/ surface
9vault-research
Research a note - find competitors, discussions, and market signals
8vault-concept-promoter
Promote repeated themes into canonical concept pages under notes/concepts
6vault-maintain
Weekly bounded maintenance loop across ingestion, hygiene, tracking, and
6vault-cleanup
Audit processed-source archives for integrity and hygiene
5vault-ingest
Move captured sources through ingestion pipeline. Process captures, create
5