memory-hygiene

memory-hygiene is a skill for Claude Code from huytieu/COG-second-brain. It costs 40 tokens per session (130 once invoked), scanned A, original, MIT.

A routine for checking saved memory and knowledge notes against the current environment.

In plain words
What is it for?
Use it to review persistent notes, update their verification details, and find information that has drifted over time.
Why use it?
It identifies claims that may no longer be true, records when they were checked and how reliable they are, and suggests outdated notes for archiving.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths; installed under .agents/ (shared by several agents).

Part of the COG-second-brain plugin — 33 skills, 10 agents shipped together

Good fit Use it to review persistent notes, update their verification details, and find information that has drifted over time.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/huytieu/cog-second-brain/memory-hygiene
About the project

COG is an AI-assisted second brain that stores knowledge in Markdown files and uses agents, skills, and version control to evolve it over time. It helps people manage knowledge and contacts while supporting several coding-agent tools; the catalogue entries are COG’s skills, agents, instructions, rules, and plugin surfaces.

huytieu/COG-second-brain · 1,175 stars · on GitHub

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 huytieu/COG-second-brain --skill memory-hygiene
Clone the repo
git clone --depth 1 https://github.com/huytieu/COG-second-brain

Made for: Claude Code.

Or install COG-second-brain, the plugin that ships this one along with the rest of its 33 skills, 10 agents.

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-hygiene

README.md
[![agentmods](https://agentmods.dev/badge/skills/huytieu/cog-second-brain/memory-hygiene.svg)](https://agentmods.dev/skills/huytieu/cog-second-brain/memory-hygiene)
Your own site
<a href="https://agentmods.dev/skills/huytieu/cog-second-brain/memory-hygiene"><img src="https://agentmods.dev/badge/skills/huytieu/cog-second-brain/memory-hygiene.svg" alt="Measured on agentmods" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 130 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Agent Snooping · line 6
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
How audits are shown
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.00040 $0.00130
Opus 5 $0.00020 $0.00065
Sonnet 5 $0.00008 $0.00026
Haiku 4.5 $0.00004 $0.00013

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

Security

Grade A, and why

memory-hygiene 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 8d 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.

.agents/skills/memory-hygiene/SKILL.md · 11 lines

What it actually says

Read .claude/skills/memory-hygiene/SKILL.md and execute it exactly as written — that file is the authoritative playbook. Then follow .agents/rules/cog.md.

Antigravity substitution: where the playbook delegates to a .claude/agents/<name> worker, invoke .agents/agents/<name>.md via invoke_subagent instead.

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. 8d ago First seen · 11 lines · 40 tokens per session scan A 7e5448a1faf8

Subscribe to this mod's changes

memory-hygiene is a skill published in the GitHub repository huytieu/COG-second-brain (1,175 stars, last pushed 13d ago), licensed MIT. It adds 40 tokens to every session and 130 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-08-30.

Related

Other skills, from other repositories

memory

Persistent memory system for the agent. Two-tier storage: user (/.agents/memory/MEMORY.md) and project ( /MEMORY.md). Five memory networks: experiences, world knowledge, beliefs, reflections, entity summaries. Task closure ("we're done", etc.) triggers a mandatory task-done memory sweep (remember subagents per…

fcarucci/agentic-memory · 105 tokens

task-agent-eliza-bridge

Use when spawning a Claude Code, Codex, Gemini, Aider, or other CLI task agent whose work needs parent Eliza runtime context. Covers the read-only loopback bridge for character, room, memory, and active workspace state.

elizaOS/eliza · 55 tokens

kb-builder

Build an Obsidian-compatible knowledge base from public web sources using the TinyFish CLI. Use this skill when a user wants a builder-grade markdown knowledge base on a technical topic, asks for a structured research vault, or wants a topic compiled from live public sources into interlinked markdown files. Supports…

tinyfish-io/tinyfish-cookbook · 158 tokens

karpathy-llm-wiki

Use when building or maintaining a personal LLM-powered knowledge base. Triggers: ingesting sources into a wiki, querying wiki knowledge, linting wiki quality, 'add to wiki', 'what do I know about', or any mention of 'LLM wiki' or 'Karpathy wiki'.

Astro-Han/karpathy-llm-wiki · 67 tokens

project-context

Use PowerContext project memory and handoff tools through MCP when continuing prior work, recalling decisions, maintaining durable memory, or transferring work across tasks, sessions, or agents.

oceanbase/powercontext · 37 tokens

init

Install or update OwnMem in the current repository. Use when the user asks to set up OwnMem, add local project memory for coding agents, or refresh an existing OwnMem installation after a version bump.

grpcer/ownmem · 43 tokens