Synchronize current session state to memory files. Reviews conversation, updates relevant files, and confirms changes. Use at end of sessions or when significant progress has been made.
From context-keepernpx claudepluginhub swannysec/context-keeper --plugin context-keeperThis skill uses the workspace's default tool permissions.
Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
Retrieves current documentation, API references, and code examples for libraries, frameworks, SDKs, CLIs, and services via Context7 CLI. Ideal for API syntax, configs, migrations, and setup queries.
Read current memory files:
Privacy: When analyzing memory files, skip any content within <private>...</private> blocks.
Do not reference, move, or modify private content. Do not include private content in sync summaries.
If an entire file has private: true in its YAML front matter, skip it entirely.
Review conversation for:
Check if .claude/memory/corrections-queue.md exists and has entries.
If it has entries:
patterns.md (under Code Conventions)decisions/ADR-NNN-*.md (create new ADR)glossary.mdproduct-context.mdactive-context.md<!-- @category: convention --><!-- @category: decision --><!-- @category: pattern --><!-- @category: bugfix --><!-- @category: learning -->For each new entry identified in Step 2, assign a memory category tag:
decisionpatternbugfixconventionlearningInclude the category tag in the proposed update shown to the user in Step 3. Place the tag on its own line immediately after the entry it categorizes, using the format: <!-- @category: <value> -->
Present changes to user (include category tags so users see them before approval):
Memory Sync Summary:
active-context.md:
- Current focus: [old] → [new]
- Added: Decided to use [X] over [Y]
<!-- @category: decision -->
- Added open question: [question]
progress.md:
- Marked complete: [task]
- Added: [new task]
patterns.md:
- Added: Always use [pattern description]
<!-- @category: pattern -->
decisions/:
- New: ADR-003-[title] (reason: [brief])
<!-- @category: decision -->
Proceed with sync? [y/n]
On confirmation:
ADR-NNN-title.md)ADR Numbering: Scan decisions/ for highest ADR-NNN, increment from there.
Concurrency note: If multiple sessions might create ADRs simultaneously (rare), use a timestamp suffix like
ADR-NNN-YYYYMMDD-HHMM-title.mdto avoid conflicts.
ADR Format: (max ~500 tokens)
# ADR-NNN: [Title]
**Status:** Accepted | **Date:** [date] | **Tags:** [tags]
## Context
[Why this decision was needed - 1-2 sentences]
## Decision
[What was decided - 1 sentence]
## Rationale
- [Key reason 1]
- [Key reason 2]
## Consequences
- [Consequence 1]
- [Consequence 2]
## Alternatives Considered
- [Alt 1]: [Why rejected]
Write the sync timestamp:
echo "$(date +%s)" > .claude/memory/.last-sync
Write in both manual and auto-sync modes. Refuse to write through symlinks — if .claude/memory/.last-sync is a symlink, skip this step and warn the user.
If decisions/ directory exists and contains ADR files:
decisions/*.md (exclude INDEX.md)# ADR-NNN: Title**Status:** X | **Date:** Y | **Tags:** Z## Superseded By section (if present)private: true in YAML frontmatterdecisions/INDEX.md with this template:# Decision Index
<!-- Auto-generated by /memory-sync. Do not edit manually. -->
## Usage Instructions for Agents
- Use this index as a LOOKUP TABLE — do not read every ADR file
- Search the Title or Tags columns to find relevant decisions
- Only read the specific ADR file when you need full rationale
- Only Active decisions apply to current work
- If an ADR lists a Superseded By value, follow the chain to the current decision
| # | Title | Status | Date | Tags | Superseded By |
|---|-------|--------|------|------|---------------|
| ADR-001 | [Title] | [Status] | [Date] | [Tags] | — |
[Parse error — read directly]Memory synced. [N] files updated.
If corrections were processed in Step 2.5, or if this was a substantial session (many decisions, significant progress), append:
Consider running /memory-reflect for deeper session analysis.
Read auto_reflect from .memory-config.md (default: true).
If auto_reflect: true and corrections were processed, automatically proceed to
run /memory-reflect after sync completes (no additional user prompt needed).
Note: Auto-reflect only triggers on corrections (not merely "substantial sessions") because corrections are the strongest signal that retrospection will yield actionable improvements. Auto-reflect is not triggered during auto-sync mode (hook-triggered) since auto-sync skips Step 2.5 (corrections processing).
When ConKeeper's UserPromptSubmit hook detects high context usage (>= configured threshold), it injects a <conkeeper-auto-sync> tag into your context.
When this tag is detected in the current context:
active-context.md and progress.md. Do not create new decision files, modify patterns.md, or modify glossary.md during auto-sync. This limits blast radius of unsupervised writes.[ConKeeper: Auto memory-sync complete. Consider running /clear to start fresh with your synced context.]
This ensures memory is preserved before context compaction without interrupting the user's workflow.