vault-cleanup-auditor
Audit your Obsidian vault in Claude Code — finds stale drafts, empty folders, duplicate filenames, and incomplete files. Saves a dated report.
What this skill does
# Vault Cleanup Auditor
Runs 4 targeted checks against your Obsidian vault and saves a prioritized audit report to `vault-audit/YYYY-MM-DD-audit.md`. Takes under 30 seconds. No APIs, no paid services.
Run it monthly or whenever the vault starts feeling messy.
---
## How to Use
Open Claude Code and say:
```
Run the Vault Cleanup Auditor skill against my vault at /path/to/vault.
```
---
## Skill Instructions (for Claude Code)
When this skill is invoked, follow these phases exactly.
---
### PHASE 1: INTAKE
Check whether the user has provided:
- `vault_path` — absolute path to their Obsidian vault root
**If missing, ask:**
```
What's the absolute path to your Obsidian vault? (e.g. /root/obsidian-vault)
```
Do not proceed until confirmed.
---
### PHASE 2: ANALYZE
Run all 4 checks. Capture raw output from each before writing the report.
**Check 1 — Stale drafts (30+ days, unposted):**
```bash
VAULT="VAULT_PATH_HERE"
echo "=== CHECK 1: STALE DRAFTS ==="
find "$VAULT/content/ready-to-post" -name "*.md" -mtime +30 2>/dev/null | while read f; do
if grep -q '\*\*Posted:\*\* ❌' "$f" 2>/dev/null; then
days=$(( ($(date +%s) - $(stat -c %Y "$f")) / 86400 ))
echo "${days}d|${f##$VAULT/}"
fi
done
echo "=== END CHECK 1 ==="
```
**Check 2 — Incomplete files (no headings, 5+ lines):**
```bash
VAULT="VAULT_PATH_HERE"
echo "=== CHECK 2: INCOMPLETE FILES ==="
find "$VAULT" -name "*.md" \
-not -path "*/.git/*" \
-not -path "*/.obsidian/*" \
-not -path "*/.openclaw/*" | while read f; do
if ! grep -qE '^#{1,6} ' "$f" 2>/dev/null; then
lines=$(wc -l < "$f")
if [ "$lines" -gt 5 ]; then
echo "${lines}lines|${f##$VAULT/}"
fi
fi
done
echo "=== END CHECK 2 ==="
```
**Check 3 — Duplicate filenames:**
```bash
VAULT="VAULT_PATH_HERE"
echo "=== CHECK 3: DUPLICATE FILENAMES ==="
find "$VAULT" -name "*.md" \
-not -path "*/.git/*" \
-not -path "*/.obsidian/*" \
-not -path "*/.openclaw/*" \
-printf "%f\n" | sort | uniq -d | while read name; do
echo "DUPE:$name"
find "$VAULT" -name "$name" \
-not -path "*/.git/*" \
-not -path "*/.obsidian/*" | while read f; do
echo " PATH:${f##$VAULT/}"
done
done
echo "=== END CHECK 3 ==="
```
**Check 4 — Empty folders:**
```bash
VAULT="VAULT_PATH_HERE"
echo "=== CHECK 4: EMPTY FOLDERS ==="
find "$VAULT" -type d -empty \
-not -path "*/.git/*" \
-not -path "*/.obsidian/*" \
-not -path "*/.openclaw/*" | while read d; do
echo "${d##$VAULT/}/"
done
echo "=== END CHECK 4 ==="
```
---
### PHASE 3: OUTPUT
**3a. Create the report directory and file:**
```bash
VAULT="VAULT_PATH_HERE"
DATE=$(date +%Y-%m-%d)
mkdir -p "$VAULT/vault-audit"
REPORT="$VAULT/vault-audit/${DATE}-audit.md"
echo "Report path: $REPORT"
```
**3b. Write the report** using this exact structure:
```markdown
# Vault Cleanup Audit — YYYY-MM-DD
Generated: YYYY-MM-DD HH:MM
**Summary:** 🔴 [N] stale | 🟡 [N] incomplete | 🟡 [N] dupes | 🟢 [N] empty
---
## 🔴 Stale Drafts (30+ days, unposted)
- [Nd old] path/to/file.md
[cap at 15 items — add "...and N more" if over]
## 🟡 Incomplete Files (no headings, 5+ lines)
- path/to/file.md (N lines)
[cap at 15]
## 🟡 Duplicate Filenames
- **filename.md**
- path/one/filename.md
- path/two/filename.md
[cap at 15 duplicate names]
## 🟢 Empty Folders
- path/to/folder/
[cap at 15]
---
**What to do:**
- 🔴 Stale drafts: post them, delete them, or archive to `content/posted/`
- 🟡 Incomplete files: finish or trash
- 🟡 Duplicates: merge or rename the less important one
- 🟢 Empty folders: safe to delete (or keep if you're about to use them)
```
**3c. Print the summary to terminal:**
```
✅ Audit saved to: vault-audit/YYYY-MM-DD-audit.md
Summary:
🔴 [N] stale drafts
🟡 [N] incomplete files
🟡 [N] duplicate filenames
🟢 [N] empty folders
```
---
### PHASE 4: SELF-CRITIQUE
Before finalizing, check:
1. **All 4 checks ran** — Confirm output exists between each `=== CHECK N ===` / `=== END CHECK N ===` marker. If a check produced no output, note "0 issues found" in the report — do not skip the section.
2. **Counts are accurate** — The summary line counts must match the actual items listed in each section. Re-count if unsure.
3. **Report saved correctly** — Confirm the file exists at `vault-audit/YYYY-MM-DD-audit.md`. If the write failed, report the error and provide the report content inline.
4. **No blank sections** — Every section must either list items OR say "No issues found." Never leave a section header with nothing below it.
Fix any failures before delivering the final output.
---
## Example Report
```markdown
# Vault Cleanup Audit — 2026-03-01
Generated: 2026-03-01 08:14
**Summary:** 🔴 3 stale | 🟡 2 incomplete | 🟡 1 dupe | 🟢 2 empty
---
## 🔴 Stale Drafts (30+ days, unposted)
- [47d old] content/ready-to-post/linkedin/2026-01-12-ai-systems-post.md
- [38d old] content/ready-to-post/twitter/2026-01-21-founder-ops.md
- [31d old] content/ready-to-post/newsletter/2026-01-28-tools-roundup.md
## 🟡 Incomplete Files (no headings, 5+ lines)
- bambf/research/untitled-notes.md (23 lines)
- thinking/random-thoughts.md (11 lines)
## 🟡 Duplicate Filenames
- **README.md**
- bambf/brand/README.md
- bambf/tracking/README.md
## 🟢 Empty Folders
- content/queue/rejected/
- bambf/clients/archived/
---
**What to do:**
- 🔴 Stale drafts: post them, delete them, or archive to `content/posted/`
- 🟡 Incomplete files: finish or trash
- 🟡 Duplicates: merge or rename the less important one
- 🟢 Empty folders: safe to delete (or keep if you're about to use them)
```
---
## Requirements
- Claude Code with bash tool access
- Bash + standard Unix tools: `find`, `grep`, `wc`, `stat`, `date`, `awk`
- Read access to vault directory
- Write access to `vault-audit/` inside the vault (auto-created)
- No APIs, no paid services, no external dependencies
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.