Help us improve
Share bugs, ideas, or general feedback.
Apply deterministic, safe auto-fixes to vault documents — frontmatter key reordering, body section reordering per template, AC heading normalization, trailing whitespace, multi-blank-line collapse. Powered by `lib/canonical-formatter.js`. Only fixes that are 100% mechanical and information-preserving — never invents content, never changes field VALUES, never guesses missing required fields. After fixing, re-runs validate and reports residual issues that need human attention. Use when the user says 'fix vault', 'format vault docs', 'auto-fix', 'canonicalize', 'sửa vault', 'format lại docs', '/vault.fix'.
npx claudepluginhub nguyenvanduocit/claude-code-vault-keeper --plugin claude-code-vault-keeperHow this skill is triggered — by the user, by Claude, or both
Slash command
/claude-code-vault-keeper:vault.fixThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill applies the **canonical formatter** (`lib/canonical-formatter.js`) to vault documents. The formatter is **idempotent** and **information-preserving** — it reorders, normalizes whitespace, and canonicalizes headings/bullets, but never invents content or changes values. Anything that requires judgment is reported as a residual issue for the user to handle.
Creates p5.js generative art with seeded randomness, noise fields, and interactive parameter exploration. Use for algorithmic art, flow fields, or particle systems.
Share bugs, ideas, or general feedback.
This skill applies the canonical formatter (lib/canonical-formatter.js) to vault documents. The formatter is idempotent and information-preserving — it reorders, normalizes whitespace, and canonicalizes headings/bullets, but never invents content or changes values. Anything that requires judgment is reported as a residual issue for the user to handle.
From canonical-formatter.js:
id, title, template, status, phase, owner, created, updated), then alphabetical.sections: list.### AC<n> — <Title>.- **predicate** [...](...) — reason.status value into a legal enum value — that's a semantic guess.$path pattern — that affects links and history.If the user explicitly asks for one of the above, refuse and explain: "That requires authoring judgment, not formatting. Open the file and decide."
git -C "${CLAUDE_PROJECT_DIR}" status --porcelain | head -5. If uncommitted changes exist, STOP and ask: "Working tree is dirty. Commit or stash first, or pass --allow-dirty to proceed. Auto-fixes touch many files; you want a clean diff to review." Never silently overwrite uncommitted work.vault-keeper validate --json first to capture the before error count.Before writing, compute a diff preview:
import { formatVaultDocument } from 'claude-code-vault-keeper/formatter';
// for each markdown file in scope:
// read → format → diff against original → collect change summary
(Use node -e one-liner via Bash if a JS environment is needed. Do NOT inline-bundle the formatter logic — always invoke lib/canonical-formatter.js.)
Show the user:
Ask via AskUserQuestion: "Apply auto-fixes to N files?" with options yes, apply, no, abort, only files matching <subpath>. Do NOT proceed without explicit confirmation.
For each file in scope, write the formatted output back. Preserve file mode. Do NOT touch files that the formatter returns unchanged (skip the write — keeps mtime stable for unaffected docs).
Re-run vault-keeper validate --json. Capture the after error count. The expected outcome:
after.errors == 0 → success, vault is clean.0 < after.errors < before.errors → partial success. Residual errors are non-deterministic (required field missing, etc.) — report them for human follow-up.after.errors >= before.errors → formatter regression. STOP. Print the diff between before and after error lists, suggest git restore . to roll back. This branch should be rare; if it fires, it's a formatter bug worth filing.vault.fix — formatted <N> files, skipped <M> already-canonical
Validate before → after: <X errors> → <Y errors>
Residual (need human judgment):
- <docs/path/foo.md:12 — required field `owner` missing — formatter can't guess a value>
- <docs/path/bar.md:8 — status `wip` not in allowed values [todo, in_progress, done] — pick one>
- ...
Git diff is staged for review. Commit when satisfied, or `git restore .` to undo.
Do NOT auto-commit. The user reviews the diff and commits themselves (or via /vault.sync).
/vault.health — health diagnoses, fix repairs the mechanical subset./vault.sync — fix first, then sync, so the remote receives canonical docs./vault.sync — sync runs validate, not fix. Fix is opt-in because it touches many files.