Skip to content
Skills Library
AI & agents · Automation

memory-init

/memory-init

Initialize the Engram memory system — creates configuration, memory files, and CLAUDE.md integration. Trigger when the user sets up persistent memory for a project, or when `.claude/memory-settings.json` is missing and a memory feature is requested.

Licence
MIT
Last repository change
26.05.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
3
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 26.05.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What to check before installing
  • SKILL.md zawiera komentarze HTML (3). Nie widać ich w podglądzie Markdown, a model je czyta.

What it does and when to use it

Initialize the Engram memory system — creates configuration, memory files, and CLAUDE.md integration. Trigger when the user sets up persistent memory for a project, or when `.claude/memory-settings.json` is missing and a memory feature is requested.

Original author description

Initialize the Engram memory system — creates configuration, memory files, and CLAUDE.md integration. Trigger when the user sets up persistent memory for a project, or when `.claude/memory-settings.json` is missing and a memory feature is requested.

How it works

  1. When to Use
  2. Workflow
Original SKILL.md headings · 145 lines, 792 words
SKILL.md preview
---
name: memory-init
description: Initialize the Engram memory system — creates configuration, memory files, and CLAUDE.md integration. Trigger when the user sets up persistent memory for a project, or when `.claude/memory-settings.json` is missing and a memory feature is requested.
---

# Memory Init

Initialize the Engram memory system for the current project.

## When to Use

Trigger this skill when:

- The user explicitly asks to set up, initialize, or configure Engram / persistent memory
- A memory-related skill (`memory-remember`, `memory-recall`, `memory-status`) is requested but `.claude/memory-settings.json` does not exist
- The user re-runs init to upgrade an existing configuration (e.g. to change preset, language, or search_mode)

## Workflow

### 1. Ask Preset Choice

Ask the user which preset they want:

- **personal-assistant** — Daily life, preferences, habits, personal interactions
- **project-assistant** — Codebase, architecture, tech decisions, team workflow
- **character-companion** — Persona, relationship, story progression, emotional bonds
- **pair-programmer** — AI self-learning, mistake tracking, user preference rules, collaboration patterns

Or offer **custom** configuration.

### 2. Ask File Name Customization

Show the default file names and ask if the user wants to change them:

```
memory_preferences.md    (User/Project/Character preferences)
memory_conversations.md  (Conversation history)
memory_longterm.md       (Long-term memories)
```

### 3. Ask Language Preference

- `en` — English CLAUDE.md section (default)
- `zh` — Chinese CLAUDE.md section

### 3.5 Ask Search Mode

- `strong` — 回覆前預設先用 `memory-recall` 檢查一次記憶 / Check memories before responding by default
- `weak` — 判斷話題可能涉及過去時才搜尋 / Search only when a topic may involve past context (default)

### 4. Create Configuration

Create `.claude/memory-settings.json` with the chosen settings:

```json
{
  "preset": "<chosen-preset>",
  "files": {
    "preferences": "<preferences-filename>",
    "conversations": "<conversations-filename>",
    "longterm": "<longterm-filename>"
  },
  "language": "<en|zh>",
  "search_mode": "<strong|weak>"
}
```

### 5. Copy Preset Templates

Copy the template files from the plugin's `templates/presets/<preset>/` directory to the project root. The plugin root is available via `${CLAUDE_PLUGIN_ROOT}` or can be found by locating the engram plugin directory.

Read each template file and write it to the project root with the configured file names.

Replace `{DATE}` placeholders with the current date (run `date '+%Y-%m-%d'` via Bash to get it).

### 5c. Append Engram Section to CLAUDE.md

Read the CLAUDE.md section template from the plugin's `templates/` directory:

- If language is `zh`: read from `templates/claude-md-section-zh.md`
- If language is `en`: read from `templates/claude-md-section-en.md`

Replace the following placeholders with the actual configured values:

