/mthines-agent-skills:persistent-memory [write|read|consolidate|forget] <scope> [--tier home|project-local|project-shared]from mthines-agent-skills
Persists topic-scoped context across conversations as plain markdown with write, read, consolidate, and forget operations, a never-store list for secrets, and a consent preview before every write.
Ships in mthines-agent-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Capture, recall, consolidate, and forget memories scoped to a user-chosen
topic (e.g. parenting, work, relationship-anna) as plain markdown
files, so any future conversation can pick up where the last one left off.
This
SKILL.mdis a thin index. Operation pipelines, taxonomy, privacy rules, integration patterns, and scaling guidance live inrules/*.mdand load on demand. Literal artefact templates live intemplates/*.md. Worked examples and citations live inreferences/*.md. Read only what the current operation asks for.
Parse $ARGUMENTS (first token) and detect the operation:
| Operation | Default | Trigger phrases |
|---|---|---|
write | yes | "remember", "save to memory", "add to memory", $0 == "write" |
read | "recall", "load memory", "what do you remember about", $0 == "read" | |
consolidate | "consolidate memory", "compress memory", $0 == "consolidate" | |
forget | "forget that", "delete memory", "redact", $0 == "forget" | |
list | "list memory", "what scopes do I have", $0 == "list" |
State the detected operation and resolved scope in one line before continuing. Example:
Operation: write
Scope: parenting
Storage tier: home (~/.agent-memory/parenting/)
If no scope is provided, ask once (single batched message) — never guess.
Load on demand — do not preload.
rules/storage-layout.md)Three tiers; the user picks per invocation, or accepts the default.
| Tier | Path | Committed? | Default for |
|---|---|---|---|
home (default) | ~/.agent-memory/<scope>/ | No | Personal scopes (parenting, work) |
project-local | <repo>/.agent/memory/<scope>/ | No (gitignore) | Per-project private notes |
project-shared | <repo>/memory/<scope>/ | Yes | Team-shared project knowledge |
Per-scope directory layout (identical across tiers):
<storage-root>/<scope>/
├── INDEX.md # Curated, ≤ 200 lines; always loaded by `read`
├── entries/ # Individual memory entries; loaded on demand
│ └── <yyyy-mm-dd>-<slug>.md
├── archive/ # Consolidated / superseded entries (audit trail)
└── AUDIT.log # Append-only ledger of write / consolidate / forget
Every operation is gated. Do not proceed to the next phase until the prior phase's gate passes.
write (default)| Phase | Name | Rule | Gate |
|---|---|---|---|
| 0 | Resolve scope + tier | rules/storage-layout.md | Scope name + storage tier confirmed; directory created |
| 1 | Privacy pre-flight | rules/privacy-and-consent.md | No secrets / PII on the never-store list slip through |
| 2 | Extract candidates | rules/write-pipeline.md | Candidate list produced with type, confidence, source per item |
| 3 | Compare to existing | rules/write-pipeline.md | Each candidate tagged ADD / UPDATE / DELETE / NOOP |
| 4 | Consent preview | rules/privacy-and-consent.md | User saw the diff and approved (unless --auto flag) |
| 5 | Write + audit | rules/write-pipeline.md | INDEX updated, entry files written, AUDIT.log line appended |
read| Phase | Name | Rule | Gate |
|---|---|---|---|
| 0 | Resolve scope | rules/storage-layout.md | Scope directory exists; INDEX.md present (or report empty) |
| 1 | Load INDEX | rules/read-pipeline.md | INDEX content surfaced to current conversation |
| 2 | On-demand fetch | rules/read-pipeline.md | Detail entries fetched only when INDEX points to them |
consolidate| Phase | Name | Rule | Gate |
|---|---|---|---|
| 0 | Snapshot | rules/consolidate-pipeline.md | Pre-consolidation state captured (path + file count) |
| 1 | Group + merge | rules/consolidate-pipeline.md | Semantically similar entries grouped; merge plan drafted |
| 2 | Prune stale | rules/consolidate-pipeline.md | Entries past staleness cutoff flagged for archive |
| 3 | Preview + apply | rules/consolidate-pipeline.md | User saw before / after summary and approved |
| 4 | Rewrite INDEX | rules/consolidate-pipeline.md | INDEX reflects new state; AUDIT.log appended |
forget| Phase | Name | Rule | Gate |
|---|---|---|---|
| 0 | Resolve target | rules/forget-pipeline.md | Memory id, slug, or query resolves to exactly one entry set |
| 1 | Show + confirm | rules/forget-pipeline.md | User saw the entries and explicitly confirmed |
| 2 | Delete or redact | rules/forget-pipeline.md | Entries removed (or redacted); INDEX + AUDIT.log updated |
listWalk every storage tier the user has enabled, print every scope with entry counts and last-updated timestamps. No writes.
This skill is model-invocable (disable-model-invocation: false)
so host workflows can call it programmatically. Two ways to invoke it:
/persistent-memory write parenting
or /persistent-memory read parenting.SKILL.md
contains a one-line pointer block that calls
Skill("persistent-memory", "read <scope>") when the host runs.The second form is the canonical integration. Runtime Skill() calls
require disable-model-invocation: false — without it the Skill tool
refuses the call at the harness layer (you'd see
Skill X cannot be used with Skill tool due to disable-model-invocation).
See
rules/integration-with-skills.md
for the full contract and the literal snippet at
templates/pointer-snippet.md.
| Pattern | Token cost | Magic | Best for |
|---|---|---|---|
| Pointer | INDEX only, on skill load | None | The default. Explicit, debuggable, no hook. |
| Hook | INDEX every session | High | Always-on scopes (e.g. a personal assistant). |
For the parenting example: add one block to parenting/SKILL.md:
> **Persistent memory:** Before responding, run
> `Skill("persistent-memory", "read parenting")` to load accumulated
> context for this scope.
rules/scaling-tiers.md)| Tier | Backend | Use when |
|---|---|---|
| 1 | Plain markdown (this skill, default) | ≤ ~500 entries per scope, single user, no semantic search needed |
| 2 | Markdown + SQLite FTS index (this skill, opt-in) | Up to ~5k entries per scope, keyword search beats full-INDEX scan |
| 3 | Markdown blobs + local vector DB (Chroma, Qdrant) | Semantic recall ("what did we discuss about X") matters |
| 4 | Managed memory layer (Mem0, Letta, Zep) | Multi-user, multi-tenant, > 10k entries, graph relationships, hosted SLA |
Graduate one tier at a time. The skill ships a migration recipe in
rules/scaling-tiers.md for moving from
markdown to SQLite, and from SQLite to a vector DB, without losing
entries.
--auto is passed; secrets and PII on the never-store
list are refused outright.forget operation is part of
the surface, not an afterthought. Required for privacy and for
pruning entrenched mistakes (see Reflexion entrenchment warning).parenting, health, work etc. so the INDEX stays under 200 lines.rules/anti-patterns.md)~/.agent-memory/ to a public repo.A write run is done when:
--auto flag was explicit).A read run is done when:
A consolidate run is done when:
A forget run is done when:
--confirm flag).references/research-sources.md (opens in a new tab)rules/anti-patterns.md (opens in a new tab)rules/consolidate-pipeline.md (opens in a new tab)rules/forget-pipeline.md (opens in a new tab)rules/integration-with-skills.md (opens in a new tab)rules/memory-taxonomy.md (opens in a new tab)rules/privacy-and-consent.md (opens in a new tab)rules/quality-checklist.md (opens in a new tab)rules/read-pipeline.md (opens in a new tab)rules/scaling-tiers.md (opens in a new tab)rules/storage-layout.md (opens in a new tab)rules/write-pipeline.md (opens in a new tab)templates/INDEX.md (opens in a new tab)templates/lesson-entry.md (opens in a new tab)templates/memory-entry.md (opens in a new tab)templates/pointer-snippet.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Generated from the plugin's indexed repository (mthines/agent-skills) — no native marketplace selected
npx claudepluginhub p/mthines-mthines-agent-skills54 skills in this plugin
/ai-engineeringReviews and guides LLM/AI application engineering — prompts, caching, RAG, agent loops and tools, resilience, model migration, evals, prompt-injection defence, and observability. Invoke with /ai-engineering for "review my prompt", "set up RAG", or "write evals".
/animationsAuthors performant CSS-first web animations and picks the right feedback for an interaction — transitions, View Transitions, scroll-driven motion, Motion for React, reduced motion, and perceived performance. Triggers on "animate this", "hover effect", "feel faster", "skeleton loader", "/animations".
/animations-nativeAuthors performant React Native / Expo animations and gestures with Reanimated and react-native-gesture-handler on the UI thread; web animations go to `animations`. Triggers on "reanimated", "react native animation", "gesture handler", "swipe gesture", "/animations-native".
/atelierTakes one change from request to merged PR by sequencing existing skills — aw builds the draft PR, prepare gets it green, a deterministic gate allows the squash-merge only when a user-visible diff that needs a rollout ships behind a deployment-verify flag contract, or a small one carries a classed no-flag marker (and, in a repo with a hosted service, every diff carries a contract or an opt-out) — then reads the default-branch pipeline, fixes a red one once, verifies a no-flag change on the deploy with deployment-verify, and says what a human does next. Resumable from a sticky PR comment; invoke with /atelier.
/attach-mediaUploads local screenshots and recordings to GitHub and embeds them in a PR or issue body or comment as inline-rendering user-attachments URLs, via `gh --attach` with a curl fallback; never writes placeholders. Triggers on "attach screenshots to the PR", "upload this recording to the PR", "/attach-media".
/autonomous-workflowThe phase machinery (0–7) behind the `aw` dispatcher: task intake through a tested draft PR in an isolated worktree, gated by the plan.md brief and the run-checks.mjs sentinel, with companions that never block. Not the entry point — natural-language requests for autonomous work go to the `aw` skill; invoke /autonomous-workflow only to run the phases directly.
Other plugins' skills for the same job