Skill: 12357851/memory-local-backup (version 1.0.0)

--- name: Memory slug: memory version: 1.0.2 homepage: https://clawic.com/skills/memory description: Infinite organized memory that complements your agent's built-in memory with unlimited categorized storage. changelog: Redesigned as complementary system, user-defined categories, optional sync from built-in memory. metadata: {"clawdbot":{"emoji":"🧠","requires":{"bins":[]},"os":["linux","darwin","win32"]}} --- # Memory 🧠 **Superpowered memory that never forgets.** Your agent has basic built-in memory. This skill adds infinite, perfectly organized memory for everything else — parallel and complementary, never conflicting. ## How It Works ``` Built-in Agent Memory This Skill (~/memory/) ┌─────────────────────┐ ┌─────────────────────────────┐ │ MEMORY.md │ │ Infinite categorized storage │ │ memory/ (daily logs)│ + │ Any structure you want │ │ Basic recall │ │ Perfect organization │ └─────────────────────┘ └─────────────────────────────┘ ↓ ↓ Agent basics Everything else (works automatically) (scales infinitely) ``` **Not a replacement.** Your agent's built-in memory keeps working. This adds a parallel system for unlimited, organized storage. ## Setup On first use, read `setup.md` to configure the memory system with the user. Key decisions: 1. What categories do they need? 2. Should we sync anything from built-in memory? 3. How do they want to find things? ## When to Use User needs organized long-term storage beyond basic agent memory: detailed project histories, extensive contact networks, decision logs, domain knowledge, collections, or any structured data that grows over time. ## Architecture Memory lives in `~/memory/` — a dedicated folder separate from built-in agent memory. ``` ~/memory/ ├── config.md # System configuration ├── INDEX.md # What's stored, where to find it │ ├── [user-defined]/ # Categories the user needs │ ├── INDEX.md # Category overview │ └── {items}.md # Individual entries │ └── sync/ # Optional: synced from built-in memory └── ... ``` **The user defines the categories.** Common examples: - `projects/` — detailed project context - `people/` — contact network with full context - `decisions/` — reasoning behind choices - `knowledge/` — domain expertise, reference material - `collections/` — books, recipes, anything they collect See `memory-template.md` for all templates. ## Quick Reference | Topic | File | |-------|------| | First-time setup | `setup.md` | | All templates | `memory-template.md` | | Organization patterns | `patterns.md` | | Problems & fixes | `troubleshooting.md` | --- ## Core Rules ### 1. Separate from Built-In Memory This system lives in `~/memory/`. Never modify: - Agent's MEMORY.md (workspace root) - Agent's `memory/` folder (if it exists in workspace) **Parallel, not replacement.** Both systems work together. ### 2. User Defines Structure During setup, ask what they want to store. Create categories based on their needs: | They say... | Create | |-------------|--------| | "I have many projects" | `~/memory/projects/` | | "I meet lots of people" | `~/memory/people/` | | "I want to track decisions" | `~/memory/decisions/` | | "I'm learning [topic]" | `~/memory/knowledge/[topic]/` | | "I collect [things]" | `~/memory/collections/[things]/` | **No preset structure.** Build what they need. ### 3. Every Category Has an Index Each folder gets an INDEX.md that lists contents: ```markdown # Projects Index | Name | Status | Updated | File | |------|--------|---------|------| | Alpha | Active | 2026-02 | alpha.md | | Beta | Paused | 2026-01 | beta.md | Total: 2 active, 5 archived ``` Indices stay small (<100 entries). When full, split into subcategories. ### 4. Write Immediately When user shares important information: 1. Write to appropriate file in ~/memory/ 2. Update the category INDEX.md 3. Then respond Don't wait. Don't batch. Write immediately. ### 5. Search Then Navigate To find information: 1. **Ask first:** "Is this in ~/memory/ or built-in memory?" 2. **Search:** grep or semantic search in ~/memory/ 3. **Navigate:** INDEX.md → category → specific file ```bash # Quick search grep -r "keyword" ~/memory/ # Navigate cat ~/memory/INDEX.md # What categories exist? cat ~/memory/projects/INDEX.md # What projects? cat ~/memory/projects/alpha.md # Specific project ``` ### 6. Sync from Built-In (Optional) If user wants certain info copied from built-in memory: ``` ~/memory/sync/ ├── preferences.md # Synced from built-in └── decisions.md # Synced from built-in ``` **Sync is one-way:** Built-in → this system. Never modify built-in. ### 7. Scale by Splitting When a category grows large: - INDEX.md > 100 entries → split into subcategories - Create sub-INDEX.md for each subcategory - Root INDEX.md points to subcategories ``` ~/memory/projects/ ├── INDEX.md # "See active/, archived/" ├── active/ │ ├── INDEX.md # 30 active projects │ └── ... └── archived/ ├── INDEX.md # 200 archived projects └── ... ``` --- ## What to Store Here (vs Built-In) | Store HERE (~/memory/) | Keep in BUILT-IN | |------------------------|------------------| | Detailed project histories | Current project status | | Full contact profiles | Key contacts quick-ref | | All decision reasoning | Recent decisions | | Domain knowledge bases | Quick facts | | Collections, inventories | — | | Anything that grows large | Summaries | **Rule:** Built-in for quick context. Here for depth and scale. --- ## Finding Things ### For Small Memory (<50 files) ```bash # Grep is fast enough grep -r "keyword" ~/memory/ ``` ### For Large Memory (50+ files) Navigate via indices: ``` 1. ~/memory/INDEX.md → find category 2. ~/memory/{category}/INDEX.md → find item 3. ~/memory/{category}/{item}.md → read details ``` ### For Huge Memory (500+ files) Use semantic search if available, or hierarchical indices: ``` ~/memory/projects/INDEX.md → "web projects in web/" ~/memory/projects/web/INDEX.md → "alpha project" ~/memory/projects/web/alpha.md → details ``` --- ## Maintenance ### Weekly (5 min) - Update INDEX.md files if entries added - Archive completed/inactive items ### Monthly (15 min) - Review category sizes - Split large categories - Remove outdated entries ### When Memory is Slow - Check INDEX.md sizes (keep <100 lines) - Split big categories into subcategories - Archive old content --- ## Common Traps - **Modifying built-in memory** → Never touch agent's MEMORY.md or workspace memory/. This system is parallel. - **No indices** → Without INDEX.md, finding things requires searching all files. Always maintain indices. - **One giant category** → 500 items in one folder is slow. Split into subcategories. - **Syncing everything** → Don't copy all built-in memory. Only sync what needs organization here. - **Waiting to write** → Write immediately when user shares info. Don't batch. --- ## Security & Privacy **Data location:** - All data in `~/memory/` on user's machine - No external services required - No network requests **This skill does NOT:** - Access built-in agent memory (only reads if syncing) - Send data anywhere - Store credentials (never store secrets in memory) --- ## Related Skills Install with `clawhub install <slug>` if user confirms: - `decide` - Decision tracking patterns - `escalate` - When to involve humans - `learn` - Adaptive learning ## Feedback - If useful: `clawhub star memory` - Stay updated: `clawhub sync`

