---
name: Memory
slug: memory-3
category: AI Engineering
description: Memory updates persistent swarm notes when a user explicitly asks to remember, update, or forget durable information. It reads the current file first and applies minimal edits, not for one-off requests.
github: "https://github.com/SawyerHood/middleman/tree/main/apps/backend/src/swarm/skills/builtins/memory"
language: TypeScript
stars: 181
forks: 21
install: "npx degit https://github.com/SawyerHood/middleman/tree/main/apps/backend/src/swarm/skills/builtins/memory ~/.claude/skills/memory"
installs_to: ~/.claude/skills/memory
source_path: apps/backend/src/swarm/skills/builtins/memory/SKILL.md
collection_size: 4
category_size: 3475
collection_url: "https://dirskills.com/collections/SawyerHood/middleman"
added: 2026-09-07T05:20:19.607Z
last_synced: 2026-09-07T05:20:19.607Z
canonical_url: "https://dirskills.com/skills/memory-3"
---

# Memory

Memory updates persistent swarm notes when a user explicitly asks to remember, update, or forget durable information. It reads the current file first and applies minimal edits, not for one-off requests.

**Install:**

```bash
npx degit https://github.com/SawyerHood/middleman/tree/main/apps/backend/src/swarm/skills/builtins/memory ~/.claude/skills/memory
```

## README

# Persistent Memory Workflow

Use this skill when the user explicitly asks to:

- remember something for later,
- update previously remembered facts/preferences, or
- forget/remove stored memory entries.

Do not write memory for normal one-off requests.

## File location

- Persistent memory files are stored at `${SWARM_DATA_DIR}/memory/<agentId>.md`.
- In this runtime, use `${SWARM_MEMORY_FILE}` (also shown in your loaded context).

## Steps

1. Read the current memory file with `read` before changing it.
2. Apply minimal edits:
   - prefer `edit` for targeted changes,
   - use `write` only for full rewrites.
3. Keep entries concise, factual, and durable.
4. Never store secrets (passwords, API keys, tokens, private keys) or highly sensitive personal data.
5. If the request is ambiguous, ask a clarifying question before writing.
6. After updating memory:
   - manager: confirm the update to the user via `speak_to_user`,
   - worker: report the update back to the manager via `send_message_to_agent`.
