- Home
- Skills
- Productivity
- Agent Memory Hygiene
Agent Memory Hygiene
Clean, dedupe, prune and de-secret CLAUDE.md/AGENTS.md memory, with a stdlib linter.
Free
Works with the AI Agents you already use
About this skill
Memory files rot the same way every time: duplicates pile up, an old fact contradicts a new one, someone pastes an API key "just for now", and a project that ended in spring still steers every answer. This skill is the maintenance routine: where things go, how to settle conflicts, what never goes in, and a linter that finds the problems for you.
It is not an audit-only report. It ends with edited files (after the user approves the diff) and a dated review entry.
| Agent | User-level | Project-level | Notes |
|---|---|---|---|
| Claude Code | ~/.claude/CLAUDE.md, ~/.claude/rules/*.md | ./CLAUDE.md or ./.claude/CLAUDE.md, ./CLAUDE.local.md (personal; add it to .gitignore yourself), .claude/rules/*.md, subdir CLAUDE.md (loaded on demand) | @path imports pull other files in; check them too. Auto memory lives in ~/.claude/projects/<project>/memory/MEMORY.md + topic files. Reads AGENTS.md only when no CLAUDE.md/CLAUDE.local.md is on the path (default setting) |
| Codex CLI | ~/.codex/AGENTS.override.md, else ~/.codex/AGENTS.md ($CODEX_HOME if set) | per directory from repo root down to cwd: AGENTS.override.md, else AGENTS.md, else names in project_doc_fallback_filenames | one file per directory; all are concatenated root-first, so closer files read last and win. An override replaces the AGENTS.md beside it. Combined cap project_doc_max_bytes (32 KiB default) |
| OpenCode | ~/.config/opencode/AGENTS.md (falls back to ~/.claude/CLAUDE.md) | AGENTS.md found walking up from cwd (falls back to CLAUDE.md if none) | instructions paths/globs/URLs in opencode.json add files |
| Cursor | User Rules (Settings, synced), ~/.cursor/rules (local) | .cursor/rules/**/*.mdc (plain .md there is ignored), AGENTS.md at root and in subdirs | Legacy .cursorrules still loads but is being deprecated. The old Memories feature was removed in 2.1.x; exported memories become rules |
| Gemini CLI | ~/.gemini/GEMINI.md | GEMINI.md in workspace dirs and their parents, plus just-in-time in subdirs a tool touches | /memory show prints the merged context, /memory reload rescans. The agent saves memories by editing these markdown files (and a per-project private memory folder). context.fileName in settings.json can rename the file (e.g. AGENTS.md). Note: for unpaid-tier and Google One users, Gemini CLI was replaced by Antigravity CLI (see geminicli.com). |
| Grok Bot | native memory (see section 8) | project/store files the bot keeps | not a file you edit directly |
Paths change between releases. Confirm with the agent's own command
(/memory or /context in Claude Code, /memory show in Gemini CLI) before editing. List every file that
actually loads, including imports, and note which are committed to git:
committed files are shared with everyone who clones the repo.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Productivity.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 19 days ago
- Free with an Agensi account
- Software
Python