remember
Save the current work session to persistent memory for future context. Summarizes accomplishments, tracks files modified, and stores learnings for cross-session continuity.
What this skill does
# /remember - Save Session to Memory
Summarize the current work session and save it to persistent memory for future context.
## Instructions
When the user invokes `/remember`, you should:
### 1. Check for Activity Log
First, check if there's an activity log from this session:
```bash
REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || echo "$PWD")
ACTIVITY_FILE="$REPO_ROOT/.claude-memory/activity.log"
if [ -f "$ACTIVITY_FILE" ]; then
cat "$ACTIVITY_FILE"
fi
```
### 2. Analyze the Session
Review what was accomplished in this conversation:
- What files were read, created, or modified?
- What was the main goal or task?
- What key decisions were made?
- Were there any important patterns or learnings?
### 2.5. Compression Guidelines
When writing summaries, facts, or knowledge entries, follow these rules to maximize information density:
- **Resolve pronouns to concrete entities**: Write "JWT middleware validates tokens" not "it validates them"
- **Use absolute file paths**: Write "src/auth/middleware.ts" not "this file" or "the auth file"
- **Write dense, self-contained summaries**: Each memory entry should be understandable without the original conversation context
- **Avoid filler phrases**: Do not use "I think", "basically", "sort of", "actually" — state facts directly
- **Use ISO dates**: Write "2026-02-11" not "today" or "yesterday" — temporal references decay quickly
The system automatically compresses text at write time (normalizing dates, stripping filler), but writing clean summaries upfront produces better results.
### 3. Generate Summary
Create a concise summary (2-3 sentences) that captures:
- **What** was done (the main accomplishment)
- **Why** it matters (the purpose or problem solved)
- **Key details** (important files, patterns, or decisions)
### 4. Extract Metadata
Identify:
- **Files touched**: List of file paths worked on
- **Topics**: 3-5 keywords for searchability (e.g., "auth, jwt, middleware, security")
- **Tools used**: Main tools used (Read, Write, Edit, Bash, etc.)
### 5. Save to Memory
Use the memory-db.sh script to save:
```bash
PLUGIN_DIR="${PLUGIN_DIR:-$HOME/claude-turbo-search}"
MEMORY_SCRIPT="$PLUGIN_DIR/memory/memory-db.sh"
# Initialize if needed
"$MEMORY_SCRIPT" init
# Save session
"$MEMORY_SCRIPT" add-session \
"YOUR_SUMMARY_HERE" \
'["file1.ts", "file2.ts"]' \
'["Read", "Edit", "Bash"]' \
"topic1, topic2, topic3"
```
### 6. Optionally Add Knowledge or Facts
If during the session you learned something important about the codebase that should be remembered:
**For code area knowledge:**
```bash
"$MEMORY_SCRIPT" add-knowledge \
"src/auth" \
"Authentication module using JWT tokens with refresh token rotation" \
"Tokens expire in 15min, refresh tokens in 7 days"
```
**For project facts:**
```bash
"$MEMORY_SCRIPT" add-fact "Uses PostgreSQL with Prisma ORM" "architecture"
"$MEMORY_SCRIPT" add-fact "All API routes require authentication except /health" "convention"
```
### 6.5. Save Token Metrics
Before clearing the activity log, calculate and persist token metrics for this session:
```bash
PLUGIN_DIR="${PLUGIN_DIR:-$HOME/claude-turbo-search}"
MEMORY_SCRIPT="$PLUGIN_DIR/memory/memory-db.sh"
REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || echo "$PWD")
ACTIVITY_FILE="$REPO_ROOT/.claude-memory/activity.log"
if [ -f "$MEMORY_SCRIPT" ] && [ -f "$ACTIVITY_FILE" ]; then
# Get the session ID just saved (most recent)
SESSION_ID=$("$MEMORY_SCRIPT" recent 1 2>/dev/null | grep -o '"id":[0-9]*' | head -1 | grep -o '[0-9]*')
if [ -n "$SESSION_ID" ]; then
SEARCHES=$(grep -c "SEARCH:" "$ACTIVITY_FILE" 2>/dev/null || echo "0")
READS=$(grep -c "|Read|" "$ACTIVITY_FILE" 2>/dev/null || echo "0")
EDITS=$(grep -c "|Edit|" "$ACTIVITY_FILE" 2>/dev/null || echo "0")
"$MEMORY_SCRIPT" add-token-metrics "$SESSION_ID" "$SEARCHES" "$READS" "$EDITS" 2>/dev/null || true
fi
fi
```
This step is non-blocking — if memory-db.sh is unavailable or fails, the session save still succeeds.
### 6.6. Push to Remote Dashboard (Optional)
If the user has configured a personal web dashboard with `memory-db.sh config set`, sync the updated database to it:
```bash
"$MEMORY_SCRIPT" push 2>/dev/null || true
```
This step is non-blocking — failures are silent. When no remote is configured, `push` exits with a clear error that we discard. When a remote *is* configured, the gzipped database is uploaded so the dashboard reflects this session immediately.
See [`docs/plans/web-sync.md`](../../docs/plans/web-sync.md) for the dashboard architecture and `web/README.md` for deploy instructions.
### 7. Clear Activity Log
After saving, clear the activity log:
```bash
ACTIVITY_FILE="$REPO_ROOT/.claude-memory/activity.log"
[ -f "$ACTIVITY_FILE" ] && rm "$ACTIVITY_FILE"
```
### 8. Confirm to User
Report what was saved:
```
Saved to memory:
- Summary: [your summary]
- Topics: [topics]
- Files: [count] files tracked
Memory now contains [X] sessions. Use /memory-stats to see details.
```
## Example Output
```
Saved to memory:
- Summary: Implemented JWT authentication with refresh token rotation. Added middleware for protected routes and updated user model with token fields.
- Topics: auth, jwt, middleware, tokens, security
- Files: 4 files tracked
Memory now contains 12 sessions.
```
## Additional Commands
If the user wants to add specific knowledge or facts, they can say:
- "Remember that this project uses X" -> Add as fact
- "Remember how the auth module works" -> Add as knowledge
Ask clarifying questions if the summary scope is unclear.
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.