Capture lessons, decisions, and patterns into gutt memory graph. Triggers on: actually, no that's wrong, we decided, lesson learned, next time, remember that.
How this skill is triggered — by the user, by Claude, or both
Slash command
/gutt-claude-code-plugin:memory-captureThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
The Memory Capture skill provides a structured workflow for capturing lessons, decisions, insights, and patterns into the gutt memory graph. It guides users through pattern-based lesson capture with anti-rationalization enforcement and proper entity classification.
The Memory Capture skill provides a structured workflow for capturing lessons, decisions, insights, and patterns into the gutt memory graph. It guides users through pattern-based lesson capture with anti-rationalization enforcement and proper entity classification.
This skill helps capture organizational knowledge in 4 structured patterns:
The skill automatically:
add_memory with proper formatting| Pattern | Entity Type | Example |
|---|---|---|
| Negation | Lesson | "React Context does NOT work for high-frequency updates because it triggers full subtree re-renders" |
| Replacement | Lesson | "Instead of useContext for global state, use Zustand for better performance" |
| Decision | Decision | "We decided to use PostgreSQL over MongoDB because we need ACID guarantees for financial transactions" |
| Lesson (general) | Lesson or Insight | "Learned that always validate API responses in TypeScript, even with type assertions" |
The skill actively fights the "too minor to capture" trap:
Common rationalizations the skill rejects:
The one valid reason NOT to capture is if the lesson already exists in memory. This is not rationalization — this is data hygiene. Always search first.
The skill activates automatically when users say:
/gutt-claude-code-plugin:memory-capture
Detect Pattern: Analyze user input to identify which of the 4 patterns applies
Extract Components: Parse the "what" and "why" from the input
Classify Entity: Map pattern to entity type (Lesson, Decision, Insight)
SEARCH FOR DUPLICATES (MANDATORY): Before capturing, you MUST search memory for similar existing entries:
mcp__claude_ai_gutt-pro-memory__fetch_lessons_learned(query="[key terms from the lesson]", max_results=5)
mcp__claude_ai_gutt-pro-memory__search_memory_nodes(query="[key terms]", entity="[Lesson|Decision|Insight]", max_nodes=5)
If a similar entry exists (same topic, same insight):
If no similar entry exists: Proceed to step 5.
Structure Content: Format episode body with clear structure
Enrich Context: Add source description, timestamp
Call add_memory: Invoke MCP tool with proper parameters
Confirm Capture: Return success message with UUID and classified type
IF input contains "does NOT work" OR "doesn't work" OR "fails when":
→ NEGATION pattern
→ Extract: what doesn't work, why it fails
ELIF input contains "instead of" OR "rather than" OR "use X over Y":
→ REPLACEMENT pattern
→ Extract: old approach, new approach, reason
ELIF input contains "decided" OR "chose" OR "selected":
→ DECISION pattern
→ Extract: decision made, rationale, constraints
ELSE:
→ LESSON pattern (general)
→ Extract: what was learned, context
NEGATION → Lesson
Format: "What: [X] does not work. Why: [Y]. Context: [Z]."
REPLACEMENT → Lesson
Format: "Old: [X]. New: [Y]. Reason: [Z]."
DECISION → Decision
Format: "Decision: [X]. Rationale: [Y]. Trade-offs: [Z]."
LESSON → Lesson or Insight
Lesson: Actionable, specific technique or pattern
Insight: Broader understanding or principle
Format: "Learned: [X]. Context: [Y]. Impact: [Z]."
mcp__claude_ai_gutt -
pro -
memory__add_memory({
name: "<Pattern Type>: <Brief Summary>",
episode_body: "<Structured content with what/why/context>",
source: "text",
source_description: "memory-capture skill - <pattern> pattern",
last_n_episodes: 0, // Self-sufficient episodes
});
Upon successful capture, the skill returns:
Memory captured successfully!
Pattern: <Negation|Replacement|Decision|Lesson>
Entity Type: <Lesson|Decision|Insight>
UUID: <uuid>
Stored: <brief summary of what was captured>
User Input: "React useContext does NOT work for frequently updating global state because it causes full component tree re-renders"
Detected Pattern: Negation
Entity Type: Lesson
Episode Body:
What: React useContext for frequently updating global state
Why it doesn't work: Causes full component tree re-renders on every update
Impact: Performance degradation in apps with high-frequency state changes
Alternative: Consider Zustand, Jotai, or component composition patterns
add_memory Call:
{
name: "Negation: React useContext performance issue",
episode_body: "[structured content above]",
source: "text",
source_description: "memory-capture skill - negation pattern",
last_n_episodes: 0
}
User Input: "Instead of async/await in tight loops, use Promise.all for parallel execution"
Detected Pattern: Replacement
Entity Type: Lesson
Episode Body:
Old Approach: async/await in tight loops (sequential execution)
New Approach: Promise.all for parallel execution
Reason: Dramatically reduces total execution time when operations are independent
Context: Array processing, API calls, file I/O operations
Example: Array.map + Promise.all instead of for-of loop with await
add_memory Call:
{
name: "Replacement: Promise.all over sequential await",
episode_body: "[structured content above]",
source: "text",
source_description: "memory-capture skill - replacement pattern",
last_n_episodes: 0
}
User Input: "We decided to use PostgreSQL over MongoDB because we need strong consistency guarantees for financial transactions"
Detected Pattern: Decision
Entity Type: Decision
Episode Body:
Decision: Use PostgreSQL as primary database
Alternative Considered: MongoDB
Rationale: Need ACID guarantees for financial transactions
Context: Financial application with complex relational data
Trade-offs:
- Pro: Strong consistency, mature ecosystem, SQL familiarity
- Con: Less flexible schema, potentially more complex migrations
Date: [timestamp]
add_memory Call:
{
name: "Decision: PostgreSQL for financial transactions",
episode_body: "[structured content above]",
source: "text",
source_description: "memory-capture skill - decision pattern",
last_n_episodes: 0
}
User Input: "Learned that TypeScript's type assertions (as) don't provide runtime safety - always validate at API boundaries"
Detected Pattern: Lesson (general)
Entity Type: Lesson
Episode Body:
Learned: TypeScript type assertions provide no runtime safety
Context: API boundary validation, external data sources
Why It Matters: Silent failures when API returns unexpected shape
Best Practice: Always validate external data with zod, io-ts, or manual checks
Anti-pattern: Trusting 'as' assertions on unvalidated data
Real-world trigger: Production bug from changed API response structure
add_memory Call:
{
name: "Lesson: TypeScript type assertions need runtime validation",
episode_body: "[structured content above]",
source: "text",
source_description: "memory-capture skill - lesson pattern",
last_n_episodes: 0
}
The skill automatically enriches captured memories with:
Every capture returns a UUID that can be used to:
Uses last_n_episodes: 0 because:
The skill handles:
Works seamlessly with:
Always includes:
All captures are logged to:
Version: 1.0.0 Compatible with: gutt MCP v1.0+
mcp__claude_ai_gutt-pro-memory__add_memorymemory-retrievalnpx claudepluginhub ibrain-bvba/gutt-claude-code-plugin --plugin gutt-claude-code-pluginStores decisions, patterns, best practices, and anti-patterns in a knowledge graph for future recall. Use /remember with flags like --success or --failed to track outcomes.
Captures decisions, learnings, patterns, and context as persistent memories organized by namespace across Claude Code sessions.