Skip to content
Back to skills

Memento Cleanup

ASecurity

Inspect and safely remove unwanted memento memories or collect deleted sessions. Review project and lineage boundaries, preview garbage collection or stale sweeping, and obtain confirmation before any destructive forgetting.

  • 4 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 27, 2026
ai-agentsapi

Works with

  • cursor
  • api

Security analysis

A100/100

Scanned November 27, 2026

npx -y skills add luckynee/memento --skill memento-cleanup --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Memento Cleanup?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Memento Cleanup
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/luckynee-memento-cleanup/badge)](https://www.skillsdirectory.com/skills/luckynee-memento-cleanup)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: memento-cleanup
description: Inspect and safely remove unwanted memento memories or collect deleted sessions. Review project and lineage boundaries, preview garbage collection or stale sweeping, and obtain confirmation before any destructive forgetting.
metadata:
    source: memento
---

# Clean up memory

Use when the user wants to forget memories, review deleted sessions, or inspect stale-session cleanup.

## Steps

1. Identify the project, harness, and session; review the relevant sessions and ancestry:

   ```sh
   memento project-key
   memento sessions list --harness H --project PROJECT
   memento sessions lineage --harness H --session S
   memento stats --harness H --project PROJECT --session S
   ```

2. Preview deletion detection without changing sessions or cursors:

   ```sh
   memento gc --project DIR --dry-run
   ```

   To preview a stale sweep, with daemon authentication configured as needed:

   ```sh
   curl -sS -X POST http://127.0.0.1:7377/v1/maintenance/sweep \
       -H 'Content-Type: application/json' \
       -d '{"project":"PROJECT","dry_run":true}'
   ```

3. Preview the intended forget operation with `--dry-run`, then explain the exact scope and findings to the user. Obtain explicit confirmation before running one of:

   ```sh
   memento forget --harness H --project PROJECT --session S
   memento forget --harness H --project PROJECT --lineage S
   memento forget --harness H --project PROJECT --whole-project
   ```

   Session removes one session's memories; lineage removes S and descendants; whole-project removes memories across harnesses. Do not add `--yes` without explicit approval.
4. If the user approves garbage collection after its preview, run `memento gc --project DIR`. The API supports retention `keep` on a session update. For an existing or new child link, `memento sessions link --harness H --project PROJECT --child S --parent P --retention keep` also sets it; linking changes lineage, so do not use it solely to change retention without approval.

## Verify

Rerun the relevant `memento stats` and `memento gc --project DIR --dry-run`; check session lineage where relevant. Deleted parents may remain available to uncollected descendants or pending continuations until eligible for leaf-first collection.

## Safety

Forgetting is destructive and can affect descendants or every harness in a project. `keep` protects against automatic collection, not an explicit forget. Never run an actual stale sweep or gc merely to preview it, and use existing secure authentication configuration without printing credentials.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.