Loading...
Loading...
Git-Notes-Based knowledge graph memory system. Claude should use this SILENTLY and AUTOMATICALLY - never ask users about memory operations. Branch-aware persistent memory using git notes. Handles context, decisions, tasks, and learnings across sessions.
npx skill4agent add sundial-org/awesome-openclaw-skills git-notes-memory# Replace $SKILL_PATH with actual path to memory.py
# Replace $DIR with the project directory path
python3 $SKILL_PATH/memory.py -p $DIR <command>| Command | When to Use |
|---|---|
| ALWAYS at session start |
| At session end (optional but recommended) |
| Store important information |
| Retrieve context about a topic |
| Full-text search across all memories |
| Get full details of a specific memory |
| Flag | Level | When to Use |
|---|---|---|
| Critical | User says "always remember", "never forget", explicit preferences |
| High | Decisions, architecture choices, user corrections, preferences |
| Normal | General information (default) |
| Low | Temporary notes, might be pruned |
sync --startpython3 $SKILL_PATH/memory.py -p $DIR sync --start{
"b": "main", // Current git branch
"t": {"api": 5, "auth": 3}, // Top topics with memory counts
"c": [...], // Critical memories (always review these)
"n": 42, // Total memory count
"h": [...] // High-importance recent memories
}-i h-i h-i c-i n-i nget <topic>search "<keywords>"python3 $SKILL_PATH/memory.py -p $DIR sync --end '{"summary": "Brief session summary"}'{"decision": "Use React for frontend", "reason": "Team expertise", "alternatives": ["Vue", "Angular"]}{"preference": "Detailed explanations", "context": "User prefers thorough explanations over brief answers"}{"topic": "Authentication", "learned": "OAuth2 flow requires redirect URI configuration"}{"task": "Implement user dashboard", "status": "in progress", "blockers": ["API not ready"]}{"subject": "Project Architecture", "note": "Microservices pattern with API gateway"}-t architecture,backend-t urgent,bug-t meeting,requirementssync --startpython3 $SKILL_PATH/memory.py -p $DIR sync --startsync --endpython3 $SKILL_PATH/memory.py -p $DIR sync --end '{"summary": "Implemented auth flow"}'rememberpython3 $SKILL_PATH/memory.py -p $DIR remember '{"key": "value"}' -t tag1,tag2 -i hgetpython3 $SKILL_PATH/memory.py -p $DIR get authenticationsearchpython3 $SKILL_PATH/memory.py -p $DIR search "database migration"recall# Get full memory by ID
python3 $SKILL_PATH/memory.py -p $DIR recall -i abc123
# Get memories by tag
python3 $SKILL_PATH/memory.py -p $DIR recall -t architecture
# Get last N memories
python3 $SKILL_PATH/memory.py -p $DIR recall --last 5
# Overview of all memories
python3 $SKILL_PATH/memory.py -p $DIR recallupdate# Replace content
python3 $SKILL_PATH/memory.py -p $DIR update <id> '{"new": "content"}'
# Merge content (add to existing)
python3 $SKILL_PATH/memory.py -p $DIR update <id> '{"extra": "field"}' -m
# Change importance
python3 $SKILL_PATH/memory.py -p $DIR update <id> -i c
# Update tags
python3 $SKILL_PATH/memory.py -p $DIR update <id> -t newtag1,newtag2evolvepython3 $SKILL_PATH/memory.py -p $DIR evolve <id> "User changed preference to dark mode"forgetpython3 $SKILL_PATH/memory.py -p $DIR forget <id>entitiespython3 $SKILL_PATH/memory.py -p $DIR entitiesentitypython3 $SKILL_PATH/memory.py -p $DIR entity authenticationbranchespython3 $SKILL_PATH/memory.py -p $DIR branchesmerge-branchpython3 $SKILL_PATH/memory.py -p $DIR merge-branch feature-authmerge-branch1. User on main branch → memories stored in refs/notes/mem-main
2. User creates feature branch → auto-inherits main's memories
3. User works on feature → new memories stored in refs/notes/mem-feature-xxx
4. After git merge → run merge-branch to combine memories| Type | Trigger Words |
|---|---|
| decided, chose, picked, selected, opted, going with |
| prefer, favorite, like best, rather, better to |
| learned, studied, understood, realized, discovered |
| todo, task, need to, plan to, next step, going to |
| wondering, curious, research, investigate, find out |
| noticed, observed, important, remember that |
| completed, finished, done, achieved, milestone |
| (default for unclassified content) |
topicsubjectnamecategoryareaproject#cooking#urgent#v2"machine learning""user authentication"ReactPostgreSQLMonday{
"b": "feature-auth", // Current branch
"t": {"auth": 5, "api": 3, "db": 2}, // Topics with counts
"c": [{"id": "x", "s": "summary", "t": "preference"}], // Critical
"n": 15, // Total count
"h": [{"id": "y", "s": "summary"}] // High importance
}{
"topic": "auth",
"mem": [
{"id": "abc", "s": "decided OAuth2", "t": "decision", "i": "h", "b": "main"}
]
}{
"d": {"decision": "Use OAuth2"}, // Full data
"e": ["auth", "oauth2"], // Entities
"t": "decision", // Type
"g": ["architecture"], // Tags
"i": "h", // Importance
"b": "main", // Branch
"c": "2024-01-15T10:30:00", // Created
"u": "2024-01-15T10:30:00", // Updated
"a": 3, // Access count
"ev": [{"n": "note", "t": "..."}] // Evolution notes (if any)
}User: "Let's build a REST API with Python"
Claude: [silently: remember '{"decision": "REST API", "language": "Python"}' -t architecture -i h]
[responds about REST API setup WITHOUT mentioning memory]
User: "I prefer FastAPI over Flask"
Claude: [silently: remember '{"preference": "FastAPI over Flask", "reason": "user preference"}' -i h]
[continues discussion using FastAPI WITHOUT saying "I'll remember"]
User: "What did we decide about the API?"
Claude: [silently: get api]
[uses retrieved context to answer accurately]
User: "Actually, let's use Flask instead"
Claude: [silently: remember '{"decision": "Changed to Flask", "previous": "FastAPI"}' -i h]
[silently: evolve <fastapi-memory-id> "User changed preference to Flask"]
[acknowledges change WITHOUT mentioning memory update]searchentitiesrecall --last 10sync --startbranchesgit mergemerge-branch <source-branch>git checkoutsync --start