path: _meta.json
content: ownerId: kn73vp5rarc3b14rc7wjcw8f8580t5d1
slug: memory
version: 1.0.2
publishedAt: 1771774645950

path: memory-template.md
content: # Memory Templates

## System Configuration

Create `~/memory/config.md`:

```markdown
# Memory Config

Created: YYYY-MM-DD
Owner: [name]

## Sync Settings
sync_from_builtin: false
sync_categories: []

## Categories
- projects/
- people/
- decisions/
- [custom]/

## Preferences
find_method: navigate | search | both
maintenance: weekly | monthly
```

---

## Root Index

Create `~/memory/INDEX.md`:

```markdown
# Memory Index

## Categories

| Category | Items | Updated | Index |
|----------|-------|---------|-------|
| Projects | 12 | 2026-02-22 | projects/INDEX.md |
| People | 45 | 2026-02-20 | people/INDEX.md |
| Decisions | 23 | 2026-02-22 | decisions/INDEX.md |

## Quick Stats
Total items: ~80
Last maintenance: 2026-02-15
```

---

## Projects

**Index: `~/memory/projects/INDEX.md`**
```markdown
# Projects Index

| Project | Status | Stack | Updated | File |
|---------|--------|-------|---------|------|
| Alpha | Active | React | 2026-02 | alpha.md |
| Beta | Paused | Python | 2026-01 | beta.md |

Active: 5 | Paused: 3 | Archived: 20
```

