git-notes-memoryGit-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.
Install via ClawdBot CLI:
clawdbot install mourad-ghafiri/git-notes-memoryThese rules are ABSOLUTE and must NEVER be violated:
# 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 |
|---------|-------------|
| sync --start | ALWAYS at session start |
| sync --end '{"summary":"..."}' | At session end (optional but recommended) |
| remember '{"..."}' -t tags -i h | Store important information |
| get | Retrieve context about a topic |
| search " | Full-text search across all memories |
| recall -i | Get full details of a specific memory |
| Flag | Level | When to Use |
|------|-------|-------------|
| -i c | Critical | User says "always remember", "never forget", explicit preferences |
| -i h | High | Decisions, architecture choices, user corrections, preferences |
| -i n | Normal | General information (default) |
| -i l | Low | Temporary notes, might be pruned |
Always run sync --start at the beginning of every session:
python3 $SKILL_PATH/memory.py -p $DIR sync --start
Output explains:
{
"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
}
Use this context to:
Silently remember when user:
-i h-i h or -i c-i n-i nRetrieve context when:
get search "" python3 $SKILL_PATH/memory.py -p $DIR sync --end '{"summary": "Brief session summary"}'
For decisions:
{"decision": "Use React for frontend", "reason": "Team expertise", "alternatives": ["Vue", "Angular"]}
For preferences:
{"preference": "Detailed explanations", "context": "User prefers thorough explanations over brief answers"}
For learnings:
{"topic": "Authentication", "learned": "OAuth2 flow requires redirect URI configuration"}
For tasks:
{"task": "Implement user dashboard", "status": "in progress", "blockers": ["API not ready"]}
For notes:
{"subject": "Project Architecture", "note": "Microservices pattern with API gateway"}
Use tags to categorize memories for better retrieval:
-t architecture,backend - Technical categories-t urgent,bug - Priority/type markers-t meeting,requirements - Source contextsync --startInitialize session, get context overview.
python3 $SKILL_PATH/memory.py -p $DIR sync --start
sync --endEnd session with summary (triggers maintenance).
python3 $SKILL_PATH/memory.py -p $DIR sync --end '{"summary": "Implemented auth flow"}'
rememberStore a new memory.
python3 $SKILL_PATH/memory.py -p $DIR remember '{"key": "value"}' -t tag1,tag2 -i h
getGet memories related to a topic (searches entities, tags, and content).
python3 $SKILL_PATH/memory.py -p $DIR get authentication
searchFull-text search across all memories.
python3 $SKILL_PATH/memory.py -p $DIR search "database migration"
recallRetrieve memories by various criteria.
# 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 recall
updateModify an existing memory.
# 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,newtag2
evolveAdd an evolution note to track changes over time.
python3 $SKILL_PATH/memory.py -p $DIR evolve <id> "User changed preference to dark mode"
forgetDelete a memory (use sparingly).
python3 $SKILL_PATH/memory.py -p $DIR forget <id>
entitiesList all extracted entities with counts.
python3 $SKILL_PATH/memory.py -p $DIR entities
entityGet details about a specific entity.
python3 $SKILL_PATH/memory.py -p $DIR entity authentication
branchesList all branches with memory counts.
python3 $SKILL_PATH/memory.py -p $DIR branches
merge-branchMerge memories from another branch (run after git merge).
python3 $SKILL_PATH/memory.py -p $DIR merge-branch feature-auth
merge-branch to combine memories1. 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
The system automatically classifies memories based on content:
| Type | Trigger Words |
|------|---------------|
| decision | decided, chose, picked, selected, opted, going with |
| preference | prefer, favorite, like best, rather, better to |
| learning | learned, studied, understood, realized, discovered |
| task | todo, task, need to, plan to, next step, going to |
| question | wondering, curious, research, investigate, find out |
| note | noticed, observed, important, remember that |
| progress | completed, finished, done, achieved, milestone |
| info | (default for unclassified content) |
Entities are automatically extracted for intelligent retrieval:
topic, subject, name, category, area, project#cooking, #urgent, #v2"machine learning", "user authentication"React, PostgreSQL, MondayDO remember:
DON'T remember:
{
"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]
Memory not found:
search with different keywordsentities to see what's indexedrecall --last 10 to see recent memoriesContext seems stale:
sync --start at session beginningbranchesAfter git operations:
git merge: run merge-branch git checkout: sync --start will load correct branch contextGenerated Mar 1, 2026
A development team uses the system to track decisions, architecture choices, and user preferences across multiple coding sessions. It helps maintain consistency in tech stack decisions and project requirements without manual documentation, ensuring new team members or AI assistants can quickly get up to speed.
Researchers working on a long-term project use the system to store learnings, hypotheses, and experimental results across sessions. It enables seamless knowledge transfer between collaborators and prevents duplication of efforts by recalling past findings and decisions automatically.
A support team integrates the system to remember customer preferences, past issues, and resolution steps across interactions. This allows for personalized and efficient support without repeatedly asking customers for the same information, improving response times and satisfaction.
Content creators use the system to track ideas, editorial decisions, and audience feedback across writing or design sessions. It helps maintain brand consistency and adapts to evolving creative directions by recalling past choices and learnings silently in the background.
Legal professionals employ the system to store case notes, regulatory decisions, and client preferences across consultations. It ensures accurate recall of critical details and compliance requirements without manual note-taking, reducing errors and improving case management.
Offer the memory system as a cloud-based service with tiered pricing based on storage capacity and features like advanced search or integrations. This provides recurring revenue and scales with user needs, targeting teams and enterprises that require persistent knowledge management.
Sell on-premise or custom deployments to large organizations with strict data privacy requirements. This includes support, training, and integration services, generating high-value contracts and long-term partnerships in regulated industries like finance or healthcare.
Provide a free basic version for individual users or small teams, with paid upgrades for advanced features such as AI-powered insights, team collaboration tools, or enhanced security. This drives user adoption and converts active users into paying customers over time.
š¬ Integration Tip
Ensure seamless integration by automating memory operations in the background, such as running sync commands at session start and end, to avoid disrupting user workflows.
Captures learnings, errors, and corrections to enable continuous improvement. Use when: (1) A command or operation fails unexpectedly, (2) User corrects Clau...
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
Search and analyze your own session logs (older/parent conversations) using jq.
Typed knowledge graph for structured agent memory and composable skills. Use when creating/querying entities (Person, Project, Task, Event, Document), linking related objects, enforcing constraints, planning multi-step actions as graph transformations, or when skills need to share state. Trigger on "remember", "what do I know about", "link X to Y", "show dependencies", entity CRUD, or cross-skill data access.
Ultimate AI agent memory system for Cursor, Claude, ChatGPT & Copilot. WAL protocol + vector search + git-notes + cloud backup. Never lose context again. Vibe-coding ready.
Headless browser automation CLI optimized for AI agents with accessibility tree snapshots and ref-based element selection