migrate-memory
Reconciles the Obsidian vault to the current folder layout, note frontmatter, filenames and Index.md format. Use when the user says 'migrate memory' or runs /migrate-memory, after upgrading agent-notes, or when vault notes look outdated.
- License 许可
- MIT
- 最近更新
- 2026-11-04
- Stars
- ★ 4
- Forks
- 2
01 前言 Front Matter
- name
- migrate-memory
- group
- process
- description
- Reconciles the Obsidian vault to the current folder layout, note frontmatter, filenames and Index.md format. Use when the user says 'migrate memory' or runs /migrate-memory, after upgrading agent-notes, or when vault notes look outdated.
- requires_memory
- obsidian
- disable-model-invocation
- true
03 SKILL.md 正文
Migrate Memory
Reconcile the memory store to the latest format. This skill transforms any state — old layout, missing fields, wrong folder names — into the canonical structure.
When to use
- After upgrading agent-notes
- When the user says "migrate memory" or
/migrate-memory - When vault structure looks outdated or inconsistent
Step 1: Detect backend
agent-notes memory vault
This returns the backend type and vault path.
Obsidian backend
Reconcile folder structure
The canonical vault layout is:
<vault-root>/projects/<project-name>/
├── Patterns/
├── Decisions/
├── Mistakes/
├── Context/
├── Feedback/
├── Sessions/
└── Index.md
Reconciliation rules:
- If the project lives under a
notes/parent andprojects/does NOT exist → renamenotes/→projects/ - If BOTH
notes/andprojects/exist → merge: move all contents fromnotes/<project>/intoprojects/<project>/, skip files that already exist in the destination, then delete the emptynotes/directory - At the end: only
projects/must exist.notes/must be gone. - Create any missing category folders: Patterns, Decisions, Mistakes, Context, Feedback, Sessions
- If
Index.mdis missing, create it with the standard header
Reconcile note frontmatter
Every .md file inside a category folder (NOT Index.md) must have this frontmatter:
---
created_at: <ISO 8601 UTC, "Z" suffix>
type: <pattern|decision|mistake|context|session|feedback>
description: "<one-line summary optimized for index routing>"
session: <YYYY-MM-DD_session-id> # absent on session notes themselves
agent: <agent-name> # optional
---
Reconciliation rules:
created_at— if missing, derive from filename date prefix (YYYY-MM-DD_slug.md→ that date at midnight UTC). If no date in filename, use file modification timetype— if missing, derive from parent folder name (lowercase).Patterns/→pattern, etc.description— if missing, derive from the first non-heading, non-empty line of the body. Cap at 100 characters, break at word boundary. If no suitable line, use the filename slug with hyphens replaced by spacessession— leave as-is if present; do not add if absentagent— leave as-is if present; do not add if absent- Do NOT remove extra frontmatter fields — only add/fix the required ones
Reconcile filenames
Canonical filename format: YYYY-MM-DD_<slug>.md
<slug>is kebab-case, derived from the note title- If a file doesn't match this pattern, rename it to match (derive date from
created_atfrontmatter) - On collision, append
_HHMMSSbefore.md
Regenerate Index.md
After all notes are reconciled, regenerate Index.md:
- List notes grouped by section in this order: Decisions, Patterns, Context, Mistakes, Feedback
- Within each section, newest first (by
created_at) - Each entry:
- [[relative-path|title]] — description - Sessions section: last 5 sessions only
Report
Print a summary of changes made:
- Backend: obsidian
- Folders: created / renamed / merged / removed
- Notes with updated frontmatter (count)
- Notes already compliant (count)
- Filenames: all OK or list non-compliant
- Index regenerated: yes/no
Constraints
- Never delete individual notes. Only add/fix metadata, rename, and merge folders.
- Preserve note body content exactly — only touch frontmatter and filenames.
- When merging folders, skip files that already exist at the destination (do not overwrite).
04 同仓库更多 Skills
security-audit
Audits a codebase for security vulnerabilities, independently verifies each one, and writes a report. Use when asked for a full, multi-phase codebase security audit or pen test, or for focused security guidance on code.
wayfinder
Charts a map of investigation tickets on the issue tracker for work too big for one agent session, then resolves them one per session. Use when the user wants to wayfind a large loose idea or continue an existing wayfinder map.
triage
Triages issues and external PRs: categorises, verifies, grills if needed, and writes agent-ready briefs. Use when the user wants to triage the backlog or a specific issue or PR.
to-tickets
Breaks a plan, spec or conversation into tracer-bullet tickets, each declaring its blocking edges, and publishes them to the configured tracker. Use when the user wants a spec or plan turned into tickets or issues.
to-spec
Turns the current conversation into a spec and publishes it to the project issue tracker, with no interview, only synthesis of what was discussed. Use when the user wants the discussion written up as a spec.
setup-agent-tracker
Configures a repo's issue tracker, triage label vocabulary and domain doc layout for the agent-notes workflow skills. Use when starting in a new repo, once, before triage, to-spec, to-tickets or wayfinder.