**Entry: `~/memory/projects/{name}.md`**
```markdown
# Project: [Name]

## Overview
Status: active | paused | complete
Started: YYYY-MM-DD
Stack: [technologies]

## Description
[What it is, why it matters]

## Key Decisions
- [YYYY-MM-DD] [Decision and reasoning]

## History
- [YYYY-MM-DD] [What happened]

## Current State
[Where things stand]

## Next Steps
- [ ] [Action]
```

---

## People

**Index: `~/memory/people/INDEX.md`**
```markdown
# People Index

## By Relationship

### Work
| Name | Role | Company | File |
|------|------|---------|------|
| Alice | PM | Acme | alice.md |

### Clients
| Name | Company | File |
|------|---------|------|
| Bob | ClientCo | bob.md |

### Personal
| Name | Context | File |
|------|---------|------|
| Carol | Friend | carol.md |

Total: 45 contacts
```

**Entry: `~/memory/people/{name}.md`**
```markdown
# [Name]

## Basic Info
Role: 
Company: 
Relationship: work | client | personal
Last contact: YYYY-MM-DD

## How We Know Each Other
[Context]

## Key Facts
- [Important things to remember]

## Communication Style
- [How they prefer to communicate]

## History
- [YYYY-MM-DD] [Interaction]
```

---

## Decisions

**Index: `~/memory/decisions/INDEX.md`**
```markdown
# Decisions Index

## By Year

| Year | Count | File |
|------|-------|------|
| 2026 | 23 | 2026.md |
| 2025 | 89 | 2025.md |

## By Category

| Category | Count | File |
|----------|-------|------|
| Technical | 45 | technical.md |
| Business | 30 | business.md |
| Personal | 37 | personal.md |
```

**Entry: `~/memory/decisions/{category}.md` or `{year}.md`**
```markdown
# Decisions — [Category/Year]

## [YYYY-MM-DD] [Decision Title]

**Decision:** [What was decided]
**Options considered:** [What else was possible]
**Reasoning:** [Why this choice]
**Outcome:** [What happened, if known]
**Revisit:** [When to reconsider, if ever]

---

## [Another Decision]
...
```

---

## Knowledge

**Index: `~/memory/knowledge/INDEX.md`**
```markdown
# Knowledge Index

| Topic | Depth | Updated | File |
|-------|-------|---------|------|
| Machine Learning | Deep | 2026-02 | ml/ |
| Cooking | Growing | 2026-01 | cooking.md |
| Finance | Reference | 2025-12 | finance.md |
```

**Entry: `~/memory/knowledge/{topic}.md`**
```markdown
# [Topic]

## Overview
[What this is about]

## Key Concepts
- **[Concept]:** [Explanation]

## References
- [Source 1]
- [Source 2]

## Notes
[Learnings, insights]

## Questions
- [Things still to learn]
```

---

## Collections

**Index: `~/memory/collections/INDEX.md`**
```markdown
# Collections Index

| Collection | Items | Updated | File |
|------------|-------|---------|------|
| Books | 156 | 2026-02 | books.md |
| Recipes | 45 | 2026-01 | recipes.md |
| Ideas | 89 | 2026-02 | ideas.md |
```

**Entry: Format varies by collection type**

Books example:
```markdown
# Books

## Read
| Title | Author | Rating | Date | Notes |
|-------|--------|--------|------|-------|
| [Book] | [Author] | 5/5 | 2026-01 | [Key takeaway] |

## To Read
- [Book] by [Author] — [Why interested]

## Notes on Specific Books
### [Book Title]
[Detailed notes]
```

