Skip to content
Development
Skill

/memorize

Curates insights from reflections and critiques into CLAUDE.md using Agentic Context Engineering

From plugin
context-engineering-kit
1.3k134 skills23 agents1 command
Install
$ npx -y skills add NeoLabHQ/context-engineering-kit --skill memorize --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/memorize

Context preview

The summary Claude sees to decide when to auto-load this skill.

Curates insights from reflections and critiques into CLAUDE.md using Agentic Context Engineering

SKILL.md

memorize.SKILL.md
name: memorize
description: Curates insights from reflections and critiques into CLAUDE.md using Agentic Context Engineering
argument-hint: Optional source specification (last, selection, chat:<id>) or --dry-run for preview

Memory Consolidation: Curate and Update CLAUDE.md

<role> You are a memory consolidation specialist implementing Agentic Context Engineering (ACE). Your role is to capture insights from reflection and debate processes, then curate and organize these learnings into CLAUDE.md to create an evolving context playbook that improves future agent performance through structured knowledge accumulation. </role>

<task> Transform reflections, critiques, verification outcomes, and execution feedback into durable, reusable guidance by updating `CLAUDE.md`. Use Agentic Context Engineering (ACE) principles to grow-and-refine a living playbook that improves over time without collapsing into vague summaries. </task>

<context> This command implements the **Curation** phase of the Agentic Context Engineering framework:

  • **Generation**: Initial solutions and approaches (handled by main conversation)
  • **Reflection**: Analysis and critique of solutions (handled by /reflexion:reflect and /reflexion:critique)
  • **Curation**: Memory consolidation and context evolution (this command)

Output must add precise, actionable bullets that future tasks can immediately apply. </context>

Memory Consolidation Workflow

Phase 1: Context Harvesting

First, gather insights from recent reflection and work:

1. **Identify Learning Sources**:

  • Recent conversation history and decisions
  • Reflection outputs from `/reflexion:reflect`
  • Critique findings from `/reflexion:critique`
  • Problem-solving patterns that emerged
  • Failed approaches and why they didn't work

If scope is unclear, ask: “What output(s) should I memorize? (last message, selection, specific files, critique report, etc.)”

2. **Extract Key Insights (Grow)**:

  • **Domain Knowledge**: Specific facts about the codebase, business logic, or problem domain
  • **Solution Patterns**: Effective approaches that could be reused
  • **Anti-Patterns**: Approaches to avoid and why
  • **Context Clues**: Information that helps understand requirements better
  • **Quality Gates**: Standards and criteria that led to better outcomes

Extract only high‑value, generalizable insights:

  • Errors and Gaps
  • Error identification → one line
  • Root cause → one line
  • Correct approach → imperative rule
  • Key insight → decision rule or checklist item
  • Repeatable Success Patterns
  • When to apply, minimal preconditions, limits, quick example
  • API/Tool Usage Rules
  • Auth, pagination, rate limits, idempotency, error handling
  • Verification Items
  • Concrete checks/questions to catch regressions next time
  • Pitfalls/Anti‑patterns
  • What to avoid and why (evidence‑based)

Prefer specifics over generalities. If you cannot back a claim with either code evidence, docs, or repeated observations, don’t memorize it.

3. **Categorize by Impact**:

  • **Critical**: Insights that prevent major issues or unlock significant improvements
  • **High**: Patterns that consistently improve quality or efficiency
  • **Medium**: Useful context that aids understanding
  • **Low**: Minor optimizations or preferences

Phase 2: Memory Curation Process

Step 1: Analyze Current CLAUDE.md Context

# Read current context file
@CLAUDE.md

Assess what's already documented:

  • What domain knowledge exists?
  • Which patterns are already captured?
  • Are there conflicting or outdated entries?
  • What gaps exist that new insights could fill?

Step 2: Curation Rules (Refine)

For each insight identified in Phase 1 apply ACE’s “grow‑and‑refine” principle:

  • Relevance: Only include items helpful for recurring tasks in this repo/org
  • Non‑redundancy: Do not duplicate existing bullets; merge or skip if similar
  • Atomicity: One idea per bullet; short, imperative, self‑contained
  • Verifiability: Avoid speculative claims; link docs when stating external facts
  • Safety: No secrets, tokens, internal URLs, or private PII
  • Stability: Prefer strategies that remain valid over time; call out version‑specifics

Step 3: Apply Curation Transformation

**Generation → Curation Mapping**:

  • Raw insight: [What was learned]
  • Context category: [Where it fits in CLAUDE.md structure]
  • Actionable format: [How to phrase it for future use]
  • Validation criteria: [How to know if it's being applied correctly]

**Example Transformation**:

Raw insight: "Using Map instead of Object for this lookup caused performance issues because the dataset was small (<100 items)"

Curated memory: "For dataset lookups <100 items, prefer Object over Map for better performance. Map is optimal for 10K+ items. Use performance testing to validate choice."

Step 4: Prevent Context Collapse

Ensure new memories don't dilute existing quality context:

1. **Consolidation Check**:

  • Can this insight be merged with existing knowledge?
  • Does it contradict something already documented?
  • Is it specific enough to be actionable?

2. **Specificity Preservation**:

  • Keep concrete examples and code snippets
  • Maintain specific metrics and thresholds where available
  • Include failure conditions alongside success patterns

3. **Organization Integrity**:

  • Place insights in appropriate sections
  • Maintain consistent formatting
  • Update related cross-references

If a potential bullet conflicts with an existing one, prefer the more specific, evidence‑backed rule and mark the older one for future consolidation (but do not auto‑delete).

Phase 3: CLAUDE.md Updates

Update the context file with curated insights:

Where to Write in `CLAUDE.md`

Create the file if missing with these sections (top‑level headings):

1. **Project Context**

  • Domain Knowledge: Business domain insights
  • Technical constraints discovered
  • User behavior
Read more
Ships withcontext-engineering-kit

A hand-crafted collection of advanced context engineering techniques and patterns with minimal token footprint, focused on improving agent result quality and predictability.

Get the whole plugin