vault-cleanup-auditor

Audit your Obsidian vault in Claude Code — finds stale drafts, empty folders, duplicate filenames, and incomplete files. Saves a dated report.

214 stars

Best use case

vault-cleanup-auditor is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Audit your Obsidian vault in Claude Code — finds stale drafts, empty folders, duplicate filenames, and incomplete files. Saves a dated report.

Teams using vault-cleanup-auditor should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/vault-cleanup-auditor/SKILL.md --create-dirs "https://raw.githubusercontent.com/BrianRWagner/ai-marketing-claude-code-skills/main/vault-cleanup-auditor/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/vault-cleanup-auditor/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How vault-cleanup-auditor Compares

Feature / Agentvault-cleanup-auditorStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Audit your Obsidian vault in Claude Code — finds stale drafts, empty folders, duplicate filenames, and incomplete files. Saves a dated report.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 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 Skills

youtube-summarizer

214
from BrianRWagner/ai-marketing-claude-code-skills

Automatically fetch YouTube video transcripts, generate structured summaries, and send full transcripts to messaging platforms. Detects YouTube URLs and provides metadata, key insights, and downloadable transcripts.

voice-extractor

214
from BrianRWagner/ai-marketing-claude-code-skills

Extract and document someone's authentic writing voice from samples. Use when someone needs a "voice guide," wants to capture their writing DNA, or needs to train AI to write in their style. Also useful for ghostwriting, brand voice documentation, or onboarding writers.

tweet-draft-reviewer

214
from BrianRWagner/ai-marketing-claude-code-skills

Review tweet drafts in Claude Code against 8 voice rules. Scores 1-10, breaks down every rule, and rewrites anything that scores below 7.

testimonial-collector

214
from BrianRWagner/ai-marketing-claude-code-skills

Systematically gather, score, and format client testimonials. Use when someone needs social proof, wants to collect feedback, needs to turn happy clients into public advocates, or asks for help requesting or drafting a testimonial.

social-card-gen

214
from BrianRWagner/ai-marketing-claude-code-skills

Generate platform-specific social post variants (Twitter/X, LinkedIn, Reddit) from one source input. Works with or without Node.js script. Includes platform reasoning, quality review, and guardrails against cross-posting spam.

reddit-insights

214
from BrianRWagner/ai-marketing-claude-code-skills

Search and analyze Reddit content using semantic AI search via reddit-insights.com MCP server. Use when you need to: (1) Find user pain points and frustrations for product ideas, (2) Discover niche markets or underserved needs, (3) Research what people really think about products/topics, (4) Find content inspiration from real discussions, (5) Analyze sentiment and trends on Reddit, (6) Validate business ideas with real user feedback. Triggers: reddit search, find pain points, market research, user feedback, what do people think about, reddit trends, niche discovery, product validation.

newsletter-creation-curation

214
from BrianRWagner/ai-marketing-claude-code-skills

Industry-adaptive B2B newsletter creation with stage, role, and geography-aware workflows

meeting-prep-cc

214
from BrianRWagner/ai-marketing-claude-code-skills

Generate a pre-meeting prep brief in Claude Code. Researches participants, pulls vault context, builds agenda, surfaces sharp questions. Use when user says "prep for this meeting," "I have a call with," "meeting tomorrow with," or "prep brief for [name/company]."

marketing-principles

214
from BrianRWagner/ai-marketing-claude-code-skills

Apply timeless marketing and business principles to any problem. Use when someone needs strategic thinking, wants to evaluate a marketing decision, needs a framework for a tough choice, or mentions "first principles," "should I do X," "what would work here," or wants to think through a marketing problem systematically.

linkedin-profile-optimizer

214
from BrianRWagner/ai-marketing-claude-code-skills

Audit and rewrite your LinkedIn profile to attract the right people. Scores each section, rewrites headline and about copy, and includes an AI visibility checklist so you show up in ChatGPT, Perplexity, and Claude search. Use when someone says "optimize my LinkedIn," "LinkedIn profile help," "rewrite my about section," or "how do I show up in AI search."

linkedin-authority-builder

214
from BrianRWagner/ai-marketing-claude-code-skills

Build a LinkedIn content system for thought leadership. Use when someone needs to establish authority, attract inbound leads, or build a consistent content presence. Covers positioning, content pillars, formats, and posting rhythm.

last30days

214
from BrianRWagner/ai-marketing-claude-code-skills

Research any topic across Reddit, X, and web from the last 30 days. Get current trends, real community sentiment, and actionable insights in 7 minutes vs 2 hours manual research.