MemoryAgent — Prompt Files (Verbatim Excerpts)
Excerpt 1: memory-manage Skill — analyze Command Definition
Source: skills/memory-manage/SKILL.md
Prompting technique: Structured output contract — the skill specifies an exact 7-section report template that the agent must produce. This is a "fill the template" pattern ensuring consistent, machine-parseable memory analysis.
### `analyze` — Exploratory Analysis
Usage: `/memory analyze [file]`
**This is the most important command.** Perform a comprehensive exploratory analysis of the memory file to build context for subsequent work.
Steps:
1. Read the entire memory file using the **Read** tool
2. Produce a structured analysis report with the following sections:
Memory Analysis Report
Summary
One-paragraph overview of what the memory contains — its scope, depth, and overall theme.
Topics
Bulleted list of distinct topics and themes found in the memory, ordered by frequency or importance.
Key Entities
People, projects, tools, technologies, and decisions mentioned. Group by category.
Timeline
Chronological progression of events or knowledge, if timestamps or temporal references exist.
Relationships
Connections between topics — how different pieces of memory relate to each other.
Knowledge Gaps
What information is missing, incomplete, or unclear. What questions remain unanswered.
Suggested Next Steps
Concrete, actionable recommendations for what the agent (or user) could do next based on the memory content. These should be specific enough to serve as task descriptions.
3. This report is designed to give the agent (or a sub-agent) a **basic info foundation** — enough context to understand the situation and continue working on downstream tasks without needing to re-read the full memory file.
Source: skills/memory-manage/SKILL.md
Prompting technique: Enforced structured append — the command specifies exact timestamped format for every entry, ensuring the memory file remains parseable by the search and analyze commands.
### `record` — Append to Memory
Usage: `/memory record <content> [file]`
Append new information to the memory file.
**Format each entry as:**
[YYYY-MM-DD HH:MM]
```
- Use the current date and time for the timestamp
- Derive a short topic label (3-5 words) from the content
- If the file does not exist, create it with a header line:
# Memory File
- Use the Read tool to get existing content, then Write to append the new entry
- Do NOT overwrite existing content — always append
## Excerpt 3: `memory-manage` Skill — Design Principles (Closing Section)
Source: `skills/memory-manage/SKILL.md`
**Prompting technique**: Iron-law constraints at end of skill — four non-negotiable rules placed after all the command definitions, ensuring they are enforced regardless of which command is invoked.
```markdown
## Design Principles
- **Files are memory** — all knowledge is persisted as human-readable text files
- **Native tools only** — use Read, Write, Edit, Grep, and Glob; no external dependencies
- **Human-auditable** — users can open and edit memory files directly at any time
- **Timestamp everything** — every recorded entry gets a timestamp for chronological tracking
- **Analyze before acting** — the `analyze` command provides the foundation for informed decision-making