---

## Sync Folder (Optional)

If user wants to sync from built-in memory:

**`~/memory/sync/INDEX.md`**
```markdown
# Synced from Built-In Memory

| What | Source | Last Sync | File |
|------|--------|-----------|------|
| Preferences | MEMORY.md | 2026-02-22 | preferences.md |
| Key Decisions | MEMORY.md | 2026-02-22 | decisions.md |

Note: This is one-way sync. Built-in memory is not modified.
```

---

## Index Size Limits

| Index Type | Max Entries | When Exceeded |
|------------|-------------|---------------|
| Root INDEX.md | 20 categories | Unlikely, OK |
| Category INDEX.md | 100 items | Split into subcategories |
| Subcategory INDEX.md | 100 items | Split again |

**Splitting example:**
```
projects/
├── INDEX.md              # "See active/, archived/"
├── active/
│   ├── INDEX.md          # Active projects
│   └── ...
└── archived/
    ├── INDEX.md          # Archived projects
    └── ...
```


path: patterns.md
content: # Organization Patterns

## Pattern 1: Category-Based Structure

Most common. Organize by type of information:

```
~/memory/
├── projects/
├── people/
├── decisions/
├── knowledge/
└── collections/
```

**Best for:** General use, multiple domains.

---

## Pattern 2: Domain-Focused Structure

Everything organized around one domain:

```
~/memory/
├── clients/
├── deals/
├── products/
├── competitors/
└── market-research/
```

**Best for:** Professionals focused on one area (sales, research, etc).

---

## Pattern 3: Time-Based Structure

Organized by when things happened:

```
~/memory/
├── 2026/
│   ├── q1/
│   └── q2/
├── 2025/
└── archive/
```

**Best for:** Journaling, logging, historical tracking.

---

## Pattern 4: Hybrid Structure

Mix of categories and time:

```
~/memory/
├── active/           # Current focus
│   ├── projects/
│   └── people/
├── reference/        # Always relevant
│   ├── knowledge/
│   └── preferences/
└── archive/          # Historical
    ├── 2025/
    └── 2024/
```

**Best for:** People who need both current and historical context.

---

## Pattern 5: Growing a Category

When a category gets big, split it:

**Before (100+ entries):**
```
~/memory/projects/INDEX.md  # Too long
```

**After (split by status):**
```
~/memory/projects/
├── INDEX.md          # Just points to subdirs
├── active/
│   └── INDEX.md      # 20 entries
├── paused/
│   └── INDEX.md      # 15 entries
└── archived/
    └── INDEX.md      # 100+ entries (OK, rarely accessed)
```

---

## Pattern 6: Syncing from Built-In Memory

If user wants to copy info from agent's built-in memory:

```
~/memory/sync/
├── INDEX.md
├── preferences.md    # Copied from MEMORY.md
└── key-decisions.md  # Copied from MEMORY.md
```

**Sync process:**
1. Read from built-in (MEMORY.md, etc)
2. Reformat for this system
3. Write to ~/memory/sync/
4. Update ~/memory/sync/INDEX.md with sync date

**Never modify built-in memory.** Sync is read-only.

---

## Pattern 7: Quick Capture → Organize Later

For fast entry without thinking about structure:

```
~/memory/
├── inbox/
│   └── INDEX.md      # Unsorted items
├── projects/
└── ...
```

**Flow:**
1. Capture to inbox/ immediately
2. Weekly: sort inbox/ into proper categories
3. Delete from inbox/ after sorting

---

## Pattern 8: Cross-References

When items relate to multiple categories:

```markdown
# ~/memory/projects/alpha.md

## Team
- Alice (PM) → see people/alice.md
- Bob (Dev) → see people/bob.md

## Key Decisions
- Database choice → see decisions/2026.md#database-alpha
```

**Use relative links.** Never duplicate content.

---

## Pattern 9: Archiving Old Content

When content is old but might be needed:

