memory
Skill19 starsChanged 10 months agoMITView on GitHub
a file-based long-term memory using a single JSONL file, with append-only writes and recent-window search via bash + jq.
We split this skill into the rules it gives an agent
8 rules. 0 are common, 7 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 75 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use this skill proactively for all user prompt that can benefit from memory across sessions, even if the user does not ask.
- Distinctive: line 26
Never rewrite existing lines.
- Distinctive: line 32
MUST generate valid JSON with correct escaping.
- Very specific: line 33
Use jq to stringify/escape safely, then append: jq -cn --arg ts "$(date -u '+%Y-%m-%dT%H:%M:%SZ')" --arg type "$type" --arg content …
- Distinctive: line 37
If tags/meta are not provided, write null or omit fields (choose one consistent approach).
- Distinctive: line 47
If results < limit, expand window_lines exponentially (e.g., *4) up to a max (e.g., 1,000,000 lines) then stop.
- Distinctive: line 68
Make sure commands are safe with arbitrary user text (proper quoting).
- Distinctive: line 69
Ensure the skill returns structured JSON to the agent, not raw text logs.
“Common” is measured: kept by at least 6 in 10 of the 75 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Use this skill proactively for all user prompt that can benefit from memory across sessions, even if the user does not ask.
Goal
- Provide two tools: memory_write and memory_search.
- Memory is stored in a single append-only JSONL file on disk.
- Writes must always append one valid JSON object per line (JSONL).
- Reads should prioritize recent entries by searching from the end via a tail window, and only expand the window if needed.
Storage
- File path, default MEMORY_FILE=~/.codex/memory.jsonl (create if missing).
- Each line is one JSON object with at least:
- ts: ISO8601 timestamp
- type: string (e.g., "note", "fact", "task", "todo")
- content: string (raw text)
- tags: optional array of strings
- meta: optional object
- Never rewrite existing lines. Append-only only.
Quick start
memory_write(input)
- Input: {type, content, tags?, meta?}
- MUST generate valid JSON with correct escaping; do not hand-build JSON strings.
- Use jq to stringify/escape safely, then append:
jq -cn --arg ts "$(date -u '+%Y-%m-%dT%H:%M:%SZ')" --arg type "$type" --arg content "$content"
--argjson tags "$tags_json_or_null" --argjson meta "$meta_json_or_null"
'{ts:$ts,type:$type,content:$content,tags:$tags,meta:$meta}' >> memory.jsonl - If tags/meta are not provided, write null or omit fields (choose one consistent approach).
memory_search(query)
- Input: {q: string, limit: int=20, window_lines: int=50000, mode: "rg"|"jq"|"hybrid"="hybrid"}
- Default behavior (hybrid):
- tail -n window_lines memory.jsonl
- rg the query string (treat q as a literal substring by default; optionally support regex if q starts with /.../)
- from matches, parse/validate lines with jq (ignore malformed lines)
- return the most recent results first (since tail window is recent; preserve original order within window, or reverse if easier)
- If results < limit, expand window_lines exponentially (e.g., *4) up to a max (e.g., 1,000,000 lines) then stop.
- Output: {results: [json objects], truncated: bool, used_window_lines: int}
Executable scripts
This skill includes runnable reference implementations for the two interfaces:
memory/scripts/memory_write(reads JSON from stdin; appends 1 JSONL line; prints JSON result)memory/scripts/memory_search(reads JSON from stdin; searches recent window; prints JSON result)
Examples:
printf '%s' '{"type":"note","content":"User prefers Python.","tags":["preference"]}' | memory/scripts/memory_write
printf '%s' '{"q":"Python","limit":5}' | memory/scripts/memory_searchCLI requirements
- Depend on standard unix tools: bash, touch, tail, rg (ripgrep), jq.
- Provide fallbacks: if rg missing, use grep; if jq missing, fail with a clear error.
- Make sure commands are safe with arbitrary user text (proper quoting).
- Ensure the skill returns structured JSON to the agent, not raw text logs.
Other versions88 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 88
- google-gemini/gemini-cli★ 109ksame name
- jlia0/tinyclaw★ 3.6ksame name
- TinyAGI/tinyagi★ 3.6ksame name
- TinyAGI/tinyclaw★ 3.6ksame name
- Chachamaru127/claude-code-harness★ 3.2ksame name
- codeaholicguy/ai-devkit★ 1.7ksame name
- Muuuun/luxas★ 1.2ksame name
- shobcoder/shob★ 575same name
- boshu2/agentops★ 452same name
- ambient-code/platform★ 131same name
78 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use send-user-message, ecosystem-reference and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
Maliot100XSkillsend-user-message
Send a proactive message to a paired user via their channel (Discord, Telegram, or WhatsApp). Use when the agent needs to notify, alert, or send an unsolicited message to a user — especially during heartbeat invocations, scheduled tasks, or when the agent wants to reach out without a prior user message in the current conversation. Triggers: 'send message to user', 'notify user', 'alert user', 'message the user on discord/telegram/whatsapp', or any need to proactively communicate with a paired sender.
Also in 4 projects that use this
naman10parikhSkillecosystem-reference
Quick-access directory of Claude Code ecosystem repos, skills, plugins, MCPs, and patterns. Use when improving the harness.
Also in 3 projects that use this
naman10parikhSkillfractal-delegation
Also in 3 projects that use this
jlia0Skilltinyagi-admin
Manage and operate the TinyAGI system itself — agents, teams, settings, queue, tasks, daemon lifecycle, and source code. Use when the agent needs to: list/add/remove/update agents or teams, check queue status, view logs, start/stop/restart TinyAGI, change settings (provider, model, channels), send messages to the queue, manage tasks, retry dead-letter messages, view recent responses, modify TinyAGI source code or configuration, or perform any administrative operation on the TinyAGI platform. Triggers: 'manage tinyagi', 'add an agent', 'remove a team', 'check queue', 'view logs', 'restart tinyagi', 'change provider', 'update settings', 'create a task', 'modify tinyagi code'.
Also in 3 projects that use this
- +8 more from naman10parikh
In this repository48 other files it gives its agents.
- astropySkill
- brainstormingSkill
- causal-inference-root-causeSkill
- decision-matrixSkill
- decomposition-reconstructionSkill
- design-of-experimentsSkill
- docxSkill
- equivariant-architecture-designerSkill
- estimation-fermiSkill
- fairchemSkill
- fluidsimSkill
- latex-postersSkill
- markitdownSkill
- materials-databasesSkill
- materials-propertiesSkill
- meta-prompt-engineeringSkill
- model-equivariance-auditorSkill
- openmxSkill
- pdfSkill
- planningSkill
- postmortemSkill
- pptxSkill
- pymatgen-analysisSkill
- pymatgen-coreSkill
- pymatgen-electronic-structureSkill
- pymatgen-extSkill
- pymatgen-ioSkill
- pymatgen-io-vaspSkill
- pymatgen-phononSkill
- pymatgen-symmetrySkill
- python-aseSkill
- python-jaxSkill
- python-multiobjective-optimizationSkill
- python-optimizationSkill
- python-plottingSkill
- python-regression-statisticsSkill
- pytorch-lightningSkill
- scikit-learnSkill
- skill-creatorSkill
- symmetry-discovery-questionnaireSkill
- symmetry-group-identifierSkill
- symmetry-validation-suiteSkill
- sympySkill
- systems-thinking-leverageSkill
- torch-geometricSkill
- transformersSkill
- vaspSkill
- xlsxSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

