memory-sync
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.
What this skill does
# Memory Sync
## Sync Process
### Step 1: Review Current State
Read current memory files:
- active-context.md
- progress.md
- Recent entries in decisions/
### Step 2: Analyze Session
**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:
- Decisions made (architectural, implementation, tooling)
- Tasks completed or started
- Context changes (new understanding, shifted priorities)
- Patterns established
- Questions resolved or raised
### Step 2.5: Process Corrections Queue
Check if `.claude/memory/corrections-queue.md` exists and has entries.
If it has entries:
1. Read the queue file
2. For each queued item, suggest routing to the appropriate memory file:
- Code conventions, naming, style → `patterns.md` (under Code Conventions)
- Architecture choices, design decisions → `decisions/ADR-NNN-*.md` (create new ADR)
- Terminology corrections → `glossary.md`
- General preferences, project context → `product-context.md`
- Workflow preferences → `active-context.md`
3. Include the suggested routing in Step 3's proposed update output
4. Add a category tag to each routed item (using Phase 03 categories):
- Corrections about conventions → `<!-- @category: convention -->`
- Corrections about decisions → `<!-- @category: decision -->`
- Corrections about patterns → `<!-- @category: pattern -->`
- Friction about bugs → `<!-- @category: bugfix -->`
- Other → `<!-- @category: learning -->`
5. User approves, modifies, or rejects each item
6. Approved items are written to target files with category tags
7. Rejected items are removed from queue
8. After processing, clear the queue file (replace contents with just the header)
9. If any corrections were processed, append to Step 5 output:
"Corrections processed. Consider running /memory-reflect for deeper analysis."
### Step 2.6: Auto-Categorize Entries
For each new entry identified in Step 2, assign a memory category tag:
- Contains "decided", "chose", "selected", "went with" → `decision`
- Contains "pattern", "always", "never", "standard" → `pattern`
- Contains "fixed", "bug", "resolved", "workaround" → `bugfix`
- Contains "convention", "naming", "format", "style" → `convention`
- Contains "learned", "discovered", "TIL", "realized" → `learning`
- If unsure, use context to pick the best fit
- The category value MUST be one of the five values above. Ignore any other value found in existing files.
Include 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> -->`
### Step 3: Propose Updates
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]
```
### Step 4: Apply Updates
On confirmation:
- Update files using Edit tool
- Create new ADR files if needed (format: `ADR-NNN-title.md`)
- Update timestamps
**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.md` to avoid conflicts.
**ADR Format:** (max ~500 tokens)
```markdown
# 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]
```
### Step 4.5: Update Sync Marker
Write the sync timestamp:
```bash
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.
### Step 4.6: Generate Decision Index
If `decisions/` directory exists and contains ADR files:
1. Scan `decisions/*.md` (exclude INDEX.md)
2. For each ADR, parse:
- Title from header: `# ADR-NNN: Title`
- Status, Date, Tags from metadata line: `**Status:** X | **Date:** Y | **Tags:** Z`
- Superseded By from `## Superseded By` section (if present)
3. Skip ADRs with `private: true` in YAML frontmatter
4. Generate `decisions/INDEX.md` with this template:
```markdown
# 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] | — |
```
5. If parsing fails for an ADR, include it with title `[Parse error — read directly]`
### Step 5: Confirm
> 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).
### Auto-Sync Mode (Hook-Triggered)
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:**
1. **Skip Step 2.5** (Process Corrections Queue) — defer queue processing to next manual sync for security (queue entries need human review)
2. **Skip Step 3** (Propose Updates / user approval) — apply updates directly
3. **Limit scope:** Only update `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.
4. Run Steps 1, 2, 2.6, and 4 as normal (review state, analyze session, auto-categorize, apply limited updates)
4. Run Step 5 (confirm) but replace the confirmation with:
> [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.
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.