**Don't delete. Archive:**
```bash
# Move to archive
mv ~/memory/projects/old-thing.md ~/memory/archive/projects/

# Update indices
# 1. Remove from projects/INDEX.md
# 2. Add to archive/INDEX.md
```

**Archive INDEX.md:**
```markdown
# Archive

| Item | Type | Archived | Reason |
|------|------|----------|--------|
| OldProject | project | 2026-01 | Completed |
```

---

## Pattern 10: Search Optimization

Make content findable with good keywords:

```markdown
# ~/memory/people/alice.md

# Alice Smith

**Keywords:** PM, product manager, Acme Corp, alpha project, weekly sync

## Profile
...
```

When searching, keywords at top help grep/semantic search find the right file.


path: setup.md
content: # Setup — Memory

Read this on first use. Guide the user through setting up their personal memory system.

## Your Attitude

You're giving them superpowers. Infinite memory, perfectly organized, for anything they want. This is exciting — help them see the possibilities.

**Important:** This is SEPARATE from built-in agent memory. It's a parallel system that complements what already exists.

## The Conversation

### 1. Explain What This Is

"I can set up an infinite memory system for you — separate from my basic memory. It's for anything you want to store long-term: projects, people, decisions, knowledge, collections... whatever matters to you.

It won't interfere with how I normally remember things. This is additional, organized storage that scales as big as you need."

### 2. Ask What They Need

"What kinds of things would be most useful to have perfectly organized?

Some examples people use:
- **Projects** — full history, decisions, context for each project
- **People** — detailed profiles of everyone you work with
- **Decisions** — why you chose X over Y, so you remember later
- **Knowledge** — things you're learning, reference material
- **Collections** — books, recipes, ideas, anything you collect"

Let them tell you. Don't assume.

### 3. Ask About Sync

"My built-in memory already tracks some things. Would you like me to sync any of that into this new system?

For example, I could copy:
- Preferences you've told me
- Important decisions we've made
- Key contacts

Or we can start fresh and only add new things."

### 4. Create the Structure

Based on their answers, create `~/memory/` with:
- `config.md` — their preferences
- `INDEX.md` — root index
- Folders for each category they mentioned
- INDEX.md in each folder

### 5. First Entry

Ask: "What's something you'd like me to remember right now?"

Store it immediately. Show them it works.

## What You're Saving

**In ~/memory/config.md:**
```markdown
# Memory Config

Created: YYYY-MM-DD
Sync from built-in: [yes/no]

## Categories
- projects/
- people/
- [whatever they said]

## Preferences
- [How they want to find things]
- [How often to organize]
```

**In ~/memory/INDEX.md:**
```markdown
# Memory Index

| Category | Description | Index |
|----------|-------------|-------|
| Projects | Project histories | projects/INDEX.md |
| People | Contact network | people/INDEX.md |

Last updated: YYYY-MM-DD
```

## When "Done"

Once you've:
1. Created ~/memory/ with their categories
2. Set up INDEX.md files
3. Stored one real thing

...the system is live. It grows from there through normal use.


path: troubleshooting.md
content: # Troubleshooting

## Can't Find Information

**Symptoms:**
- "I don't see that in memory"
- Information exists but not found

**Fixes:**

| Cause | Check | Fix |
|-------|-------|-----|
| Not indexed | `grep -l "topic" ~/memory/*/INDEX.md` | Add to relevant INDEX |
| Wrong category | Check other categories | Move to correct place |
| Search too narrow | Try different keywords | Add keywords to file header |
| In built-in, not here | Check agent's MEMORY.md | Sync if needed |

**Quick search:**
```bash
# Find across all memory
grep -r "keyword" ~/memory/

# Find in indices only (faster)
grep -r "keyword" ~/memory/*/INDEX.md
```

---

## Memory Getting Slow

**Symptoms:**
- Takes long to find things
- Category indices are huge

**Fixes:**

1. **Check index sizes:**
```bash
wc -l ~/memory/*/INDEX.md
# Any over 100 lines? Split them.
```

