@zoebuildsai/skill-memory-git
v0.1.0
Published
Git-like memory system for OpenClaw agents
Maintainers
Readme
Memory Git
Git-like version control for agent memory. Snapshot, compare, and restore agent state with commit history.
Quick Start
npm install @zoebuildsai/skill-memory-gitimport { MemoryGitCommands } from '@zoebuildsai/skill-memory-git';
const memory = new MemoryGitCommands();
// Save state
memory.commit('Learned from user feedback');
// View history
memory.log(5);
// Check changes
memory.status();
// Restore to previous state
memory.checkout('abc123d4');
// Compare two snapshots
memory.diff('abc123d4', 'def456b8');Commands
| Command | Purpose |
|---------|---------|
| commit <message> | Save memory snapshot |
| log [--limit N] | View commit history |
| diff <hash1> <hash2> | Compare two snapshots |
| checkout <hash> | Restore to previous state |
| status | Show uncommitted changes |
Performance
- Status check: <10ms
- Commit: <100ms
- Checkout: <150ms
Storage
Memory stored in ~/.openclaw/memory-git/ with git-like object storage:
- Commits saved as JSON objects
- SHA-256 content hashing for dedup
- Delta compression for efficiency
Full Documentation
See SKILL.md for complete API and examples.
Testing
npm test # Run tests
npm run test:watch # Watch mode
npm run test:coverage # Coverage reportCoverage: 75%+ across all metrics. 50+ tests covering:
- Commit creation and metadata
- Log history and filtering
- Diff algorithms (line-level, file-level)
- Checkout and rollback
- Status detection
- Edge cases (large files, deletions, etc.)
- Performance benchmarks
License
MIT
