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.
npx agentmods add instructions/roboco-io/ralph-mem/claude-mdgit clone --depth 1 https://github.com/roboco-io/ralph-memWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/roboco-io/ralph-mem/claude-md)<a href="https://agentmods.dev/instructions/roboco-io/ralph-mem/claude-md"><img src="https://agentmods.dev/badge/instructions/roboco-io/ralph-mem/claude-md.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.01815 | $0.01815 |
| Opus 5 | $0.00907 | $0.00907 |
| Sonnet 5 | $0.00363 | $0.00363 |
| Haiku 4.5 | $0.00181 | $0.00181 |
Grade A, and why
ralph-mem CLAUDE.md 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 3d 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.
How it starts
The opening of the file, as written. The whole thing — 225 lines — stays where its author put it; the contents beside it link to each section on GitHub.
ralph-mem
Claude Code를 위한 Ralph Loop 기반 지속적 컨텍스트 관리 플러그인
프로젝트 개요
ralph-mem은 Ralph Loop의 "성공할 때까지 반복" 철학과 지능적 컨텍스트 관리를 결합한 Claude Code 플러그인입니다.
해결하는 문제:
- Context Rot: 누적된 불필요한 정보로 인한 모델 성능 저하
- Compaction: context window 60-70% 초과 시 출력 품질 급락
- Forgetfulness: 세션 간 작업 맥락 손실
- One-shot 실패: 복잡한 작업에서 단일 시도 성공률 저조
기술 스택
| 항목 | 기술 |
|---|---|
| Runtime | Bun |
| Language | TypeScript (ES2022, strict mode) |
| Database | SQLite + FTS5 |
| Testing | Vitest |
| Linting | Biome |
프로젝트 구조
ralph-mem/
├── src/
│ ├── index.ts # 플러그인 엔트리포인트
│ ├── core/ # Core Layer
│ │ ├── db/ # SQLite 클라이언트
│ │ ├── store.ts # MemoryStore 인터페이스
│ │ └── search.ts # SearchEngine 인터페이스
│ ├── hooks/ # Lifecycle hooks
│ ├── features/ralph/ # Ralph Loop 엔진
│ ├── skills/ # Slash commands
│ └── utils/ # 유틸리티
├── tests/ # Vitest 테스트
├── docs/
│ ├── design/ # 설계 문서
│ └── issues/ # 구현 태스크 (폴더별 관리)
│ ├── 001-project-setup/
│ │ ├── README.md # 이슈 내용
│ │ └── evidence.md # 완료 검증 증거
│ ├── 002-plugin-manifest/
│ │ └── README.md
│ └── ...
└── .claude/ # Claude Code 설정
├── hooks/ # UserPromptSubmit hook
└── commands/ # Custom skills
아키텍처
3계층 아키텍처로 구성:
-
Core Layer (
src/core/)- MemoryStore: 세션/관찰 관리
- SearchEngine: FTS5 전문 검색
- SQLite 스토리지
-
Hook Layer (
src/hooks/)- SessionStart: 관련 메모리 자동 주입
- SessionEnd: 세션 요약 생성 및 저장
- PostToolUse: 도구 사용 결과 기록
- UserPromptSubmit: 컨텍스트 자동 주입
-
Feature Layer (
src/features/ralph/)- Loop Engine: 성공까지 반복 실행
- Success Criteria: 성공 기준 평가
- Overbaking Prevention: 과도한 반복 방지
주요 개념
Progressive Disclosure (3계층 검색)
토큰 효율적인 메모리 검색:
| Layer | 내용 | 토큰 |
|---|---|---|
| Layer 1 | Index (ID + 점수) | 50-100/result |
| Layer 2 | Timeline (시간순 컨텍스트) | 200-300/result |
| Layer 3 | Full Details | 500-1000/result |
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.
- 3d ago First seen · 225 lines · 1,815 tokens per session scan A ae983bde5183
ralph-mem CLAUDE.md is an instructions file published in the GitHub repository roboco-io/ralph-mem (2 stars, last pushed 7mo ago), licensed MIT. It adds 1,815 tokens to every session, about $0.0091 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.
Other instructions, from other repositories
cognirepo CLAUDE.md
Instructions for ashlesh-t/cognirepo, covering claude.md, key rules, session start sequence (run in this order), behavioral confirmation rule and personas (cognirepo-402, cognirepo-403).
aeon CLAUDE.md
Instructions for aeonfun/aeon, covering aeon, how aeon works, strategy, voice and soul file hierarchy (read in this order).
inkwell-memory CLAUDE.md
Instructions for veronchenko/inkwell-memory, covering claude.md — inkwellmemory, layout, multi-tenant mode (inkwellmultitenant=1), conventions and testing.
RNR-Enhanced-Cognee AGENTS.md
AGENTS.md instructions for vincentspereira/RNR-Enhanced-Cognee, covering rnr enhanced cognee implementation for codex, critical requirements, 1. ascii-only output (no unicode encoding), 2. dynamic categories (no hardcoded categories) and 3. standard memory mcp interface.
memory-mcp-1file AGENTS.md
Instructions for pomazanbohdan/memory-mcp-1file, covering ⛔ l0 invariants (never violate under any circumstance), detection heuristic, 🔀 phase transition routing (⛔ blocking), gate-0: phase identification & loading and 🧾 proof-of-load requirement (critical).
openexp CLAUDE.md
Instructions for anthroos/openexp, covering openexp — development instructions, memory protocol (mandatory), before starting any task, after completing a task and when the user shares context.