2. **Split large categories:**
```
Before: projects/INDEX.md (150 entries)
After:  projects/active/INDEX.md (30 entries)
        projects/archived/INDEX.md (120 entries)
```

3. **Archive old content:**
```bash
# Move old items to archive
mv ~/memory/projects/old.md ~/memory/archive/
# Update both indices
```

---

## Conflicting with Built-In Memory

**Symptoms:**
- Agent confused about which memory to use
- Duplicate information

**Rule:** This system (`~/memory/`) is SEPARATE from built-in.

**Fixes:**

1. **Never modify built-in memory** from this skill
2. **Check locations:**
   - Built-in: workspace `MEMORY.md`, workspace `memory/`
   - This skill: `~/memory/` (home directory)
3. **If duplicates:** Keep detailed version here, summary in built-in

---

## Structure is Messy

**Symptoms:**
- Files everywhere
- Hard to know where things go

**Fixes:**

1. **Establish clear categories:**
```bash
ls ~/memory/
# Should show clear category folders, not loose files
```

2. **No files in root:**
```
~/memory/
├── config.md     # OK (system file)
├── INDEX.md      # OK (root index)
├── projects/     # OK (category)
├── random.md     # BAD - put in a category
```

3. **Use inbox for unsorted:**
```bash
mkdir ~/memory/inbox
# Put unclear items there, sort weekly
```

---

## Sync Not Working

**Symptoms:**
- Sync folder empty or outdated
- Built-in changes not reflected

**Fixes:**

1. **Check sync is enabled:**
```bash
cat ~/memory/config.md | grep sync
```

2. **Manual sync:**
   - Read from agent's MEMORY.md
   - Extract relevant sections
   - Write to ~/memory/sync/
   - Update ~/memory/sync/INDEX.md with date

3. **Remember:** Sync is manual, not automatic. Re-sync periodically.

---

## Forgot What Categories Exist

**Quick check:**
```bash
# See all categories
cat ~/memory/INDEX.md

# See folder structure
ls ~/memory/
```

---

## INDEX.md Out of Date

**Symptoms:**
- Files exist but not in INDEX
- INDEX lists files that don't exist

**Fix:**

```bash
# Check for unlisted files
for f in ~/memory/projects/*.md; do
  name=$(basename "$f")
  grep -q "$name" ~/memory/projects/INDEX.md || echo "Not indexed: $name"
done

# Check for dead links
grep -oE '[a-z]+\.md' ~/memory/projects/INDEX.md | while read f; do
  [ ! -f ~/memory/projects/"$f" ] && echo "Missing: $f"
done
```

**Rebuild INDEX if badly broken:**
```bash
# Generate new index from existing files
ls ~/memory/projects/*.md | while read f; do
  name=$(basename "$f" .md)
  echo "| $name | ? | $(date +%Y-%m-%d) | $name.md |"
done
```

---

## Not Sure What Goes Where

**Decision tree:**

```
Is it about a specific project?
  → projects/

Is it about a person?
  → people/

Is it a decision with reasoning?
  → decisions/

Is it reference/learning material?
  → knowledge/

Is it a list of things you collect?
  → collections/

None of the above?
  → inbox/ (sort later)
```

---

## Quick Health Check

```bash
#!/bin/bash
echo "=== Memory Health Check ==="

# Check root
[ -d ~/memory ] && echo "✓ ~/memory exists" || echo "✗ ~/memory missing"
[ -f ~/memory/INDEX.md ] && echo "✓ Root INDEX.md exists" || echo "✗ Root INDEX.md missing"
[ -f ~/memory/config.md ] && echo "✓ config.md exists" || echo "✗ config.md missing"

# Check categories have indices
echo ""
echo "Category indices:"
for dir in ~/memory/*/; do
  name=$(basename "$dir")
  [ -f "$dir/INDEX.md" ] && echo "  ✓ $name/INDEX.md" || echo "  ✗ $name/INDEX.md missing"
done

# Count total files
total=$(find ~/memory -name "*.md" | wc -l)
echo ""
echo "Total files: $total"

echo "=== Done ==="
```


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (HIGH)