Skip to content

Import skill: deduplicating-vault (Obsidian vault deduplication) #94

Description

@randlee

Skill Import Request

Skill name: deduplicating-vault
Agent: vault-duplicate-scan
Script: find_vault_duplicates.py

Local path (source)

.claude/skills/deduplicating-vault/
├── SKILL.md
└── scripts/
    ├── find_vault_duplicates.py
    └── tests/
        └── test_find_vault_duplicates.py

.claude/agents/vault-duplicate-scan.md
.claude/agents/registry.yaml

Full path on disk: /Users/randlee/Documents/one/.claude/skills/deduplicating-vault/

What it does

Scans an Obsidian vault for:

  1. Failed clips — Obsidian Clipper stubs with title but no body, matched against a real copy via normalized title similarity
  2. Exact duplicates — identical body content (SHA-256 hash), different frontmatter
  3. Near-duplicates — body similarity ≥ 80% (configurable) via difflib.SequenceMatcher

Reports findings grouped by type with per-item recommendations:

  • Which file to keep (prefers organized folder > Clippings/, richer tags, older created date, longer body)
  • Tags to merge from deleted copy into keeper
  • Folder placement recommendation (CORRECT_LOCATION / MOVE_RECOMMENDED / UNCERTAIN_LOCATION)

User approves actions; no auto-delete.

Interface

/deduplicating-vault                        # full scan, defaults
/deduplicating-vault --threshold=0.9        # stricter match
/deduplicating-vault --folder=Claude/       # scope to subfolder
/deduplicating-vault --format=json          # raw JSON output

Architecture

  • No external dependencies — Python stdlib only (difflib, hashlib, pathlib, json, argparse, re)
  • Pure functions — all core logic independently unit testable; I/O only at load_vault_files()
  • Session-scoped hash index — SHA-256 index built in-memory at startup, discarded on exit
  • quick_ratio() pre-filter — eliminates low-similarity pairs before full SequenceMatcher.ratio() (~3× speedup)
  • Fenced JSON agent output — conforms to claude-code-skills-agents-guidelines v0.7
  • 27 unit tests — all pure functions tested with in-memory strings, no vault access

Guidelines conformance

Architecture follows: synaptic-canvas/docs/claude-code-skills-agents-guidelines.md (v0.7)

Convention Value
Skill name (gerund) deduplicating-vault
Agent name (noun-verb) vault-duplicate-scan
Agent output fenced JSON
Registry entry registry.yaml (included)
External deps none
Unit tests 27 (all pass)

Request

Import this skill into the Synaptic Canvas Obsidian plugin marketplace so it can be discovered and installed via gh skill install or equivalent marketplace tooling.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions