memory-tidy

memory-tidy is a skill for Claude Code from dwarvesf/dwarves-kit. It costs 113 tokens per session (880 once invoked), scanned A, original, MIT.

A cleanup audit for a repository's stored memory notes and their index.

In plain words
What is it for?
Scan a .claude/memory store, compare its files with MEMORY.md, group notes for review, and prepare cleanup changes through a pull request.
Why use it?
It finds duplicate or stale notes, broken path references, and index entries that are missing files or omit notes that exist.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md.

Part of the kit plugin — 11 skills, 39 commands, 31 agents, 10 hooks shipped together

Good fit Scan a .claude/memory store, compare its files with MEMORY.md, group notes for review, and prepare cleanup changes through a pull request.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dwarvesf/dwarves-kit/memory-tidy
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.

Any agent
npx skills add dwarvesf/dwarves-kit --skill memory-tidy
Clone the repo
git clone --depth 1 https://github.com/dwarvesf/dwarves-kit

Made for: Claude Code.

Or install kit, the plugin that ships this one along with the rest of its 11 skills, 39 commands, 31 agents, 10 hooks.

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 memory-tidy

README.md
[![agentmods](https://agentmods.dev/badge/skills/dwarvesf/dwarves-kit/memory-tidy/github.svg)](https://agentmods.dev/skills/dwarvesf/dwarves-kit/memory-tidy)
Your own site
<a href="https://agentmods.dev/skills/dwarvesf/dwarves-kit/memory-tidy"><img src="https://agentmods.dev/badge/skills/dwarvesf/dwarves-kit/memory-tidy/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for memory-tidy

Your own site · 80×15
<a href="https://agentmods.dev/skills/dwarvesf/dwarves-kit/memory-tidy"><img src="https://agentmods.dev/badge/skills/dwarvesf/dwarves-kit/memory-tidy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 113 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 880 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00113 $0.00880
Opus 5 $0.00056 $0.00440
Sonnet 5 $0.00023 $0.00176
Haiku 4.5 $0.00011 $0.00088

Measured 5d ago against content hash c60bdb3d965c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

memory-tidy 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 5d 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/memory-tidy/SKILL.md · 46 lines

How it starts

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

Memory tidy

Overview

Audit a repo's git-tracked .claude/memory/ store and ship the cleanup as a PR. Core principle: every verdict cites checkable evidence, and deletions reach main only through a PR merge, the PR is the operator's approval gate, so the audit itself never needs to ask permission.

This is the judgment half of the kit's memory plane. The mechanical half is stats memory-sweep (lib/stats, SPEC-136): a read-only scanner that never writes. This skill consumes its output and is the only path that edits a store, always behind a PR.

Process

  1. Branch in a worktree first (native worktree tool). All edits and deletions ride this branch. Touching the store on the current branch is the failure this skill exists to prevent.

  2. Mechanical pre-pass. Run uv run stats memory-sweep from the kit's lib/stats/ and filter its JSON for this repo's store: dead path refs per note, stale index entries. Always also diff both directions: the note files on disk vs the entries in MEMORY.md (files not indexed are invisible to sessions; entries with no file are ghosts).

  3. Fan-out judgment. Split the notes into 2-4 subsystem clusters (roughly one cluster per 40 notes; a tiny store is audited directly) and dispatch parallel read-only agents. Each agent reads every note in its cluster fully and returns, per note: a 1-line gist plus one verdict:

    Verdict Required evidence
    KEEP distinct fact, referents spot-checked alive
    MERGE into <sibling> quote the overlapping claim from both notes
    STALE concrete reason: referenced path tested and gone, superseded by a NAMED doc/ADR/newer note, the event concluded (PR merged, tool graduated), or the rule now codified verbatim in an always-loaded file (CLAUDE.md)
    UNSURE what only the operator can answer

    A verdict with no checkable evidence is not actionable: re-check it or downgrade to UNSURE. UNSURE notes are never deleted; list them in the report.

Read the full file on GitHub · 46 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. 5d ago First seen · 46 lines · 113 tokens per session scan A c60bdb3d965c

Subscribe to this mod's changes

memory-tidy is a skill published in the GitHub repository dwarvesf/dwarves-kit (11 stars, last pushed today), licensed MIT. It adds 113 tokens to every session and 880 once invoked, about $0.0006 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-09-04.

Related

Other skills, from other repositories

agents-md-improver

Audit and improve project-rules files (AGENTS.md, CLAUDE.md, .agents/instructions, local overrides) so the agent keeps accurate project context. Use when the user asks to check, audit, review, update, improve, or fix their AGENTS.md or CLAUDE.md, mentions "project rules maintenance" or "agent context optimization", or…

waybarrios/opencode-power-pack · 125 tokens

agents-md-revise

Capture learnings from the current session into the project-rules file (AGENTS.md, CLAUDE.md, or local override) so future sessions benefit. Use when the user says "revise the rules", "update AGENTS.md / CLAUDE.md with what we just learned", "save this to project memory", "remember this for next time", or at the end…

waybarrios/opencode-power-pack · 114 tokens

ln-31-performance-optimizer

Profiles and improves a measured latency, throughput, CPU, memory, or I/O problem. Not for speculative tuning or cosmetic refactoring.

levnikolaevich/claude-code-skills · 34 tokens

feature-knowledge

Structures codebase exploration into a feature knowledge base.

dean0x/devflow · 13 tokens

performance

This skill should be used when reviewing code for N+1 queries, memory leaks, or I/O bottlenecks.

dean0x/devflow · 26 tokens

rust

This skill should be used when the user works with Rust files (.rs), asks about "ownership", "borrowing", "lifetimes", "Result/Option", "traits", or discusses memory safety and type-driven design. Provides patterns for ownership, error handling, type system usage, and safe concurrency.

dean0x/devflow · 63 tokens