agentleFS
jamesarslanjamesarslan/ai-memory-system/skill/SKILL.md

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

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. lucifertrj/skills-based-app★ 18same name
    2. 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
  1. Distinctive:

    Check long-term memory: if available:

    line 34
  2. Distinctive:

    When user asks "what did we decide about X" or similar:

    line 41
  3. Distinctive:

    When significant work was done (user says "save", "done", or session ending):

    line 48
  4. Very specific:

    API error: Check echo $GEMINI_API_KEY

    line 115
  5. Distinctive:

    Not installed: Run installation commands above

    line 116

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

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

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 list

Session Protocol

On Session Start (MANDATORY)

  1. Search for relevant context:
memory search "<main topic of today's work>"
  1. Load top results into your working context (up to 3)
  2. Check long-term memory if available:
cat MEMORY.md 2>/dev/null | head -100

During 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:1

Integration

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

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.