PMC memory system for persistent context across sessions. Store, search, and retrieve project knowledge using semantic vector search (OpenAI embeddings) and full-text keyword search. Use when: storing important context, searching for past solutions, retrieving project-specific knowledge, or building up institutional memory.
Stores and retrieves project knowledge using semantic vector search and full-text keyword search. Use when you need to recall past solutions, store important context, or build institutional memory across sessions.
/plugin marketplace add jayprimer/pmc-marketplace/plugin install jayprimer-pmc-plugins-pmc@jayprimer/pmc-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Persistent memory for cross-session knowledge using SQLite + OpenAI embeddings.
# Check memory status
pmc memory stats
# Add a memory
pmc memory add "content here" -c category
# Search memories (hybrid = vector + keyword)
pmc memory search "query"
# List recent memories
pmc memory list -n 10
# Get specific memory by ID (8+ char prefix works)
pmc memory get abc12345
# View search analytics
pmc memory search-stats
pmc memory search-logs
OpenAI API Key required for semantic search:
# In .env file
OPENAI_API_KEY=sk-...
Without the API key, falls back to hash-based embeddings (not semantic).
pmc memory add <content> [options]
Options:
-c, --category TEXT Category tag (can use multiple times)
-t, --timestamp TEXT Set created/updated time (YYYY-MM-DD, ISO, "today", "yesterday")
--embed/--no-embed Generate embedding (default: --embed)
Examples:
# Add with category
pmc memory add "API uses JWT tokens for auth" -c ctx
# Add user preference
pmc memory add "User prefers functional style over classes" -c pref
# Add a solution
pmc memory add "Fix: clear cache after deploy" -c fix
# Add with specific timestamp
pmc memory add "Migrated to Python 3.12" -c ctx -t 2024-06-15
# Add without embedding (faster, keyword-only search)
pmc memory add "Quick note" -c note --no-embed
pmc memory get <id>
Retrieve a single memory by ID. Supports partial ID matching (8+ characters).
Examples:
# Full UUID
pmc memory get 550e8400-e29b-41d4-a716-446655440000
# Partial ID (8+ chars)
pmc memory get 550e8400
pmc memory update <id> [options]
Options:
--content TEXT New content
-c, --category TEXT New categories (replaces existing)
-t, --timestamp TEXT Update timestamp
--embed/--no-embed Regenerate embedding
Supports partial ID matching (8+ characters).
Examples:
# Update content
pmc memory update 550e8400 --content "Updated: API uses OAuth2"
# Change category
pmc memory update 550e8400 -c pref
# Update timestamp
pmc memory update 550e8400 -t today
pmc memory search <query> [options]
Options:
-m, --mode TEXT Search mode: hybrid, vector, keyword (default: hybrid)
-n, --limit INT Max results (default: 10)
-c, --category TEXT Filter by category
--before TEXT Filter: created before date
--after TEXT Filter: created after date
--between TEXT TEXT Filter: created between dates
Search Modes:
| Mode | Description | When to Use |
|---|---|---|
hybrid | Vector + keyword with RRF fusion | Default, best overall |
vector | Semantic similarity only | Find conceptually related |
keyword | Full-text search (FTS5) | Exact term matching |
Examples:
# Hybrid search (default)
pmc memory search "authentication flow"
# Semantic search only
pmc memory search "how to handle errors" -m vector
# Keyword search only
pmc memory search "JWT token" -m keyword
# Filter by category
pmc memory search "config" -c ctx
# Filter by date range
pmc memory search "migration" --after 2024-01-01
pmc memory search "fix" --between 2024-01-01 2024-06-30
# Combined filters
pmc memory search "database" -c fix --after 2024-06-01 -n 5
pmc memory list [options]
Options:
-n, --limit INT Max results (default: 10)
--offset INT Skip first N results
-c, --category TEXT Filter by category
Lists memories ordered by updated_at (most recent first).
Examples:
# List recent memories
pmc memory list
# Filter by category
pmc memory list -c fix
# Paginate
pmc memory list -n 10 --offset 10
pmc memory delete [id] [options]
Options:
-f, --force Skip confirmation
-c, --category TEXT Delete all in category (bulk)
--before TEXT Delete all before date (bulk)
--after TEXT Delete all after date (bulk)
--between TEXT TEXT Delete all between dates (bulk)
Supports partial ID matching (8+ characters) for single delete.
Examples:
# Delete single by ID (with confirmation)
pmc memory delete 550e8400
# Delete single, skip confirmation
pmc memory delete 550e8400 -f
# Bulk delete by category
pmc memory delete -c note -f
# Bulk delete by date
pmc memory delete --before 2024-01-01 -f
# Bulk delete by date range
pmc memory delete --between 2024-01-01 2024-06-30 -f
# Combine filters
pmc memory delete -c note --before 2024-01-01 -f
pmc memory categories
List all categories with memory counts.
Output:
ctx 15
fix 8
pref 5
note 3
pmc memory reset [options]
Options:
-f, --force Skip confirmation
Warning: This deletes ALL memories permanently.
pmc memory export [output_file] [options]
Options:
--all Export all memories (default if no filters)
-q, --query TEXT Filter by search query
-c, --category TEXT Filter by category
--before TEXT Filter: created before date
--after TEXT Filter: created after date
--between TEXT TEXT Filter: created between dates
Exports to JSON format. Default file: memories_export.json
Examples:
# Export all
pmc memory export backup.json --all
# Export by category
pmc memory export fixes.json -c fix
# Export by date range
pmc memory export q1.json --between 2024-01-01 2024-03-31
# Export search results
pmc memory export auth.json -q "authentication"
# Combined filters
pmc memory export ctx_2024.json -c ctx --after 2024-01-01
pmc memory import <input_file> [options]
Options:
--skip-duplicates Skip memories with same content (default: error)
--update-existing Update if content matches (default: error)
Imports from JSON format.
Examples:
# Import, error on duplicates
pmc memory import backup.json
# Skip duplicates silently
pmc memory import backup.json --skip-duplicates
# Update existing memories if content matches
pmc memory import backup.json --update-existing
pmc memory stats
Shows:
Track and analyze search queries for usage patterns.
pmc memory search-logs [options]
Options:
-n, --limit INT Max logs to display (default: 20)
--offset INT Skip first N logs
Shows recent search queries with:
Example output:
2024-06-15 14:30:22 authentication flow
mode=hybrid limit=10 results=5 cats=ctx
2024-06-15 14:25:10 database connection
mode=keyword limit=10 results=3 cats=-
pmc memory search-stats
Shows aggregate analytics:
Example output:
Search Statistics
----------------------------------------
Total searches: 47
Avg results: 3.2
By Mode:
hybrid: 35
keyword: 10
vector: 2
Top Queries:
5x authentication
4x database config
3x error handling
Use these exact category tags (minimal set, easy to remember):
| Tag | Use For | Example |
|---|---|---|
ctx | Project-specific facts | "Uses port 3000", "DB is Postgres 15" |
pref | User preferences | "Prefers tabs", "No emojis in code" |
fix | Solutions found | "Fix: restart Redis after config change" |
note | Temporary/misc | Anything else |
user | Auto-captured user prompts | Recorded by UserPromptSubmit hook for recall |
Why minimal?
pmc memory list -c fix to browse all solutionspmc memory search "query" -c user to recall past conversationsAll date options accept flexible formats:
| Format | Example |
|---|---|
YYYY-MM-DD | 2024-06-15 |
| ISO datetime | 2024-06-15T14:30:00 |
today | Current date |
yesterday | Previous day |
Commands that accept memory IDs (get, update, delete) support 8+ character prefixes:
# Instead of full UUID
pmc memory get 550e8400-e29b-41d4-a716-446655440000
# Use 8-char prefix
pmc memory get 550e8400
If prefix is ambiguous (matches multiple), an error lists all matches.
┌──────────────────────────────────────────┐
│ pmc memory CLI │
└──────────────────┬───────────────────────┘
│
┌──────────────────┴───────────────────────┐
│ MemoryStore │
│ SQLite + FTS5 + Embeddings │
└──────────────────┬───────────────────────┘
│
┌───────────┼───────────┬───────────┐
▼ ▼ ▼ ▼
┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
│ memories │ │ FTS5 │ │ OpenAI │ │ search │
│ table │ │ index │ │ embeddings│ │ logs │
└──────────┘ └──────────┘ └──────────┘ └──────────┘
Database: .pmc/memory.db
OPENAI_API_KEY set) - 1536 dimensionsCombines vector and keyword results using Reciprocal Rank Fusion (RRF):
score = Σ (1 / (k + rank)) for each method
Uses SQLite FTS5 with BM25 ranking for full-text search.
# Good: Conceptual queries
pmc memory search "error handling patterns"
pmc memory search "authentication flow"
# Good: Specific terms
pmc memory search "retry backoff" -m keyword
# Less effective: Too vague
pmc memory search "code"
Memory complements the KB documentation system:
| KB Docs | Memory |
|---|---|
| Structured, versioned | Unstructured, additive |
| Git tracked | Local SQLite |
| Long-form documentation | Short context snippets |
| Shared across team | Per-machine |
Use memory for quick context; use KB docs for permanent knowledge.
In pmc.config.json:
{
"memory": {
"database": ".pmc/memory.db",
"embedding_provider": "openai",
"embedding_model": "text-embedding-3-small",
"embedding_dimension": 1536,
"default_limit": 10,
"injection_max_tokens": 2000
}
}
OpenAI API key not set. Add to .env:
OPENAI_API_KEY=sk-...
pmc memory listpmc memory search "term" -m keywordpmc memory statsThis skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.