memory-commit
Skill13 starsChanged 9 months agoApache-2.0View on GitHub
Use when the user explicitly says "remember this", "save this", "ghi nho", "luu lai", "save for next time", or otherwise asks to persist the immediately preceding context. Captures with the appropriate context_type (decision, preference, fact, skill, task, conversation) so future sessions can retrieve it accurately.
In this repository6 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- knowledge-auditSkill
- recall-contextSkill
- session-handoffSkill
- temporal-querySkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 9 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
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
- Distinctive: line 20
After a deliberate decision: "we picked X because Y"
- Distinctive: line 21
After a stated preference: "I always want X"
- Distinctive: line 22
After correcting the agent: high-value capture (prevents repeat)
- Distinctive: line 24
Do NOT trigger on incidental mentions or speculative options not yet chosen.
- Very specific: line 45
When ambiguous, ask the user one short question.
- Very specific: line 69
If the response includes deduplicated: true, surface the existing memory ID so the user can decide whether to update it instead.
- Distinctive: line 76
If the just-captured memory does not appear in top-3 results, rewrite with better keywords and re-capture (delete the original first).
- Distinctive: line 81
WHY not WHAT: every captured memory must explain reasoning.
- Distinctive: line 82
One insight per capture: do not cram multiple unrelated facts into one entry - they will not retrieve well.
- Distinctive: line 86
No ephemeral state: do not save "currently on line 42 of file X" or "the test is failing right now" - these will be wrong tomorrow.
- Distinctive: line 88
Honor user words: when the user dictates exact phrasing for a preference or decision, use their words verbatim.
≈ “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.
Files
Memory Commit
Manual capture of a single decision, preference, fact, skill, task, or
conversation snippet into mnemo. Enforces the "WHY not just WHAT" rule
and chooses the correct context_type so retrieval is precise.
When to Use
Trigger on explicit user signals:
- "remember this", "save this", "save for next time"
- "ghi nho", "luu lai", "nho lai"
- "let's commit this to memory", "store this"
- After a deliberate decision: "we picked X because Y"
- After a stated preference: "I always want X"
- After correcting the agent: high-value capture (prevents repeat)
Do NOT trigger on incidental mentions or speculative options not yet chosen.
Steps
- Identify the content the user wants to remember:
- Preceding 1-3 messages (default), OR
- A specific quoted span the user references, OR
- The current selection if invoked via slash command
Determine
context_typevia this decision tree:Signal context_type "we decided", "we picked X over Y", "going with" decision"I prefer", "I always want", "default to" preference"X is at version Y", env vars, API shapes, file locations fact"to do X you run Y then Z", procedure, how-to skill"todo", "remember to", deadline, "by Friday" tasknone of the above (general context) conversationWhen ambiguous, ask the user one short question. Do not silently default to
conversationfor high-signal content.- Compose the capture text with WHY included:
- BAD: "Use Polars"
- GOOD: "Use Polars for dataframes (not pandas) because the codebase processes 50M-row datasets and Polars is 20x faster than pandas in our benchmark."
- Capture via the typed action:
memory(action="capture", text="<composed text>", context_type="<chosen type>", category="<project-name or topic>", tags=["<topic>", "<scope>"]) Confirm to the user:
Saved as <context_type>. Memory ID: <id>. (Deduplicated against existing similar memory: <existing_id>.) # if applicableIf the response includes
deduplicated: true, surface the existing memory ID so the user can decide whether to update it instead.- Verify retrieval for high-stakes captures (decisions, corrections):
If the just-captured memory does not appear in top-3 results, rewrite with better keywords and re-capture (delete the original first).memory(action="search", query="<the keywords a future agent would use>", limit=3)
Quality Rules
- WHY not WHAT: every captured memory must explain reasoning.
- One insight per capture: do not cram multiple unrelated facts into one entry - they will not retrieve well.
- Specific over generic: include version numbers, file paths, percentages where relevant.
- No ephemeral state: do not save "currently on line 42 of file X" or "the test is failing right now" - these will be wrong tomorrow.
- Honor user words: when the user dictates exact phrasing for a preference or decision, use their words verbatim.
Examples
User: "Remember that we always use ruff format, not black."
memory(action="capture",
text="Use ruff format (not black) for Python formatting because ruff is the project standard - faster, single-binary, and configured in pyproject.toml.",
context_type="preference",
category="tooling",
tags=["python", "formatting"])User: "Ghi nho: deploy len VM dung make up-<service>, khong dung docker compose truc tiep."
memory(action="capture",
text="VM deployment: dung make up-<service> / make down-<service> de inject secrets tu skret SSM qua RUN macro. KHONG chay docker compose truc tiep tren VM (mat secret injection).",
context_type="skill",
category="deployment",
tags=["vm", "make", "skret"])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
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.

