agentleFS
nainishshafinainishshafi/developer-productivity-skills/.github/skills/save-memory/SKILL.md

save-memory

Skill1 starsChanged 4 days agoMITView on GitHub

Use when the user asks to "save memory", "record memory", "save to ledger", "save to sidecar", "record mistake", "save learning", "remember this decision", "log anti-pattern", "persist task context", or whenever the agent needs to record an architectural decision, active task context, or hard-won lesson learned from mistakes without context bloat.

3 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 3 are distinctive, and 3 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.

  • 3

    Very specific

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

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

    NO Raw Code Dumps: Never paste entire source files or diffs into summary.

    line 31
  2. Distinctive:

    NO Stack Traces or Logs: Never dump raw terminal outputs, stack traces, or base64 blobs into memory.

    line 32
  3. Distinctive:

    Mandatory Learnings: Every save MUST detail the specific mistake, trap, or wrong assumption that was made or avoided, why it happened, and …

    line 34
  4. Very specific:

    Summary Limit: Keep summary under 1,500 characters.

    line 35
  5. Very specific:

    Title Limit: Keep title under 150 characters, descriptive and searchable.

    line 36
  6. Distinctive:

    Ensure the returned response contains:

    line 69

≈ “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

Save Memory Skill

Persist high-signal, non-bloated project memory into the project-memory MCP server.

This skill strictly partitions memories into 3 categories (ledger, sidecar, journal), enforces crisp summaries (no raw data or stack traces), and mandates documenting learnings from mistakes and errors encountered or avoided.


The 3 Memory Categories

CategoryPurposeWhen to SaveRequired Structure
ledgerHigh-impact project truths & architectural decisionsPermanent conventions, tech stack choices, schema rules, security policiesSummary: Clear architectural truth or constraint.<br>Learnings: Rationale and traps avoided.
sidecarWhat the agent is currently working onActive task state, current WIP, pending refactoring stepsSummary: Active WIP status & next steps.<br>Learnings: Pitfalls to watch out for during current task.
journalSummary of the current session with learningsAt checkpoints or conclusion of a working sessionSummary: What was worked on and accomplished during the session.<br>Learnings: Key lessons learned, traps navigated, or mistakes made/avoided during the session.

[!IMPORTANT] Journal Entries Require BOTH Session Summary AND Learnings: A journal entry captures the summary of the current session with learnings. Never save a journal entry with just learnings alone! An agent reading the journal in a future session needs the context of what was accomplished/transpired in that session (summary) alongside what lessons and mistakes were learned/avoided (learnings).


Anti-Bloat Rules (STRICT)

  1. NO Raw Code Dumps: Never paste entire source files or diffs into summary. Use 2–4 concise bullet points.
  2. NO Stack Traces or Logs: Never dump raw terminal outputs, stack traces, or base64 blobs into memory.
  3. Session Summary WITH Learnings for Journal: For journal, summary captures the session's work and progress, and learnings captures the lessons learned and mistakes avoided. Both are required and must not be duplicates.
  4. Mandatory Learnings: Every save MUST detail the specific mistake, trap, or wrong assumption that was made or avoided, why it happened, and how to prevent it. Never write placeholder text like "none" or "n/a".
  5. Summary Limit: Keep summary under 1,500 characters.
  6. Title Limit: Keep title under 150 characters, descriptive and searchable.

Workflow

Step 1 — Classify the Memory

Select the category:

  • Is this a permanent project truth or architecture decision? → ledger
  • Is this transient context about what is currently being worked on? → sidecar
  • Is this a session summary with lessons and takeaways? → journal

Step 2 — Construct Summary and Extract Learnings

For a journal entry, construct both parts:

  1. summary (Current Session Summary): What was worked on, accomplished, or altered during the current session?
  2. learnings (Takeaways & Mistakes Avoided): What key lessons were learned, what errors or traps were encountered, and what rule ensures future sessions succeed?

Step 3 — Invoke save_memory via MCP

{
  "name": "save_memory",
  "arguments": {
    "category": "journal",
    "title": "Session: Scaffolded SQLite MCP Memory Server & Hybrid Search",
    "summary": "Completed initial scaffolding of project-memory MCP server with node:sqlite DatabaseSync and verified 40% semantic hybrid search test suite.",
    "learnings": "Native C++ node addons fail on Windows sandbox without build tools; standardizing on built-in node:sqlite DatabaseSync avoids node-gyp build failures completely.",
    "tags": ["sqlite", "mcp", "session-recap", "hybrid-search"]
  }
}

Step 4 — Verify Output

Ensure the returned response contains:

  • success: true
  • Clean MemorySummary object with ID and timestamps
  • Confirm that NO vector embeddings or raw payloads are returned

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.