# Memory Builder

> 🧠 Memory Builder Skill

- Skill: `moeabdelaziz007/memory-builder` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add moeabdelaziz007/memory-builder`
- Raw SKILL.md: https://api.skillmd.com/api/skills/moeabdelaziz007/memory-builder/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: Moeabdelaziz007 (https://skillmd.com/u/moeabdelaziz007)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/moeabdelaziz007/memory-builder

---

# 🧠 Memory Builder Skill

## Overview

Enables the agent to **build its own memory** through pattern learning and context management. Zero-config local storage.

## Why This Matters

This skill allows the agent to:

- **Learn from interactions** (store successful patterns)
- **Remember context** across sessions
- **Self-evolve** by recalling what worked before

## Capabilities

| Function | Description |
| :--- | :--- |
| `learn_pattern(name, data)` | Store a learned pattern. |
| `recall_pattern(name)` | Retrieve a stored pattern. |
| `list_patterns(category)` | List all learned patterns. |
| `update_context(key, value)` | Update active context. |
| `get_context(key)` | Read current context. |
| `clear_context()` | Reset context for fresh start. |

## Usage

```python
from skills.memory_builder.tool import learn_pattern, recall_pattern, update_context

# Learn a coding pattern
learn_pattern(
    pattern_name="api_error_handling",
    pattern_data={"technique": "exponential_backoff", "max_retries": 3},
    category="coding"
)

# Recall it later
pattern = recall_pattern("api_error_handling")

# Track current project context
update_context("current_feature", "voice_skill")
```

## Storage Location

- **Patterns:** `.idx/evolution/learned_patterns.json`
- **Context:** `.idx/evolution/active_context.json`

## Requirements

- **None!** Uses Python's built-in `json` and `pathlib`.

