Borrowing it
Nothing to install: this file belongs to roboco-io/ralph-mem. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/roboco-io/ralph-mem/main/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/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<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="Reviewed on agentmods" width="80" 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.1 | $0.01815 | $0.01815 |
| Opus 5.5 | $0.00726 | $0.00726 |
| Sonnet 5.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 2mo 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.
- 2mo 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 9mo ago), licensed MIT. It adds 1,815 tokens to every session, about $0.0073 per session on Opus 5.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.
ralph-mem CLAUDE.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| ralph-mem CLAUDE.mdroboco-io/ralph-mem | Instructions file | 2 | 9mo ago | MIT | A | 1,815 | Claude Code |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | yesterday | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |