find-stale-notes

find-stale-notes is a skill for Claude Code, Codex from owrede/vault-memory. It costs 104 tokens per session (1,594 once invoked), scanned A, original, MIT.

A cleanup tool that finds old Obsidian notes with no links from other notes. Backlinks are references pointing to a note from elsewhere in the vault.

In plain words
What is it for?
Use it to review possible stale, unused, or orphaned notes. For each result, you can choose to archive, update, delete, skip, or leave it unchanged.
Why use it?
It narrows down notes that may be abandoned without automatically changing or deleting anything.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/owrede/vault-memory/find-stale-notes
Any agent
npx skills add owrede/vault-memory --skill find-stale-notes
Clone the repo
git clone --depth 1 https://github.com/owrede/vault-memory

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for find-stale-notes

README.md
[![agentmods](https://agentmods.dev/badge/skills/owrede/vault-memory/find-stale-notes.svg)](https://agentmods.dev/skills/owrede/vault-memory/find-stale-notes)
Your own site
<a href="https://agentmods.dev/skills/owrede/vault-memory/find-stale-notes"><img src="https://agentmods.dev/badge/skills/owrede/vault-memory/find-stale-notes.svg" alt="Measured on agentmods" height="20"></a>
Per session 104 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,594 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00104 $0.01594
Opus 5 $0.00052 $0.00797
Sonnet 5 $0.00021 $0.00319
Haiku 4.5 $0.00010 $0.00159

Measured 4d ago against content hash 260a50336699, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

find-stale-notes scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/find-stale-notes/SKILL.md · 122 lines

How it starts

The opening of the file, as written. The whole thing — 122 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/find-stale-notes — Discover Abandoned Notes

A vault-cleanup aid. Identifies notes that are old AND have nothing linking to them — the most likely candidates for archive/delete. Conservative by default (moderate criteria, see below); presents candidates as a table; never deletes without explicit per-note confirmation.

When to invoke

  • User runs /find-stale-notes (primary)
  • User says "stale notes", "unused notes", "orphan notes", "veraltete Notes", "Notes aufräumen", "find orphans", "what can I delete?"
  • After a vault-import to surface notes that didn't get re-linked

Stale criteria (moderate by default)

A note is a stale candidate when BOTH hold:

  1. mtime older than 6 months (180 days) before now
  2. list_backlinks(path).length === 0 — no other note in any vault links to it

Optional tighten/loosen via the first user message:

  • "konservativ" / "conservative" → require also tags.length === 0 AND frontmatter === null
  • "aggressiv" / "aggressive" → relax to 3 months + 0 backlinks (warn user about higher false-positive rate)

Requirements

  • mcp__vault-memory__* tools available
  • Vault registered, recently indexed (suggest a save if indexed_at is >7d old)

Workflow

Phase 1 — Candidate gathering

  1. Choose target vault. If multiple vaults are configured: ask "audit which vault?" (default: active vault from env, else all).
  2. Fetch ALL notes via query_frontmatter({where: {path: {$exists: true}}, limit: 2000}) — this returns every note in the vault since every note has a path. Sort the result by mtime ascending (oldest first).
  3. Compute the cutoff: cutoff = now - 180 * 24 * 60 * 60 * 1000 (ms epoch).
  4. Filter to notes with mtime < cutoff. If 0 candidates: report "no notes older than 6 months — nothing to triage" and exit.
  5. For each remaining candidate, call mcp__vault-memory__list_backlinks({vault, path}). Keep only those with backlinks.length === 0.
  6. Produce the candidate table.

Phase 2 — Present the table

Read the full file on GitHub · 122 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 122 lines · 104 tokens per session scan A 260a50336699

Subscribe to this mod's changes

find-stale-notes is a skill published in the GitHub repository owrede/vault-memory (0 stars, last pushed 26d ago), licensed MIT. It adds 104 tokens to every session and 1,594 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

media-ingest

Ingest video, audio, PDF, book, screenshot, and GitHub repo content into the brain. Multi-format handling with entity extraction and backlink propagation. Covers video-ingest, youtube-ingest, and book-ingest subtypes.

garrytan/gbrain · 52 tokens

mem0-oss-to-platform

Plan and then execute a migration of a project from the mem0 open-source / self-hosted SDK (the local Memory class) to the mem0 Platform / hosted / managed SDK (the MemoryClient class). Use this whenever a developer wants to move, switch, or migrate their mem0 usage off OSS/self-hosted to the hosted API — e.g.…

mem0ai/mem0 · 273 tokens

Cortex

Operate Cortex, the LifeOS memory system — the typed Knowledge Archive (People, Companies, Ideas, Research with typed related: links) plus recall of prior work sessions, ISAs, and conversations. Search, add, harvest, develop, ingest, distill, graph-navigate, recall. USE WHEN cortex, knowledge, knowledge base, search…

danielmiessler/LifeOS · 196 tokens

agent-memory

../../../engineering/agent-memory/skills/agent-memory/SKILL.md.

alirezarezvani/claude-skills · 0 tokens

memory

Use when the user asks to remember, recall, forget, update, search, or inspect durable OpenSquilla memory, including profile facts in USER.md and long-term notes in MEMORY.md or memory//.md.

opensquilla/opensquilla · 44 tokens

ha-data-stores

Map of Hope Agent's local data stores and safe read-only query workflow. Use when the user asks where Hope Agent stores data, wants to inspect sessions/messages/memory/logs/background jobs/knowledge indexes/settings, asks the model to query local app data, or debugging requires checking persisted state. Trigger…

shiwenwen/hope-agent · 115 tokens