Claude Skills
CollectionsCompareWorkflowsNominate
Sign inSign up
© 2026 Curated Agent Skills·Learn more about Agent Skills
Back to repository

memory-create

verified

Create and manage memory files for the file-based memory system

View on GitHub

Marketplace

cc-ecosystem

gaodes/cc-ecosystem

Plugin

ccmem

memory

Repository

gaodes/cc-ecosystem

plugins/ccmem/skills/memory-create/SKILL.md

Last Verified

February 3, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/gaodes/cc-ecosystem/blob/main/plugins/ccmem/skills/memory-create/SKILL.md -a claude-code --skill memory-create

Installation paths:

Claude
.claude/skills/memory-create/
Powered by add-skill CLI

Instructions

# Memory Create Skill

Create, update, and manage memory files in `~/.claude/memory/memories/`.

## Available Functions

### Create New Memory

```python
from memory_lib import create_memory

memory = create_memory(
    type="preference",
    scope_type="global",
    scope_path=None,
    content={
        "title": "Prefer pnpm over npm",
        "description": "User consistently uses pnpm",
        "action": "Suggest pnpm when discussing packages",
        "examples": ["pnpm install"]
    },
    triggers={
        "description": "when discussing package management",
        "keywords": ["npm", "install"],
        "patterns": ["npm install"],
        "files": ["package.json"]
    },
    tags=["tooling", "javascript"],
    evidence=[{
        "timestamp": "2026-01-29T03:00:00Z",
        "observation_id": "obs-123",
        "description": "User used pnpm install"
    }],
    confidence=0.85
)
```

### Update Existing Memory

```python
from memory_lib import update_memory

update_memory(
    memory_id="2026-01-29-pnpm-preference",
    new_evidence={
        "timestamp": "2026-01-30T10:00:00Z",
        "description": "User rejected npm suggestion"
    },
    confidence_delta=0.05
)
```

### Build Search Index

```python
from memory_lib import build_search_index

build_search_index()
```

## Memory Type Reference

| Type | Use Case | Example |
|------|----------|---------|
| preference | User likes/dislikes | "Prefer pnpm" |
| pattern | Code patterns | "Use early returns" |
| correction | Learned from mistakes | "User prefers Zod" |
| project | Project-specific | "This uses Vitest" |
| negative | What NOT to do | "Never use MD5" |
| workflow | Processes | "Run tests first" |

## File Locations

- Global memories: `~/.claude/memory/memories/global/{id}.json`
- Project memories: `~/.claude/memory/memories/projects/{hash}/{id}.json`

## Example: Creating a Memory from Analysis

```python
import json
from datetime import datetime
from memory_lib import create_memory, get_proj

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
2593 chars