---
name: Memory Audit
slug: memory-audit-2
category: Automation
description: Memory Audit scans .ijfw/memory files, classifies them by recency, and reports stale or archive candidates. Use it to review memory bloat before moving unused entries to archive.
github: "https://github.com/FerroxLabs/ijfw/tree/main/claude/skills/ijfw-memory-audit"
language: JavaScript
stars: 210
forks: 40
install: "npx degit https://github.com/FerroxLabs/ijfw/tree/main/claude/skills/ijfw-memory-audit ~/.claude/skills/ijfw-memory-audit"
installs_to: ~/.claude/skills/ijfw-memory-audit
source_path: claude/skills/ijfw-memory-audit/SKILL.md
collection_size: 25
category_size: 1860
collection_url: "https://dirskills.com/collections/FerroxLabs/ijfw"
added: 2026-09-04T05:26:36.418Z
last_synced: 2026-09-04T05:26:36.418Z
canonical_url: "https://dirskills.com/skills/memory-audit-2"
---

# Memory Audit

Memory Audit scans .ijfw/memory files, classifies them by recency, and reports stale or archive candidates. Use it to review memory bloat before moving unused entries to archive.

**Install:**

```bash
npx degit https://github.com/FerroxLabs/ijfw/tree/main/claude/skills/ijfw-memory-audit ~/.claude/skills/ijfw-memory-audit
```

## README

## Execution

1. Call `ijfw_metrics` to get counts and last-update timestamps for all tiers.

2. Scan `.ijfw/memory/` for all `.md` files. For each, note:
   - File name, size (lines), last modified date.
   - Days since last referenced (use file mtime as proxy).

3. Categorize entries:

```
ACTIVE  -- referenced within 30 days
STALE   -- not referenced in 30-90 days
ARCHIVE -- not referenced in 90+ days, or flagged as superseded
```

4. Report:

```
MEMORY HEALTH REPORT
  Total entries: <N>  |  Total size: ~<X> lines
  Active: <N>  |  Stale: <N>  |  Archive candidates: <N>

STALE ENTRIES (>30 days unreferenced)
  - <filename>: <one-line summary>  [last seen: <date>]

ARCHIVE CANDIDATES (>90 days or superseded)
  - <filename>: <one-line summary>  [last seen: <date>]

RECOMMENDATION
  Archive <N> entries to .ijfw/memory/archive/. No data is deleted.
```

5. **Pruning question:** for each entry flagged STALE or ARCHIVE, ask "Would removing this rule cause the agent to make a mistake?" If no, archive. If yes, keep and tighten. Memory that doesn't change behavior is bloat that crowds out memory that does.

6. Ask before acting:
   > `Archive <N> stale entries? (y/n -- files move to .ijfw/memory/archive/, not deleted)`

6. On confirmation, move flagged files. Store audit result:
   > `ijfw_memory_store: memory audit on <date> -- archived <N> entries`
