memory-migrate — Claude Code command: convert agent memory to YAML schema
memory-migrate — a command for Claude Code and Codex that converts legacy flat memory files (pitfalls.md, conventions.md, decisions.md) into a structured YAML schema with automatic entry classification.
MIT ★ 730 updated 2026-10-29
/plugin marketplace add gmickel/flow-next
/plugin install flow-next@flow-nextWhat memory-migrate does
The command reads text files from .flow/memory/ and transforms each entry into categorized YAML format — the agent classifies content directly during migration. It supports autofix mode for fully automatic conversion and an optional file filter to migrate only pitfalls.md or a specific section.
After writing, the command verifies the output and can remove source files upon success. Pass arguments mode:autofix and optionally a filename (e.g., pitfalls.md) — the rest runs through the built-in flow-next-memory-migrate skill.
What it helps with
- migrate agent memory from Markdown to YAML without losing entries
- classify records by type automatically during the conversion
- update
.flow/memory/structure to the new schema with verification - convert a single memory file while leaving others untouched
Example prompts for the agent
- Migrate all agent memory:
memory-migrate mode:autofix - Convert only pitfalls:
memory-migrate mode:autofix pitfalls.md - Classify and transform decisions.md into YAML:
memory-migrate decisions.md
How to install memory-migrate
1Plugin marketplace
/plugin marketplace add gmickel/flow-next/plugin install flow-next@flow-next2Manually: put the files in place
.claude/commands/memory-migrate.mdCall it with /memory-migrate. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/memory-migrate.mdCall it with /prompts:memory-migrate. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/memory-migrate.prompt.mdManually: put the files in place
.gemini/commands/memory-migrate.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
Questions about memory-migrate
How do I install memory-migrate in Claude Code?
Run /plugin marketplace add gmickel/flow-next, then /plugin install flow-next@flow-next. The command will be available as .claude/commands/memory-migrate.md.
What does memory-migrate do?
It converts legacy flat memory files (.flow/memory/pitfalls.md, conventions.md, decisions.md) into structured YAML format with automatic categorization for each entry.
Are there any prerequisites to run it?
You need the source files in .flow/memory/. The autofix mode runs fully automatic migration without additional input.
Source text
memory-migrate.md · MIT
---
name: memory-migrate
description: Migrate legacy `.flow/memory/{pitfalls,conventions,decisions}.md` flat files into the categorized YAML schema — host agent classifies each entry directly
argument-hint: "[mode:autofix] [optional scope hint — e.g. pitfalls.md]"
disable-model-invocation: true
---
# IMPORTANT: This command MUST invoke the skill `flow-next-memory-migrate`
The ONLY purpose of this command is to call the `flow-next-memory-migrate` skill. You MUST use that skill now.
**Arguments:** $ARGUMENTS
Pass the arguments to the skill verbatim. The skill handles mode detection (`mode:autofix` token), legacy-file detection, per-entry classification, categorized writes, verification, and optional cleanup.
© Gordon Mickel · MIT · gmickel/flow-next