memory-audit
Audit MEMORY.md against the memory discipline — oversized sections, settled multi-session patterns that belong in knowledge/concepts/, session-headed…
Skill by awrshift
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/awrshift-memory-audit
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: security
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/memory-audit
Tools it pre-approves 5
From allowed-tools in SKILL.md: the agent may use these without asking you each time.
Read,Grep,Glob,Edit(.claude/memory/**),Edit(knowledge/**)
What's inside
- Skill name
memory-audit- Description
- 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.
- License
- MIT
- Allowed tools
- Read,, Grep,, Glob,, Edit(.claude/memory/**),, Edit(knowledge/**)
- Instructions
- 95 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Memory audit — the surgical one-file pass This is the **cap-trip response**, not the daily ritual. `/memory-kit:close-session` runs every session and captures; this runs when the hot cache has actually outgrown itself and something must LEAVE it. Keeping them separate is the point: a daily ritual that also has to do surgery becomes a ritual people skip. **Always pause for approval before writing.** The user talks; you write — including here. ## Inputs - `.claude/memory/MEMORY.md` — read in full. - `knowledge/concepts/*.md` — filenames + first 5 lines, for duplicate detection (the directory may not exist yet; the first move creates it). - `context/handoffs/` — to confirm a session narrative already lives there → **drop**, not move. - The newest `context/audits/memory-audit-deferred-*.md`, if one exists — the candidates the previous audit left; start from them. ## Step 1 — classify every section Scan by `## ` heading (and `###` inside a long section). For each, count lines and mark exactly one action. Also read the project's `CLAUDE.md`, the `.claude/rules/*.md` without `paths:` and the plugin's `reference/` titles — you need them for `restates-rule`. | Mark | When | |---|---| | `move (create)` | a settled pattern (confirmed on 3+ distinct dates) with >25 lines of reference detail | | `move (merge)` | same, but a concept article on the topic already exists | | `session-block` | the heading names a session or a date, not a topic (`### s66 (2026-09-25)`, `## Session 65 wrap`, `## Findings [date] — …`; the SessionStart hook flags these) → dissolve by topic: each settled lesson → one line under its topic heading or a concept; the rest → drop | | `drop` | a per-session chronicle — it already lives in a handoff; distil at most one settled line | | `restates-rule` | the entry says what `CLAUDE.md`, an always-loaded rule or a `reference/` file already says → drop, or one pointer line if the link is not obvious. The agent reads those files every session; a second copy only drifts | | `point to SSOT` | a derivable number — price, count, version, limit — whose source of truth lives elsewhere (a price table in code, a config, a vendor page) → replace the value with a pointer to that source (`reference/doc-governance.md` R1). A copied number outlives the thing it described | | `update in-place` | stale: names a deleted file, a closed ticket, a superseded decision | | `simplify` | true and useful, but three times longer than it needs to be | | `keep` | earns its lines | ## Step 2 — the move plan (a table, never prose) | # | Section | Lines | Action | Target | Reason | |---|---|---|---|---|---| | 1 | … | N | move / merge / session-block / drop / restates-rule / point to SSOT / simplify / keep | `knowledge/concepts/<slug>.md` or — | … | Close the table with: estimated line savings, and the projected line/byte count afterwards against the caps (180 lines / 32 KB / 3000 chars per line). **Target well below the caps — at most ~60 % of the byte cap (≈ 20 KB).** A cache audited to «just under» refills past the cap within days: the cap works as a fill line, not a ceiling. If the plan does not reach the target, say which sections keep it above and why they earn their bytes. ## Step 3 — PAUSE Print the plan and ask for approval. Wait for an explicit yes or edits. No writes before that. ## Step 4 — execute the approved moves, atomically - **move (create):** write `knowledge/concepts/<slug>.md` with frontmatter matching `knowledge/index.md`'s spec, then add its one-line entry to that index in the same pass. - **move (merge):** put the fact INTO the body of the article's topic section, with a short date tag (`[since YYYY-MM-DD]`); the line it replaces moves to the article's final `## History` section. Never append a dated «From MEMORY.md» block at the end — appended blocks turn an article into a log nobody can read as current truth. Never duplicate a section that already says the same thing. - **in MEMORY.md:** replace the moved section with a one-line pointer plus a one-line teaser. A move without a pointer orphans the content — that is the failure this audit exists to prevent. - **drop:** delete; keep at most one distilled line. - **session-block:** put each surviving lesson under its topic heading (create the topic heading if none fits), then delete the session heading and the rest of its block. - **restates-rule / point to SSOT:** delete the copy; where a reader would not find the source unaided, leave one line naming the file (and the symbol or section) that holds it. ## Step 5 — the header, then the report Replace the MEMORY.md current-state header (≤3 lines, dated). Report before/after line and byte counts, every file touched, and save declined candidates to `context/audits/memory-audit-deferred-YYYY-MM-DD.md` (create the dir if absent) so the next audit starts from them. Not in `context/handoffs/`: the SessionStart hook injects the newest file there as the session handoff, so a deferred list saved there replaces the real handoff at the next start. ## Refuse when - No cap is tripped, no session-headed block is flagged AND no settled-pattern candidate exists → say "no audit needed" and stop. A SINGLE tripped cap or flagged block is reason enough to proceed (one 3000-char line qualifies). - The user declines the plan → save it to `context/audits/` as above and stop. ## Anti-patterns - Writing anything before the approval. - Creating a new concept when a keyword grep matches an existing one — merge bias broken. - Promoting a session CHRONICLE into a knowledge article. Concepts hold settled patterns; narrative belongs to handoffs, and the action for it here is `drop`. - Stopping at «just under the cap». The next few sessions refill it; aim for the ~60 % target. - Keeping a rule «as a reminder». If the always-loaded layer already says it, memory repeating it is how two versions of one rule start to disagree. - Burying the plan in prose. The table is what makes it reviewable in ten seconds.
From awrshift/agent-memory-kit, MIT.
More from awrshift/agent-memory-kit
- 0.658score
system-audit
awrshift
Periodic evidence-based self-audit of the whole agent system — the orchestrator, its docs/SSOTs, rules, memory, subagents, tools, infra and the work it claims…
SkillAFreshness: A★ 34Claude Code +9 - 0.653score
close-session
awrshift
End-of-session ritual — audit today's patterns against accumulated memory, propose promotions, refresh MEMORY.md, and write the session handoff.
SkillAFreshness: A★ 34Claude Code +9 - 0.653score
code-sync
awrshift
Reconcile the project's documents with what the code now shows, after a merge or at the end of a build: spec statuses (building → done only with a named gate…
SkillAFreshness: A★ 34Claude Code +9 - 0.653score
document
awrshift
Write the human-facing prose about a change — PR body · changelog entry · release note · postmortem — and put it in the right file.
SkillAFreshness: A★ 34Claude Code +9 - 0.653score
second-opinion
awrshift
Cross-check the agent's own answer with independent reviewers before bringing it to the user.
SkillAFreshness: A★ 34Claude Code +9 - 0.653score
session-review
awrshift
End-of-session adversarial review loop.
SkillAFreshness: A★ 34Claude Code +9 - 0.653score
tour
awrshift
Interactive walkthrough of the Memory Kit system using the user's actual project files.
SkillAFreshness: A★ 34Claude Code +9 - 0.653score
qa-sweep
awrshift
Run a multi-lens agent QA sweep of the RUNNING product: spawn `qa` agents (one per lens — user-flow · edge-state · honesty · contract · ux-critique), collect…
SkillAFreshness: A★ 34Claude Code +9 - 0.649score
setup
awrshift
Adopt the Memory Kit in THIS repository — scaffold the memory layers, decide how the kit coexists with Claude Code's native auto memory, and install safe…
SkillAFreshness: A★ 34Claude Code +9
Signals
- Stars
- 34
- Forks
- 9
- Open issues
- 1
- Last commit (this folder)
- Oct 22, 2026 (6 days ago)
- Last release
- Oct 22, 2026 (6 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/awrshift/agent-memory-kit
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from awrshift
- 0.658score
system-audit
awrshift
Periodic evidence-based self-audit of the whole agent system — the orchestrator, its docs/SSOTs, rules, memory, subagents, tools, infra and the work it claims…
SkillAFreshness: A★ 34Claude Code +9 - 0.653score
close-session
awrshift
End-of-session ritual — audit today's patterns against accumulated memory, propose promotions, refresh MEMORY.md, and write the session handoff.
SkillAFreshness: A★ 34Claude Code +9 - 0.653score
code-sync
awrshift
Reconcile the project's documents with what the code now shows, after a merge or at the end of a build: spec statuses (building → done only with a named gate…
SkillAFreshness: A★ 34Claude Code +9 - 0.653score
document
awrshift
Write the human-facing prose about a change — PR body · changelog entry · release note · postmortem — and put it in the right file.
SkillAFreshness: A★ 34Claude Code +9 - 0.653score
second-opinion
awrshift
Cross-check the agent's own answer with independent reviewers before bringing it to the user.
SkillAFreshness: A★ 34Claude Code +9 - 0.653score
session-review
awrshift
End-of-session adversarial review loop.
SkillAFreshness: A★ 34Claude Code +9
Cite this page
memory-audit skill. Agent Mart. https://agentmart.dev/skills/awrshift-memory-audit (last updated 2026-10-24)