Skip to content
Agent Memory
Skill

/memory-processor

Process file changes and update CLAUDE.md memory sections. Use when the memory-updater agent needs to analyze dirty files, update AUTO-MANAGED sections, verify content removal, or detect stale commands. Invoked after file edits to keep project memory in sync.

From plugin
auto-memory
1602 skills1 agent4 commands4 hooks

Claude Code

$ npx -y skills add severity1/claude-code-auto-memory --skill memory-processor --agent claude-code

SKILL.md

memory-processor.SKILL.md
name: memory-processor
description: Process file changes and update CLAUDE.md memory sections. Use when the memory-updater agent needs to analyze dirty files, update AUTO-MANAGED sections, verify content removal, or detect stale commands. Invoked after file edits to keep project memory in sync.

Memory Processor

Process changed files and update relevant memory file sections (CLAUDE.md or AGENTS.md, whichever is the active file per project config) following official guidelines.

Guidelines

**MANDATORY**: All rules below must be followed exactly. Violations produce incorrect CLAUDE.md content.

@../shared/references/guidelines.md

Algorithm

1. **Parse context**: Read context provided by memory-updater agent:

  • Changed files with categories
  • File content summaries
  • Detected dependencies
  • Git context (commits, diffs)
  • Target memory files (CLAUDE.md or AGENTS.md per project config)

2. **Categorize changes**: Map files to CLAUDE.md sections using the tables in "Section Names" below. Match changed files to their update triggers.

3. **Analyze impact**: Determine what needs updating:

  • New build commands added?
  • Architecture changed (new dirs, renamed components)?
  • New coding patterns detected?
  • Dependencies added/removed?

4. **Verify and update content**: Before modifying documented content, verify accuracy:

**Key distinction - conventions vs patterns:**

  • `conventions`: Explicit rules humans decided (naming, imports, formatting)
  • `patterns`: Implicit patterns AI detected from recurring code structures

**Removal verification:**

  • Read the relevant CLAUDE.md section to get currently documented items
  • For each item that appears missing from changed files:
  • Use Grep to search the codebase for that item
  • Search in relevant directories excluding node_modules, vendor, .git
  • If item exists elsewhere: keep it documented
  • If item is not found anywhere: mark for removal

**Stale command detection:**

  • Compare documented commands against commands that actually executed successfully
  • If documented command differs from successful execution, update to match what worked
  • Examples:
  • Documented: `python pytest` | Actually worked: `python -m pytest` → Update
  • Documented: `npm test` | Actually worked: `npm run test` → Update
  • Documented: `pytest tests/` | Actually worked: `uv run pytest` → Update
  • Source: Successful Bash tool executions from session context or git commit history

**Examples:**

  • Pattern: `@decorator` removed → search `grep -r "@decorator" src/`
  • Convention: `async/await` style removed → search for `async function` or `await`
  • Architecture: `utils/` directory deleted → verify no `utils/` references remain
  • Build command: `npm run dev` removed from package.json → verify script is gone

5. **Update memory file**: Modify relevant sections in the active memory file:

  • Preserve AUTO-MANAGED markers
  • Never touch MANUAL sections
  • Apply content rules (specific, concise, structured)
  • Do not modify CLAUDE.md redirect files (files containing only "Read AGENTS.md...")

6. **Validate**: Ensure updates follow guidelines:

  • No generic instructions added
  • Specific and actionable content
  • Proper markdown formatting

Marker Syntax

CLAUDE.md uses HTML comment markers for selective updates:

<!-- AUTO-MANAGED: section-name -->
Content that will be automatically updated
<!-- END AUTO-MANAGED -->

<!-- MANUAL -->
Content that will never be touched
<!-- END MANUAL -->

Section Names

Root CLAUDE.md Sections

| Section | Purpose | Update Triggers | |---------|---------|-----------------| | `project-description` | Project overview | README changes, major refactors | | `build-commands` | Build, test, lint commands | package.json, Makefile, pyproject.toml | | `architecture` | Directory structure, components | New dirs, renamed files, structural changes | | `conventions` | Naming, imports, code standards | Pattern changes in source files | | `patterns` | AI-detected coding patterns | Repeated patterns across files | | `git-insights` | Decisions from git history | Significant commits | | `best-practices` | From official Claude Code docs | Manual updates only |

Subtree CLAUDE.md Sections

| Section | Purpose | Update Triggers | |---------|---------|-----------------| | `module-description` | Module purpose | Module README, major changes | | `architecture` | Module structure | File changes within module | | `conventions` | Module-specific conventions | Pattern changes in module | | `dependencies` | Key module dependencies | Import changes, package updates |

Token Efficiency

  • Keep sections concise - bullet points, not paragraphs
  • Use imports (`@path/to/file`) for detailed specs
  • Follow Content Rules above (< 500 lines, stay current)

Output

Return a brief summary:

  • "Updated [section names] in [memory file path] based on changes to [file names]"
  • "Removed [pattern] from [section] - no longer used in codebase"
  • "No updates needed - changes do not affect documented sections"
Read more
@severity1
Ships withauto-memory

Your CLAUDE.md, always in sync. Minimal tokens. Zero config. Just works. A Claude Code plugin that watches what Claude Code edits, deletes, and moves - then quietly updates your project memory in the background. No manual maintenance needed.

1602 skills1 agent
Get the whole plugin

Stars on GitHub

Momentum

stars in total
160
Star history of severity1/claude-code-auto-memory on GitHub, a chart by star-history.com

Other skills on auto-memory.

codebase-analyzer

codebase-analyzer

This skill should be used when the user asks to "initialize auto-memory", "create CLAUDE.md", "set up project memory", or runs…

More skills from other plugins.

agent-cost-report

agent-cost-report

Believable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude…

claude-mem13d116k
@thedotmack@thedotmackInstall Skill
bot-handoff

bot-handoff

Keep a durable record of work passed between Bots in the shared Hindsight memory bank. Use when handing work to another Bot, when…

hindsight13d60k
@vectorize-io@vectorize-ioInstall Skill
mempalace

mempalace

Install, configure, and operate MemPalace, including a private local palace, a shared-brain hub, or a client joining an existing…

@mempalace@mempalaceInstall Skill
mempalace

mempalace

Install, configure, and operate MemPalace, including a private local palace, a shared-brain hub, or a client joining an existing…

@milla-jovovich@milla-jovovichInstall Skill

Questions about memory-processor.

Which coding agents can use memory-processor?
memory-processor installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.