- `{PREFS_FILE}` → preferences file name
- `{CONVOS_FILE}` → conversations file name
- `{LONGTERM_FILE}` → longterm file name
- `{PRESET}` → chosen preset name
- `{VERSION}` → plugin version from `.claude-plugin/plugin.json`
- `{SEARCH_MODE_INSTRUCTION}` → resolved based on search_mode and language. Emit as a standalone paragraph (no numbered prefix):
  - **strong + en**: `**Strict search mode**: By default, check memories with the \`memory-recall\` skill before responding; skip only when the topic is clearly unrelated to history (greetings, pure computation, etc.).`
  - **weak + en**: `**Judgment-based search**: When you judge that a topic may involve past discussions or established preferences, search with the \`memory-recall\` skill before responding.`
  - **strong + zh**: `**嚴格搜尋模式**:回覆前預設先用 \`memory-recall\` skill 檢查一次記憶;只有話題明顯與歷史無關(打招呼、純粹計算等)時才略過。`
  - **weak + zh**: `**判斷式搜尋**:當你判斷話題可能涉及過去討論或既有偏好時,先用 \`memory-recall\` skill 搜尋後再回覆。`

Then apply to `CLAUDE.md` in the project root:

1. **If CLAUDE.md exists and contains `<!-- ENGRAM:START -->`**: Replace everything between `<!-- ENGRAM:START -->` and `<!-- ENGRAM:END -->` (inclusive) with the new resolved content
2. **If CLAUDE.md exists but has no markers**: Append the resolved content to the end of the file (with a blank line separator)
3. **If CLAUDE.md does not exist**: Create a new CLAUDE.md with only the resolved content

The `@{PREFS_FILE}` reference inside the section causes Claude Code to auto-load preferences into context on every session start.

### 6. Upgrade Path (Re-running Init)

If `.claude/memory-settings.json` already exists:

1. Ask what the user wants to change (preset / language / search_mode / file names)
2. Update `.claude/memory-settings.json` with the new values
3. Re-generate the CLAUDE.md section (Step 5c) with the new values
4. If file names changed, leave the old files in place and tell the user to move them manually — do not delete existing memory content

### 7. Optional Customization

Ask the user: "Would you like to add or modify any sections in the preferences template?"

If yes, guide through customization — adding new sections, renaming existing ones, or removing irrelevant ones.

### 8. Optional Initial Fill

Ask the user: "Would you like to fill in your initial preferences now?"

If yes, walk through each section and populate the preferences file with the user's answers.

### 9. Output Summary

Display a summary of what was created:

```
Engram Memory System Initialized!

Preset: <preset>
Language: <language>
Search mode: <search_mode>

Files created/updated:
  - <preferences-file> (preferences — auto-loaded via @ reference in CLAUDE.md)
  - <conversations-file> (conversation history)
  - <longterm-file> (long-term memories)
  - .claude/memory-settings.json (configuration)
  - CLAUDE.md (memory instructions + preferences auto-load)

The memory system is now active. I will:
  - See your preferences every session via the @-reference in CLAUDE.md
  - Save new preferences and decisions as I discover them
  - Record conversation summaries at natural endpoints
  - Search past memories when a topic relates to previous context
```

Versions

RepositoryScoreLicence
This page · legacybridge-tech/claude-plugins100MIT
dmzoneill/skills100Apache-2.0
flc1125/skills100MIT
yunshu0909/yunshu_skillshub100MIT

Database snapshot: 13.11.2026 · package version 153cca662f44 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100memory-status
    Display Engram memory system status — configuration, file sizes, entry counts, and health check. Trigger when the user asks about memory state, what's been remembered, or for diagnostics.
  • 90brain:init
    Use when setting up project memory in a new folder or on the first brain:init in a project. Creates project_brain.db, registers the project, and bootstraps it from CLAUDE.local.md, memory files, docs, and emails; safe to re-run.
  • 100pm-init
    Initialize or refresh Project Memory for a repository. Use after amplifying a new repo, when the user says "init PM", "set up project memory", or when pm-index.md is missing or empty. Surveys the codebase, creates starter PM units, and populates the index.
  • 95engram-memory
    Use Engram as persistent memory across sessions — search it before starting work on a project, and save decisions and their reasoning before finishing. Use whenever the user refers to earlier work, past decisions, or something discussed in a previous session.
  • 100agent-init
    为 Claude Code 初始化项目协作骨架。当用户希望创建或补齐 CLAUDE.md 与 .claude,并生成 rules、memory、agents、hooks 配置的起始模板时使用。Codex 仅作为 Claude Code 临时调用的任务执行工具,本 skill 不生成 AGENTS.md、.codex 或 Codex agents。
  • 100engram-digest
    Seed or top up this project's Engram graph from the existing codebase — an explicit, user-invoked digestion of the current working tree into typed memory nodes (decisions, principles, cautions, problems, insights, intents). Use when the user says "digest this project", "ingest…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.