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.
npx skills add tonydzi/second-brain-starter-kit --skill memory-tidygit clone --depth 1 https://github.com/tonydzi/second-brain-starter-kitWrote 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.
[](https://agentmods.dev/skills/tonydzi/second-brain-starter-kit/memory-tidy)<a href="https://agentmods.dev/skills/tonydzi/second-brain-starter-kit/memory-tidy"><img src="https://agentmods.dev/badge/skills/tonydzi/second-brain-starter-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.
<a href="https://agentmods.dev/skills/tonydzi/second-brain-starter-kit/memory-tidy"><img src="https://agentmods.dev/badge/skills/tonydzi/second-brain-starter-kit/memory-tidy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00078 | $0.02348 |
| Opus 5.5 | $0.00031 | $0.00939 |
| Sonnet 5.5 | $0.00016 | $0.00470 |
| Haiku 4.5 | $0.00008 | $0.00235 |
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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 126 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Memory Tidy — уборка всегда-загружаемого индекса
MEMORY.md грузится в КАЖДУЮ сессию. Это не файл, это аренда, которую платишь на каждом ходу.
Харнес молча режет хвост за 25 КБ: распухший индекс не «чуть хуже» — он теряет память без
единого сообщения об ошибке. Поэтому уборка здесь — не гигиена, а сохранность.
Паспорт детали: ~/.claude/scripts/_doc_memory_tidy.md. Тело рельсы: memory_tidy.sh.
Когда запускать
- сторож сказал RED (
memory_guard.py); - индекс подошёл к мягкой черте (15 КБ / 110 строк);
- руками — когда захотелось порядка;
- ночью само: launchd
ai.paloalto.memory-tidy, 01:10 и 05:40 по локальному времени.
Шаг 0 — ВЛАДЕНИЕ (пропустить = устроить sync-conflict)
python3 ~/.claude/scripts/memory_tidy_scope.py --explain
~/.claude/projects/ держит три разных вещи, и они выглядят одинаково:
свои индексы · синкнутые байт-в-байт копии, которыми владеет другой узел · одноразовые ворктри.
Написать в чужой = два писателя на один файл = потерянная чья-то память. Область объявляется в
memory_tidy_scope.json, никогда не угадывается. Незнакомый узел → выход 3 громко, не тишина.
Шаг 1 — посмотреть, что вообще есть
sh ~/.claude/scripts/memory_tidy.sh --dry-run --force
Печатает вердикт детекторов и рендерит промпт, ничего не меняя. Промпт стоит прочитать глазами — это то, по чему будет действовать модель.
Шаг 2 — механическое, без модели (0 токенов)
python3 ~/.claude/scripts/memory_orphan_cover.py --dry-run # сироты → указатели в архив
python3 ~/.claude/scripts/memory_orphan_cover.py
Сирота — это не потерянные данные, это недостижимые данные, что при recall одно и то же:
файл на диске есть, ссылки нет, ни одна сессия его никогда не поднимет. Указатели идут в
MEMORY-archive.md, который НЕ грузится, — покрытие стоит 0 живого бюджета.
Хук берётся из description: самой заметки, поэтому скрипт не выдумывает: он переписывает.
Шаг 2-бис — забрать память из сессионных папок (0 токенов, узлы с ворктри)
python3 ~/.claude/scripts/memory_harvest.py --scan # только читает
python3 ~/.claude/scripts/memory_harvest.py --harvest --dry-run # что бы записал
python3 ~/.claude/scripts/memory_harvest.py --harvest
Заметку, написанную сессией ворктри, кладут в ЕЁ папку проекта, и домашний индекс о ней не знает.
Для домашней сессии такой заметки просто не существует — это та же недостижимость, что и сирота,
только этажом выше. Жатка копирует её домой (оригинал остаётся на месте) и вешает указатель
в MEMORY-archive.md.
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.
- 1mo ago Changed e3842a826ac3
- 1mo ago Changed · -1 lines 41a5f8a621f6
- 2mo ago Changed · +1 lines · -43 tokens per session 27cb95d3d07d
- 2mo ago Changed · +13 lines fe3b9e6efe15
- 2mo ago First seen · 113 lines · 121 tokens per session scan A 7054dfaf704f
memory-tidy is a skill published in the GitHub repository tonydzi/second-brain-starter-kit (16 stars, last pushed today), licensed MIT. It adds 78 tokens to every session and 2,348 once invoked, about $0.0003 per session on Opus 5.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-24.
memory-tidy compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| memory-tidytonydzi/second-brain-starter-kit | Skill | 16 | today | MIT | A | 78 | Claude Code |
| obsidian-basesAgriciDaniel/claude-obsidian | Skill | 17k | yesterday | MIT | A | 75 | Claude Code |
| saveAgriciDaniel/claude-obsidian | Skill | 17k | yesterday | MIT | A | 80 | Claude Code |
| wiki-retrieveAgriciDaniel/claude-obsidian | Skill | 17k | yesterday | MIT | A | 99 | Claude Code |
| wiki-foldAgriciDaniel/claude-obsidian | Skill | 17k | yesterday | MIT | A | 76 | Claude Code |
| wiki-modeAgriciDaniel/claude-obsidian | Skill | 17k | yesterday | MIT | A | 83 | Claude Code |
| wiki-cliAgriciDaniel/claude-obsidian | Skill | 17k | yesterday | MIT | A | 95 | Claude Code |