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 alexmond/alexmskills --skill memory-hygienegit clone --depth 1 https://github.com/alexmond/alexmskillsWrote 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/alexmond/alexmskills/memory-hygiene)<a href="https://agentmods.dev/skills/alexmond/alexmskills/memory-hygiene"><img src="https://agentmods.dev/badge/skills/alexmond/alexmskills/memory-hygiene/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/alexmond/alexmskills/memory-hygiene"><img src="https://agentmods.dev/badge/skills/alexmond/alexmskills/memory-hygiene.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 2 findings, 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 Rogue Agent · line 81 Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
- medium Rogue Agent · line 81 Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
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.00103 | $0.01457 |
| Opus 5 | $0.00051 | $0.00728 |
| Sonnet 5 | $0.00021 | $0.00291 |
| Haiku 4.5 | $0.00010 | $0.00146 |
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 9d 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 — 118 lines — stays where its author put it; the contents beside it link to each section on GitHub.
memory-hygiene
CLAUDE.md has evolving-claude-md; this governs the other half of the
context loaded every session — the per-project memory directory the agent
writes largely unsupervised. The failure modes differ, and that difference is
the whole design: bloat makes an agent ignore instructions; rot makes it
confidently recall something false. So where the sibling prunes down, this
one re-verifies and invalidates.
| evolving-claude-md | memory-hygiene | |
|---|---|---|
| Governs | CLAUDE.md + companions (repo-scoped, committed) |
~/.claude/projects/<slug>/memory/ (user-global, personal) |
| Author | human, agent proposes | agent, mostly unsupervised |
| Failure mode | bloat → ignored | rot → confident wrong recall |
| Pressure | prune down | re-verify / invalidate |
Both vendor the same freshness.py core, so "is this fact still true on
disk?" has exactly one implementation.
What the sweep checks (all grounded, nothing pattern-only)
The SessionStart hook runs audit-memory.py against the current repo's
memory dir. Silent when healthy; otherwise a 📇 banner lists rot candidates:
- Vanished artifact — a backticked path/class/flag
git grepcan no longer find, and that isn't a path on disk. Memory-specific filters first:--flags,<placeholders>,...-abbreviated paths, and paths rooted outside this tree (infra/secrets.mdcited from another repo is a pointer, not rot here) are never checked. Flagged at ≥2 missing tokens per file (min_missing_artifacts). - Stale version pin — memory states
jhelm 1.3.1,pom.xmlnow says1.5.0. Fires only when every parseable build-file spec contradicts the claim; release lines (4.1.x), examples, and struck-through lines stay silent. - Stale sequence fact — "latest is
V27" onceV28__*.sqlexists. - Index drift, both directions —
MEMORY.mdlines pointing at files that no longer exist, and memory files with no index line (invisible to recall).
Run it on demand for the full list:
What ships with it
4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 9d ago First seen · 118 lines · 103 tokens per session scan A 6a1a60476743
memory-hygiene is a skill published in the GitHub repository alexmond/alexmskills (6 stars, last pushed yesterday), licensed MIT. It adds 103 tokens to every session and 1,457 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.
Other skills, from other repositories
continuous-learning-v2
Instinct-based learning system that observes sessions via hooks, creates atomic instincts with confidence scoring, and evolves them into skills/commands/agents.
context-engineering
Manage, optimize, and debug Claude Code context windows. Use this skill whenever the user mentions context limits, context window, autocompaction, compaction firing, context rot, losing context mid-session, session degradation, running out of tokens, /compact, CLAUDEAUTOCOMPACTPCTOVERRIDE, context compression…
memory-persistence
Implement cross-session memory, persistent agent knowledge, and session continuity for Claude Code. Use this skill whenever the user wants Claude to remember things between sessions, asks how to avoid re-explaining context each day, wants to build a memory system for an agent, mentions CLAUDE.md memory, session files…
hive.note-taking
Maintain a free-form scratchpad of decisions, extracted values, and open questions so context pruning doesn't lose anything you still need.
security-compliance
Guides security professionals in implementing defense-in-depth security architectures, achieving compliance with industry frameworks (SOC2, ISO27001, GDPR, HIPAA), conducting threat modeling and risk assessments, managing security operations and incident response, and embedding security throughout the SDLC.
stride-analysis-patterns
Apply STRIDE methodology to systematically identify threats. Use when analyzing system security, conducting threat modeling sessions, or creating security documentation.