memory-init

A command that initializes a Markdown-based memory system in the current project. It creates memory folders, templates, and project instructions when they are missing.

In plain words
What is it for?
Use it to set up memory files, add memory instructions to CLAUDE.md, create a memory index, and install the four note templates.
Why use it?
It gives the project a consistent place to store and retrieve user preferences, project knowledge, feedback, and reference notes across sessions.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/gaebalai/claude-memory-plugin/memory-init
Clone the repo
git clone --depth 1 https://github.com/gaebalai/claude-memory-plugin
Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,223 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00011 $0.01223
Opus 5 $0.00005 $0.00611
Sonnet 5 $0.00002 $0.00245
Haiku 4.5 $0.00001 $0.00122

Measured 2d ago against content hash 4646bfccf85d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

memory-init scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/memory-system/commands/memory-init.md · 156 lines

How it starts

The opening of the file, as written. The whole thing — 156 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Memory System 초기화

현재 작업 디렉터리에 auto memory 시스템을 구축합니다.

실행 순서

1. 디렉터리 생성

다음 디렉터리를 생성합니다 (이미 존재하면 스킵):

  • .claude/rules/
  • .claude/skills/
  • memory/
  • memory/_templates/

2. CLAUDE.md 업데이트

CLAUDE.md가 없으면 새로 생성하고, 있으면 기존 내용 끝에 아래 섹션을 추가하세요 (중복 방지를 위해 ## Memory System 헤더가 이미 있으면 스킵):

## Memory System

이 프로젝트는 Markdown 기반 auto memory 시스템을 사용합니다.

### 읽기 규칙
- 세션 시작 시 `memory/MEMORY.md`를 **반드시 먼저 Read**로 읽는다
- 인덱스에서 관련 있는 서브파일만 선택적으로 Read
- 모든 본문 파일을 한꺼번에 읽지 말 것 (context 낭비)

### 쓰기 규칙
- 새로운 학습이 생기면 적절한 타입으로 `memory/`에 저장
- 4가지 타입: `user` / `feedback` / `project` / `reference`
- `feedback`과 `project` 타입은 반드시 **Why + How to apply** 포함
- 날짜는 **절대 날짜 + KST** 명시 (예: `2026-04-24 KST`)
- 코드에서 derivable 하거나 git log로 추적 가능한 사실은 저장하지 않음

3. memory/MEMORY.md (인덱스) 생성

기존에 없을 때만 생성하세요:

# Memory Index

> 이 파일은 인덱스입니다. 본문은 서브파일에 있습니다.
> 관련 항목만 Read로 불러와 주세요.

## 프로젝트 개요
- **이름**: (프로젝트명)
- **목적**: (한 줄 요약)
- **주요 스택**: (언어/프레임워크)

## 기술 메모
<!-- feedback_*.md, project_*.md 등 서브파일 링크를 여기에 추가 -->

## 사용자
- [user_role.md](user_role.md)

## 외부 리소스
<!-- reference_*.md 서브파일 링크 -->

4. 4가지 타입 템플릿 생성 (memory/_templates/)

플러그인에 포함된 템플릿 파일들을 복사합니다. 플러그인 경로의 templates/ 디렉터리에서 다음 파일들을 memory/_templates/로 복사하세요:

  • user.md
  • feedback.md
  • project.md
  • reference.md

플러그인 templates 디렉터리를 찾을 수 없다면, 아래 내용으로 각 템플릿을 직접 생성하세요:

memory/_templates/user.md:

---
name: (역할/이름)
type: user
description: (한 줄 요약)
---

- (경력/직책)
- (주요 기술 스킬)
- (커뮤니케이션 선호: 예. "Go 관례와 비교해서 설명하면 이해가 빠름")

memory/_templates/feedback.md:

---
name: (규칙 이름)
type: feedback
description: (한 줄 요약)
---

**규칙**: (지켜야 할 행동)

**Why**: (이 규칙이 생긴 배경·사례)
**How to apply**: (어떤 상황에서 어떻게 적용할지 구체적으로)

memory/_templates/project.md:

---
name: (상태 이름)
type: project
description: (한 줄 요약)
---

**사실**: (무엇이 언제부터 - YYYY-MM-DD KST)

**Why**: (왜 이 상태가 되었는지)
**How to apply**: (이 상태일 때 어떻게 행동해야 하는지)
**유효 기한**: (있다면 YYYY-MM-DD KST, 없으면 "재확인 필요")

Read the full file on GitHub · 156 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 156 lines · 11 tokens per session scan A 4646bfccf85d

Subscribe to this mod's changes

memory-init is a command published in the GitHub repository gaebalai/claude-memory-plugin (2 stars, last pushed 4mo ago), licensed MIT. It adds 11 tokens to every session and 1,223 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.