ai-memory
Skill1 starsChanged 33 days agoMITView on GitHub
Persistent memory system for AI assistants. Use at session start to load relevant context, and at session end to compress and save memories. Triggers on: "remember this", "what did we decide", "save session", "load context", memory search, or when context is getting full.
- Reads credentials
2 other projects use a version of this.
Adopted by
Most recently taken up by
- xobi667/ai-memorytheir own version, first seen Nov 1, 2026
- lucifertrj/skills-based-apptheir own version, first seen Apr 11, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- lucifertrj/skills-based-app★ 18same name
- xobi667/ai-memory★ 0same name
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.
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
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 34
Check long-term memory: if available:
- Distinctive: line 41
When user asks "what did we decide about X" or similar:
- Distinctive: line 48
When significant work was done (user says "save", "done", or session ending):
- Very specific: line 115
API error: Check echo $GEMINI_API_KEY
- Distinctive: line 116
Not installed: Run installation commands above
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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
AI Memory Skill
Provides long-term memory through compression and semantic search, using the Gemini API.
Quick Commands
# Search for relevant past work
memory search "<topic>"
# Compress current session
memory compress "<summary of accomplishments>"
# List recent memories
memory listSession Protocol
On Session Start (MANDATORY)
- Search for relevant context:
memory search "<main topic of today's work>"- Load top results into your working context (up to 3)
- Check long-term memory if available:
cat MEMORY.md 2>/dev/null | head -100During Session
When user asks "what did we decide about X" or similar:
memory search "X decision"On Session End
When significant work was done (user says "save", "done", or session ending):
memory compress "Summary: [what was accomplished]. Decisions: [key decisions]. TODO: [pending items]"What to Compress
✅ Include:
- Technical decisions with reasoning
- Configurations that worked
- Bug fixes and solutions
- Important deadlines/milestones
- Learned patterns
❌ Skip:
- Greetings, small talk
- Failed attempts (unless lesson matters)
- Easily Googled information
Search Tips
# Broad search
memory search "authentication"
# Specific decision
memory search "why we chose postgres"
# Find action items
memory search "todo pending tasks"Example Workflow
# Session start
$ memory search "user authentication"
📚 Found 2 relevant memories:
[ctx-20260205-abc] Set up OAuth2 with Auth0...
[ctx-20260201-def] Decided against custom JWT...
# Work happens...
# Session end
$ memory compress "Implemented refresh token rotation for OAuth2. Added /refresh endpoint. Tests passing. TODO: Add rate limiting."
✅ Saved: ctx-20260207-xyz
📊 Compression: 25:1Integration
This skill requires the memory CLI to be installed:
# Check if installed
which memory || echo "Not installed"
# Install if missing
git clone https://github.com/jamesarslan/ai-memory-system.git ~/ai-memory-system
sudo ln -s ~/ai-memory-system/scripts/gemini-compress.py /usr/local/bin/memory
export GEMINI_API_KEY="your-key"Troubleshooting
No results: Try broader search terms
API error: Check echo $GEMINI_API_KEY
Not installed: Run installation commands above
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.

