memory-tidy

memory-tidy is a command for coding agents from tigu77/tiguclaw. It costs 34 tokens per session (590 once invoked), scanned A, original, Apache-2.0.

A command that reviews an assistant's memory index and proposes ways to merge duplicates, archive expired entries, and shorten descriptions. It does not automatically merge or permanently delete entries.

In plain words
What is it for?
Use it to measure the index, review a bounded set of cleanup candidates, prepare merge proposals, and request approval.
Why use it?
It reduces repeated and outdated memory while keeping a person in control of changes and preserving archived information for search and recovery.

Command

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 commands/tigu77/tiguclaw/memory-tidy
Clone the repo
git clone --depth 1 https://github.com/tigu77/tiguclaw

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/commands/tigu77/tiguclaw/memory-tidy.svg)](https://agentmods.dev/commands/tigu77/tiguclaw/memory-tidy)
Your own site
<a href="https://agentmods.dev/commands/tigu77/tiguclaw/memory-tidy"><img src="https://agentmods.dev/badge/commands/tigu77/tiguclaw/memory-tidy.svg" alt="Measured on agentmods" height="20"></a>
Per session 34 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 590 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.00034 $0.00590
Opus 5 $0.00017 $0.00295
Sonnet 5 $0.00007 $0.00118
Haiku 4.5 $0.00003 $0.00059

Measured yesterday against content hash 1f7d19876d11, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 yesterday.

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.

commands/memory-tidy.md · 30 lines

What it actually says

memory-tidy 스킬을 그대로 따라 메모리 인덱스를 정리하라.

범위: $ARGUMENTS

지켜야 할 것(스킬 §1 하드룰과 같다 — 여기 다시 적는 이유는 이 매크로만 읽고 시작할 수 있어야 하기 때문이다):

  • 지우지 마라. archive_memory 를 쓴다(인덱스에서만 내려가고 검색으로는 계속 찾히며 되돌릴 수 있다). delete_memory 는 이 작업에서 쓰지 않는다.
  • 자동으로 합치지 마라. 「이건 중복이다」가 틀리면 규칙이 조용히 사라진다 — 제안까지가 네 일이고 고르는 것은 사용자다.
  • 재고 나서 말하라. "많다"·"중복이다"는 바이트와 건수를 대고 하는 말이다.
  • 상시 규범과 사실을 다르게 다뤄라. 사실형(취미·기기·일정)은 잘려도 자가 회복된다 (관련 대화 → 검색 → access 상승 → 인덱스 복귀). 상시 규범은 회복이 안 된다 — 「자동 푸시 금지」는 push 얘기가 나와야 살아나는데 그때는 이미 늦다. 규범은 합치되 내리지 마라.
  • 자동 생성분(feedback_growth_*)은 손대지 마라 — self-growth 소유다. 개수·바이트만 보고.

한 번에 하는 일을 바운드하라 — 전수로 훑지 마라. list_memories 로 재고 인덱스 바이트 상위 25건까지만 본다. 본문은 최종 후보 몇 건에만 읽는다(첫 판이 197건 본문을 읽다가 16분 넘게 돌았다). 반복 실행이 전제다 — 이번에 앞줄을 줄이면 다음엔 그다음 줄이다.

보고는 이 순서로: ①현재 크기(바이트·건수) ②부류별 후보(중복/만료/과거관측, 각 크기) ③병합안(합칠 것 · 남길 이름 · 합친 한 줄 · 잃는 문장 없음을 확인) ④승인 요청.

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. yesterday First seen · 30 lines · 34 tokens per session scan A 1f7d19876d11

Subscribe to this mod's changes

memory-tidy is a command published in the GitHub repository tigu77/tiguclaw (6 stars, last pushed today), licensed Apache-2.0. It adds 34 tokens to every session and 590 once invoked, about $0.0002 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.