memento
Manages mementos for session persistence - save and restore context across /clear and /compact
What this skill does
<!-- SPDX-FileCopyrightText: 2026 The AIDA Core Authors -->
<!-- SPDX-License-Identifier: MPL-2.0 -->
# Memento
Mementos are persistent context snapshots that help Claude resume work after
`/clear`, `/compact`, or in new conversations. Each memento captures the problem,
approach, progress, and next steps for a work session.
## Activation
This skill activates when:
- User invokes `/aida memento [create|update|read|list|remove|complete]`
- User needs to save or restore session context
- After `/clear` when active mementos exist (for suggestion)
## Command Routing
When this skill activates, parse the command to determine:
1. **Operation**: `create`, `update`, `read`, `list`, `remove`, `complete`
2. **Arguments**: slug, description, source, options
### Create Operations
For `create` operations:
1. Read `references/memento-workflow.md` for the full workflow
2. Run Phase 1 to get questions and inferred data
3. Ask user any required questions using AskUserQuestion
4. Run Phase 2 to create the memento
5. Report success and next steps
**Sources:**
- `manual` (default): User provides description
- `from-pr`: Extract context from current PR
- `from-changes`: Summarize current file changes
**Script invocation:**
```bash
# Phase 1: Get questions
python {base_directory}/scripts/memento.py --get-questions \
--context='{"operation": "create", "description": "user description", "source": "manual"}'
# Phase 2: Execute
python {base_directory}/scripts/memento.py --execute \
--context='{"operation": "create", "slug": "my-memento", "description": "...", ...}'
```
### Read Operations
For `read` operations:
1. Load the memento file
2. Return full content to Claude's context
3. Claude can then continue with the restored context
**Script invocation:**
```bash
python {base_directory}/scripts/memento.py --execute \
--context='{"operation": "read", "slug": "my-memento"}'
```
### List Operations
For `list` operations:
1. Scan `~/.claude/memento/` directory
2. Parse frontmatter for metadata
3. Return formatted list with status, description, dates
**Script invocation:**
```bash
python {base_directory}/scripts/memento.py --execute \
--context='{"operation": "list", "filter": "active"}'
```
**Filtering options:**
- `--all` - List mementos from all projects
- `--project <name>` - List mementos for a specific project
### Update Operations
For `update` operations:
1. Load current memento
2. Ask which section to update (progress, decisions, next_step)
3. Merge new content with existing
4. Update the `updated` timestamp
**Script invocation:**
```bash
# Phase 1: Get section options
python {base_directory}/scripts/memento.py --get-questions \
--context='{"operation": "update", "slug": "my-memento"}'
# Phase 2: Execute update
python {base_directory}/scripts/memento.py --execute \
--context='{"operation": "update", "slug": "my-memento", "section": "progress", "content": "..."}'
```
### Complete Operations
For `complete` operations:
1. Set status to `completed`
2. Move file to `~/.claude/memento/.completed/`
3. Report completion
**Script invocation:**
```bash
python {base_directory}/scripts/memento.py --execute \
--context='{"operation": "complete", "slug": "my-memento"}'
```
### Remove Operations
For `remove` operations:
1. Confirm deletion with user
2. Delete the memento file
3. Report removal
**Script invocation:**
```bash
python {base_directory}/scripts/memento.py --execute \
--context='{"operation": "remove", "slug": "my-memento"}'
```
## Path Resolution
**Base Directory:** Provided when skill loads via `<command-message>` tags.
**Script Execution:**
```text
{base_directory}/scripts/memento.py
```
**Reference Files:**
```text
{base_directory}/references/memento-workflow.md
```
**Templates:**
```text
{base_directory}/templates/work-session.md.jinja2
{base_directory}/templates/freeform.md.jinja2
```
**Memento Storage:**
```text
~/.claude/memento/ # Active mementos
~/.claude/memento/.completed/ # Completed mementos
```
## Two-Phase API
This skill uses a two-phase API pattern:
### Phase 1: Get Questions
Analyzes context and returns:
- Inferred metadata (slug, source, tags)
- Questions that need user input
- Validation results
### Phase 2: Execute
Performs the operation with:
- User responses (if any)
- Inferred data
- Configuration options
## Example Workflows
### Creating a Memento
```text
User: /aida memento create "fix auth token expiry"
1. Parse: operation=create, description="fix auth token expiry"
2. Run Phase 1:
- Infer: slug="fix-auth-token-expiry", source="manual"
- Question: "What's the core problem you're solving?"
3. User provides problem description
4. Run Phase 2:
- Create ~/.claude/memento/fix-auth-token-expiry.md
5. Report: "Created memento. Start working, then /aida memento update to track progress"
```
### Loading After /clear
```text
User: /aida memento read fix-auth-token-expiry
1. Parse: operation=read, slug="fix-auth-token-expiry"
2. Load ~/.claude/memento/fix-auth-token-expiry.md
3. Return full content
4. Claude summarizes: "I see you were working on X. Next step was Y. Ready to continue?"
```
### Listing with Filters
```text
/aida memento list --all # All projects
/aida memento list --project my-proj # Specific project
```
### Creating from PR
```text
User: /aida memento create from-pr
1. Parse: operation=create, source="from-pr"
2. Detect current branch, fetch PR via `gh pr view`
3. Extract title, body, files changed
4. Pre-fill template with PR context
5. Create memento with PR-derived content
```
## Resources
### scripts/
- **memento.py** - Main management script with two-phase API
### references/
- **memento-workflow.md** - Detailed workflow documentation
### templates/
- **work-session.md.jinja2** - Primary template for task-focused mementos
- **freeform.md.jinja2** - Simple template for custom content
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.