agentleFS
sufficiently-advanced-aisufficiently-advanced-ai/imi/skills/core/memory-wrap/SKILL.md

memory-wrap

Skill8 starsChanged 41 days agoMITView on GitHub

At the end of a working session, find the decisions, facts and lessons worth keeping and save the ones the user approves to their imi knowledge base. Use when the user says "wrap up", "anything worth saving", "memory check", "let's close out", "save anything important", "before we go", or when a substantive session winds down after real decisions were made or new facts surfaced. Works with any imi domain.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    All tools below are on the imi MCP server (possibly prefixed, e.g.

    line 17
  2. Distinctive:

    If no imi tools are available, say so and stop.

    line 18
  3. Very specific:

    Run 2–3 memory_recall queries on the main subjects, people and projects of the session, with record_kinds ["capture", "agent_memory"].

    line 22
  4. Distinctive:

    Wait for the answer. Save nothing without it.

    line 50
  5. Distinctive:

    Never try to mark memories confirmed yourself.

    line 68

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Memory Wrap

Turn the durable part of this conversation into memory. The bar: would knowing this in six months change how the user works or decides? If yes, propose it. If it is marginal, skip it. This is not a log of the conversation.

All tools below are on the imi MCP server (possibly prefixed, e.g. mcp__imi__capture_thought). If no imi tools are available, say so and stop.

1. Check what imi already knows

Run 2–3 memory_recall queries on the main subjects, people and projects of the session, with record_kinds ["capture", "agent_memory"]. Do not read everything — just enough to avoid proposing what is already stored. Keep each request_id.

2. Pick candidates (be skeptical)

  • Decision — a concrete choice about the work, its direction or process.
  • Fact — specific, non-obvious, new information about people, organizations, systems, commitments.
  • Lesson — an insight, a named concept, a way of framing something that clicked.

Skip anything already stored, process chatter without a conclusion, things that only matter inside this conversation, and anything vague. Never propose secrets, credentials, access tokens, or large pasted code or transcripts.

Aim for 3–7. If you have 10+, tighten the filter. If there is nothing, say so — not every session produces durable knowledge.

3. Ask before saving

Found 4 things worth saving — "all", "none", or numbers (e.g. "1, 3"):

1. [DECISION] <one self-contained sentence> · tags: a, b, c
2. [FACT] ...
3. [LESSON] ...

Wait for the answer. Save nothing without it.

4. Save what was approved

Choose the tool by shape:

  • A few standalone items — one capture_thought per item: content = the item, prefixed with its type ([DECISION], [FACT], [LESSON]) and expanded enough to stand alone months from now; tags = the proposed tags plus the type; source = "manual". deduped: true means imi already had it — nothing more to do.
  • An end-of-task batch (the session finished a defined piece of work) — one memory_writeback with memory_payload holding decisions, lessons, next_steps, unresolved_questions as lists of strings, and an idempotency_key that is stable for this session (e.g. the date plus a short slug), so a retry does not duplicate.

What you save is evidence, pending review (ADR-002): searchable immediately, but it only becomes instruction-grade when the user confirms it in imi's review queue. The user's "yes" here decides what is written, not what is trusted — say so in one line when reporting. Never try to mark memories confirmed yourself.

5. Report and close the loop

One line: how many saved, how many already present. Then call record_memory_usage for each recall request_id, listing the record ids that changed what you proposed or skipped.

Tone

Housekeeping, not ceremony. The list should take ten seconds to review.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.