milad-ahmd/agent-skills / skills/agent-memory-keeper
agent-memory-keeper
VerifiedCarries a coding agent's context across sessions with two files. MEMORY.md holds durable project lessons (verified commands, conventions, decisions, gotchas, user preferences); it is loaded at the start of work and updated whenever the user corrects the agent. HANDOFF.md holds the state of the current task (goal, status checklist, exact next step, failed attempts, open questions, branch and uncommitted files); it is written when a session ends mid-task and checked against git when the next session resumes. Use when the user says "remember this", "don't forget", "forget that note" or "what do you remember", says "write a handoff", "I'm running out of context", "continue this in a new session", "pick up where we left off", or "hand this to another agent or a teammate", and at the start of any session in a repo with MEMORY.md or HANDOFF.md.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 5.8 KB |
| references/handoff-template.md | markdown | 3.6 KB |
| scripts/handoff.py | script | 23.1 KB |
| scripts/test_handoff.py | script | 14.0 KB |
references/handoff-template.md
View on GitHub# HANDOFF.md template
`python3 scripts/handoff.py --write HANDOFF.md` writes this skeleton with the Git state section filled in. Replace every `<fill in …>` and keep the whole file under about 60 lines. Write facts, not a story of the session.
````markdown
# Handoff: <task name>
_Written 2026-10-29 17:40. Narrative sections by the agent; Git state by handoff.py, regenerate rather than edit._
## Goal
Make the CSV import skip blank rows instead of failing ("the import dies on empty lines")
## Status
- [x] Reproduced with `fixtures/blank_rows.csv`
- [x] Parser skips blank rows (`src/importer/csv.py`)
- [ ] In progress: row numbers in error messages are off by the skipped count
- [ ] Not started: changelog entry
## Next step
`src/importer/csv.py:88`: pass `source_line` instead of `index` to `RowError`, then run `pytest tests/importer -k blank`
## Decisions
- Skip blank rows silently, no warning: the user said warnings would flood the log for exported sheets
- Kept `csv.reader`, no pandas: import runs in the slim worker image
## Tried and failed
- `skipinitialspace=True`: does not drop rows that are only commas
- Filtering with `any(row)` before parsing: breaks quoted multi-line cells
## Open questions
- Should a file with only blank rows be an error or an empty import?
## Verify
```bash
pytest tests/importer -k blank
python -m importer fixtures/blank_rows.csv --dry-run
```
## Git state
- Repo: shop-api
- Branch: fix/csv-blank-rows
- HEAD: 3f9c2e1 Skip blank rows in CSV import
- Upstream: origin/fix/csv-blank-rows (ahead 1, behind 0)
- Base: origin/main (merge-base a71d0b4; 2 commits on this branch, 3 files changed)
- In progress: none
- Stash: 0
- Uncommitted: 2 (0 staged, 1 unstaged, 1 untracked, 0 conflicted)
- .M src/importer/csv.py
- ?? fixtures/blank_rows.csv
## Links
- Issue #412, Slack thread with the failing export
````
## What goes in each section
| Section | Write | Avoid |
|---|---|---|
| Goal | One line, quoting the user where possible | A restated plan |
| Status | A checklist: done `[x]`, in progress `[ ]` with how far, not started `[ ]` | Paragraphs |
| Next step | One command or `file:line` plus the action, so a cold reader can start in a minute | "Continue the work", "finish the feature" |
| Decisions | The choice and the reason, including choices the user made | Choices nobody would question |
| Tried and failed | What was tried and the concrete reason it failed | Things that worked |
| Open questions | Only what the user must answer; "none" is fine | Questions the next session can answer by reading code |
| Verify | Commands that prove the work so far, the ones you actually ran | Untested commands |
| Git state | Generated by the script. If the state changed after writing, run `handoff.py` again and paste the new block | Hand edits |
| Links | Issue, PR, design doc, thread | Secrets, tokens, signed URLs |
The script also prints commits on the branch, files changed and TODO/FIXME/XXX lines added. Keep them in the Git state block if they help the next session; drop them if the file gets long.
## Lifecycle
- One HANDOFF.md per task at the repo root (or wherever the user prefers). Overwrite it at each handoff with `--write HANDOFF.md --force`, then fill it in again.
- Lessons that outlive the task (a verified command, a gotcha, a preference) go to MEMORY.md at handoff time, not here.
- When the task is done, delete it, or move it to `docs/handoffs/<date>-<topic>.md` if the user wants a record.
- Keep it out of git (`.gitignore`) unless it is a handoff to a teammate through the branch. Committing it moves HEAD by one commit; `--check` recognises that case and does not call it drift.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |