skills/obsidian-attachment-janitor/SKILL.md
Clean up and organize the Attachments folder in the Obsidian vault. Finds and deletes unreferenced attachments, renames referenced ones with a date-prefixed, descriptive naming convention. Use this skill when the user mentions cleaning up attachments, finding unused images, organizing files, renaming attachments, or any variation of "附件清理", "整理附件", "清理图片", "附件重命名".
npx skillsauth add plimeor/agent-skills obsidian-attachment-janitorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Clean up and organize attachments in the Obsidian vault. Two jobs:
YYYY-MM-DD description.ext
YYYY-MM-DD portion only (ignore time like 1230 in 2026-03-09 1230 ...)When the same note embeds multiple attachments, differentiate by what each one depicts, not by index number. Read the surrounding text to understand each attachment's role.
Example — a blog post note 2026-03-09 1230 让 AI 接管笔记维护.md embeds 4 images:
| Original | New |
|---|---|
| Gemini_Generated_Image_5tv8tg5tv8tg5tv8.png | 2026-03-09 ai-note-maintenance-cover.png |
| Gemini_Generated_Image_fdvb4qfdvb4qfdvb.png | 2026-03-09 agent-system-overview.png |
| CleanShot 2026-03-09 at [email protected] | 2026-03-09 pr-diff-screenshot.png |
| CleanShot 2026-03-10 at [email protected] | 2026-03-10 sentinel-report-screenshot.png |
Notice the last one uses 2026-03-10 — the date comes from the attachment's own CleanShot timestamp when it differs from the note date and is clearly identifiable. Prefer the note's date when in doubt.
Attachments/.md files for ![[filename]] embeds
.agents/skills/ — documentation examples, not real references![[file.png|300]] → file.png, ![[file.png|alt text]] → file.pngattachment filename → [referencing note paths]YYYY-MM-DD in filename → candidate for renamePrivate/Career/Portfolio/ notes) → skip rename, keep as-isFor each datable attachment:
YYYY-MM-DD from the note filenameSkip if the attachment already matches the convention.
Show the user three lists:
current name → new name with the referencing note for contextWait for explicit user confirmation before executing anything.
Use the Obsidian CLI for both operations — it handles reference updates automatically.
For deletions:
obsidian delete path="Attachments/filename.png" permanent
For renames:
obsidian rename path="Attachments/old-name.png" name="new-name.png"
Always use path= instead of file= — the file= parameter resolves like a wikilink and fails on filenames with special characters (spaces, @, underscores, hashes).
Run a quick scan to confirm no broken embed references were introduced. Report summary: X deleted, Y renamed, Z skipped.
tools
Decide whether and how to use authorized sub-agents, then coordinate delegated work while preserving the main agent's context. Use when the user asks for orchestration, parallel agents, delegation, background workers, context isolation, or when another skill needs delegated research, review, implementation, or verification. Owns host-policy checks, delegation packets, non-overlap, report verification, and stop rules. Do not use to bypass tool policy, infer user authorization, or add coordination overhead to simple single-threaded tasks.
development
Use before finalizing a non-trivial answer, recommendation, review, or decision to reconsider it and raise its quality, especially when shallow reasoning, context inertia, false framing, overconfidence, unfit analogy transfer, or an obvious-but-missed defect could distort the result. Trigger especially before applying external evidence, familiar frameworks, or comparisons to the user's specific request, and when the user asks to reconsider, double-check, take a second look, or sanity-check an answer. Reconsider the draft against its most likely failure mode, and use independent scrutiny only when it is useful and authorized.
development
Review concrete code plan drafts, specs, diffs, and implementation shapes. Use for code-review requests, serious code-plan design critique, and judging whether a proposed direction is sound. Prioritize solution direction, premise validity, logic chain, constraints, alternatives, design shape, contracts, tests, local fit, and actionable findings. Near miss: use code-plan to create or revise plans; use code-scope-gate for pre-spec scope shaping.
development
Write evidence-backed coding plans for implementation, debugging, refactoring, migrations, design parity work, and long-running agent tasks. Use when defining, clarifying, refining, or validating a development plan, /goal prompt, implementation approach, scope and non-goals, work sequence, acceptance criteria, regression evidence, verification strategy, or stop condition. Near miss: use code-review when judging an existing diff, spec, or already drafted plan rather than drafting or revising a plan. Also use when the user says `design twice` after a plan and wants an APOSD-style second-design pass over the completed plan.