# Memory audit

> Memory audit is an open-source agent skill for knowledge and memory. Audits a MEMORY.md cache against memory rules and proposes a move plan before editing. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/awrshift/agent-memory-kit/tree/main/plugins/memory-kit/skills/memory-audit
- **Repository:** https://github.com/awrshift/agent-memory-kit
- **GitHub stars:** 33
- **License:** MIT
- **Skill name:** memory-audit
- **Collection:** https://github.com/awrshift/agent-memory-kit
- **Categories:** [knowledge and memory](https://ai-powered.com/categories/knowledge-and-memory)
- **Listing updated:** 2026-12-03

## About

Memory audit is a one-file cleanup pass for a project's hot memory cache. When the cache grows past its line or byte limits, or when session-dated blocks pile up, it reviews each section and assigns an action such as moving a settled pattern into a concept article, dropping a session chronicle, removing a restated rule, or replacing a copied number with a pointer to its source.

The skill works in stages. It first reads MEMORY.md along with the existing concept files, handoffs, project rules and any deferred list from a previous audit. It then presents the proposed changes as a table with line savings and projected sizes against the caps, and waits for approval. Only after approval does it apply the moves, leaving pointer lines where content is relocated, and then saves any declined candidates to a dated file under context/audits.

It relies on the Read, Grep and Glob tools and on edit permissions limited to the memory and knowledge directories. No scripts are included. The workflow assumes a project layout with .claude/memory, knowledge/concepts and context/handoffs, and it is shipped as part of the memory-kit Claude Code plugin.

## When your agent uses it

> Audit MEMORY.md against the memory discipline — oversized sections, settled multi-session patterns that belong in knowledge/concepts/, session-headed chronicle blocks, restated rules, copied numbers, stale entries. Produces a move plan as a table for approval, then executes the approved moves atomically. Use when the SessionStart hook reports a tripped cap or session-headed blocks, when PreCompact blocks on an oversized cache, or when the user says "/memory-kit:memory-audit", "audit memory", "проверь память", "почисти память". Refuses only when no cap is tripped, no session block is flagged AND no settled-pattern candidate exists.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/awrshift/agent-memory-kit/tree/HEAD/plugins/memory-kit/skills/memory-audit)
- [Asks for: Read, Grep, Glob, Edit(.claude/memory/**), Edit(knowledge/**)](https://github.com/awrshift/agent-memory-kit/blob/HEAD/plugins/memory-kit/skills/memory-audit/SKILL.md)
- [License: MIT](https://github.com/awrshift/agent-memory-kit/tree/HEAD/plugins/memory-kit/skills/memory-audit)

## Features

- **Section classification:** Every heading in the cache is assigned exactly one action, such as move, drop, keep or simplify.
- **Approval-first move plan:** Proposed changes appear as a table with line counts and projected sizes before any file is written.
- **Concept article creation:** Settled multi-session patterns are moved into knowledge concept files and added to the index.
- **Session chronicle cleanup:** Session-dated blocks are dissolved into topic lines or dropped, since handoffs already hold the narrative.
- **Duplicate rule detection:** Entries that repeat project rules or reference files are removed or reduced to a pointer.
- **Deferred candidate tracking:** Declined candidates are saved to a dated audit file so the next pass can pick them up.

## Good for

- Trim a MEMORY.md file that has hit its line or byte cap
- Move a recurring lesson from memory notes into a knowledge concept article
- Remove session-dated entries from the memory cache
- Replace copied prices or version numbers in memory with pointers to their source
- Remove memory entries that repeat what CLAUDE.md already says

## Install

### Claude Code

This skill ships in the `memory-kit` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add awrshift/agent-memory-kit
/plugin install memory-kit@memory-kit
```

Or copy only this skill to `~/.claude/skills/memory-audit`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/awrshift/agent-memory-kit.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/memory-audit &&
cp -R "$tmp/plugins/memory-kit/skills/memory-audit" ~/.claude/skills/memory-audit &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/memory-audit` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/memory-audit` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/awrshift/agent-memory-kit.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/memory-audit &&
cp -R "$tmp/plugins/memory-kit/skills/memory-audit" ~/.agents/skills/memory-audit &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/memory-audit` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/memory-audit` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/awrshift/agent-memory-kit.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/memory-audit &&
cp -R "$tmp/plugins/memory-kit/skills/memory-audit" ~/.cursor/skills/memory-audit &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/memory-audit` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/awrshift/agent-memory-kit.git --path plugins/memory-kit/skills/memory-audit
```

Or copy the folder to `~/.gemini/skills/memory-audit` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/memory-audit`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/awrshift/agent-memory-kit.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/memory-audit &&
cp -R "$tmp/plugins/memory-kit/skills/memory-audit" ~/.copilot/skills/memory-audit &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/memory-audit` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/awrshift/agent-memory-kit.git
```

Then copy `agent-memory-kit/plugins/memory-kit/skills/memory-audit` into your agent's skills folder as `memory-audit`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When does the skill trigger?

It is meant for when the SessionStart hook reports a tripped cap or session-headed blocks, when PreCompact blocks on an oversized cache, or when the user asks to audit memory.

### Does Memory audit change files without asking?

No. It must present a move plan and wait for explicit approval before any writes.

### When does Memory audit refuse to run?

It refuses only when no cap is tripped, no session block is flagged and no settled-pattern candidate exists.

### Which files can Memory audit edit?

Its allowed edit scope is limited to the .claude/memory directory and the knowledge directory.

### How do I install Memory audit in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/memory-audit to use it in all your projects, or to .claude/skills/memory-audit in one project. Or install the memory-kit plugin, which includes it: /plugin marketplace add awrshift/agent-memory-kit, then /plugin install memory-kit@memory-kit.

### Does Memory audit run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Memory audit?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Memory audit?

The closest alternatives to Memory audit are Memory review, Recap, Memory sync, Claude mem and Close session.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Memory review](https://ai-powered.com/skills/memory-review): Memory review is an open-source agent skill for knowledge and memory.
- [Recap](https://ai-powered.com/skills/recap-onebrain-ai): Recap is an open-source agent skill for knowledge and memory.
- [Memory sync](https://ai-powered.com/skills/memory-sync): Memory sync is an open-source agent skill for knowledge and memory.
- [Claude mem](https://ai-powered.com/skills/claude-mem-smartworldarafath): Claude mem is an open-source agent skill for knowledge and memory.
- [Close session](https://ai-powered.com/skills/close-session): Close session is an open-source agent skill for knowledge and memory.
- [Memory](https://ai-powered.com/skills/memory-chachamaru127-2): Memory is an open-source agent skill for knowledge and memory.
- [Learn](https://ai-powered.com/skills/learn): Learn is an open-source agent skill for knowledge and memory.
- [Compound memory](https://ai-powered.com/skills/compound-memory-protocol-zero-0): Compound memory is an open-source agent skill for knowledge and memory.

---
Source: https://ai-powered.com/skills/memory-audit
