Store project-specific insights and context into file-based memory. Use after completing tasks that reveal important details about THIS codebase.
⚠️ EXECUTION CONTEXT: This Skill MUST be executed using Task tool with subagent_type="general-purpose". Runs in separate context to avoid polluting main conversation.
Purpose: Extract and store project-specific insights (episodic/procedural/semantic) into file-based memory at .claude/skills/project-memory-store/.
Key Architecture: This SKILL.md + subdirectory README.md files form a tree guideline structure for progressive disclosure - overview at top, details deeper. This is very effective for information retrieval.
Keep SKILL.md lean: Provide overview and reference other files. When this file becomes unwieldy, split content into separate files and reference them. Trust Claude to read detailed files only when needed.
When to Use:
CRITICAL: Store BOTH successful AND failed trajectories. Failures are equally important - often MORE valuable than successes. Failed approaches in this project teach what NOT to do and why.
When NOT to Use:
Selection Criteria: Most conversations yield 0-1 project-specific insights. Focus on details future work on THIS codebase would benefit from.
Check if memory directories exist at .claude/skills/project-memory-store/:
episodic/ - Concrete events in this projectprocedural/ - Project-specific workflowssemantic/ - Project patterns and principlesIf missing, create directories and initialize each with single file:
episodic/episodic.mdprocedural/procedural.mdsemantic/semantic.mdUpdate SKILL.md (this file) as needed when structure changes - modify ANY part to keep it accurate and useful.
Analyze conversation and extract 0-3 insights (most yield 0-1).
Classify each as:
Extraction Criteria (ALL must be true):
Reject:
For each extracted insight:
Step 1: Determine target memory type (episodic/procedural/semantic)
Step 2 (Optional): Try Vector Search First
If Qdrant MCP server available, try semantic search for similar memories:
Construct query from new memory - Use full formatted memory for better matching:
Call search_memory MCP tool:
search_memory(
query="<full formatted memory text>",
memory_level="project",
limit=5
)
Extract file_path hints and similarity scores
If <3 results or tool unavailable: Continue to file-based search below
IMPORTANT: Vector results may be outdated. Use as hints to guide file search, not as absolute truth.
Step 3: File-Based Search (Primary Method)
.claude/skills/project-memory-store/episodic/)Step 4: Check similarity
Decision Matrix (file-based consolidation):
| Similarity | Action | Rationale |
|---|---|---|
| Duplicate/Very Similar | MERGE | Combine into single stronger entry |
| Related (same topic) | UPDATER | Update existing memory with new information |
| Pattern Emerges | GENERALIZE | Extract pattern → promote episodic to semantic |
| Different | CREATE | New file or separate section |
Actions:
MERGE (duplicate or very similar):
UPDATER (related, same topic):
GENERALIZE (pattern emerges from multiple episodic memories):
CREATE (different topic):
CRITICAL: Use COMPACT format to prevent memory bloat. Each memory = 3-5 sentences MAX.
Universal Format (works for ALL memory types):
**Title:** <concise title>
**Description:** <one sentence summary>
**Content:** <3-5 sentences covering: what happened in this project, what was tried (including failures), what worked/failed, key lesson, relevant files/components>
**Tags:** #tag1 #tag2 #success OR #failure
Formatting Rules:
Determine storage location:
episodic/authentication/ is deepest)Execute storage:
Write to file (Source of Truth):
Optional: Dual-Write to Qdrant:
If Qdrant MCP server available, also store to vector database:
store_memory(
document="<full formatted memory text>",
metadata={
"memory_level": "project",
"memory_type": "<episodic|procedural|semantic>",
"file_path": "<relative path from project-memory-store/>",
"skill_root": "project-memory-store",
"tags": ["<tag1>", "<tag2>"],
"title": "<memory title>",
"created_at": "<ISO timestamp>",
"last_synced": "<ISO timestamp>"
},
memory_level="project"
)
Cross-promotion check: If generalized pattern is universal (not project-specific):
If file becomes "too long" with unrelated info:
Update parent README.md to reference new structure
If directory structure changed (new subdirectories created):
description if neededFormat:
✅ Project Memory Storage Complete
**Project**: <project name>
**Insights Extracted**: <number> project-specific details
- Episodic: <number>
- Procedural: <number>
- Semantic: <number>
**Storage Actions**:
- Merged: <number>
- Updated: <number>
- Generalized: <number>
- Created: <number>
**Cross-Promotion**:
- Promoted to coder-memory (universal patterns): <number>
**Quality Check**:
- ✓ All insights are project-specific
- ✓ All insights are non-obvious
- ✓ File organization maintained (max 2-level depth)
- ✓ Universal patterns promoted to coder-memory
If 0 insights extracted:
✅ Project Memory Storage Complete
**Insights Extracted**: 0 (conversation contained universal patterns or routine work)
Consider using coder-memory-store for universal patterns.
This skill's memory files can be refactored by project-memory-recall when organization becomes unclear. The recall skill will invoke general-purpose agent to reorganize structure if needed.
CRITICAL: Invoke via Task tool with general-purpose agent. Never execute directly in main context.