memory-compact

memory-compact is a skill for Claude Code from Dannykkh/skill-olympus. It costs 71 tokens per session (987 once invoked), scanned A, original, MIT.

A maintenance tool for checking and shortening an oversized MEMORY.md file used to store project notes. It moves detailed notes into separate files and leaves a smaller index.

In plain words
What is it for?
Use it to measure memory size, clean up old entries, group observations, and rebuild project memory files.
Why use it?
Large memory files can slow down work and make useful information harder to find. This tool removes duplicate, outdated, and irrelevant material.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths; mentions CLAUDE.md.

Part of the skill-olympus plugin — 98 skills, 7 commands, 42 agents, 5 MCP servers shipped together

Good fit Use it to measure memory size, clean up old entries, group observations, and rebuild project memory files.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dannykkh/skill-olympus/memory-compact
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.

Any agent
npx skills add Dannykkh/skill-olympus --skill memory-compact
Clone the repo
git clone --depth 1 https://github.com/Dannykkh/skill-olympus

Made for: Claude Code.

Or install skill-olympus, the plugin that ships this one along with the rest of its 98 skills, 7 commands, 42 agents, 5 MCP servers.

Wrote 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.

agentmods badge for memory-compact

README.md
[![agentmods](https://agentmods.dev/badge/skills/dannykkh/skill-olympus/memory-compact/github.svg)](https://agentmods.dev/skills/dannykkh/skill-olympus/memory-compact)
Your own site
<a href="https://agentmods.dev/skills/dannykkh/skill-olympus/memory-compact"><img src="https://agentmods.dev/badge/skills/dannykkh/skill-olympus/memory-compact/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.

agentmods 80×15 button for memory-compact

Your own site · 80×15
<a href="https://agentmods.dev/skills/dannykkh/skill-olympus/memory-compact"><img src="https://agentmods.dev/badge/skills/dannykkh/skill-olympus/memory-compact.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 71 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 987 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00071 $0.00987
Opus 5 $0.00036 $0.00494
Sonnet 5 $0.00014 $0.00197
Haiku 4.5 $0.00007 $0.00099

Measured 6d ago against content hash 00923eb1e1cf, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

memory-compact 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 6d 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.

skills/memory-compact/SKILL.md · 128 lines

How it starts

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

Memory Compact - MEMORY.md 압축 스킬

MEMORY.md가 비대해져 성능에 영향을 줄 때 사용합니다. 상세 내용을 memory/*.md로 이동하고, MEMORY.md는 가벼운 인덱스로 복원합니다.

제한 기준

항목 제한
MEMORY.md 최대 줄 수 100줄
MEMORY.md 최대 크기 5KB
항목당 최대 줄 수 3줄 (인덱스에는 요약만)

워크플로우

Step 1: 진단

1. MEMORY.md 읽기
2. 줄 수, 바이트 수 측정
3. 100줄 / 5KB 이하면 → "이미 컴팩트합니다" 종료
4. 초과면 → Step 2 진행

Step 2: 분석

각 섹션을 파싱하여 문제를 분류합니다:

문제 유형 설명 조치
쓰레기 데이터 로그 출력, 에러 메시지, 설치 로그 등 삭제
상세 내용 인라인 인덱스가 아닌 상세 설명이 MEMORY.md에 있음 memory/*.md로 이동
중복 항목 같은 내용이 반복됨 병합
SUPERSEDED 누적 오래된 ❌ 항목이 쌓임 memory/archive.md로 이동

Step 3: 압축 실행

1. 쓰레기 데이터 삭제
2. 상세 내용을 적절한 memory/*.md로 이동
   - 설계 결정 → memory/architecture.md
   - 작업 패턴 → memory/patterns.md
   - 도구/라이브러리 → memory/tools.md
   - 주의사항 → memory/gotchas.md
3. MEMORY.md에는 키워드 인덱스 항목만 남김
4. SUPERSEDED 항목은 memory/archive.md로 이동
5. 빈 섹션 정리

Step 4: 결과 보고

## Memory Compact 결과

| 항목 | 압축 전 | 압축 후 |
|------|---------|---------|
| 줄 수 | {before_lines} | {after_lines} |
| 크기 | {before_kb}KB | {after_kb}KB |
| 삭제된 항목 | {deleted} |
| 이동된 항목 | {moved} |

### 이동 내역
| 내용 요약 | 이동 대상 |
|-----------|-----------|
| {summary} | memory/{file}.md |

MEMORY.md 올바른 형태 (참고)

# MEMORY.md - 프로젝트 장기기억

## 프로젝트 목표
| 목표 | 상태 |
|------|------|
| 핵심 기능 구현 | 🔄 진행중 |

---

## 키워드 인덱스
| 키워드 | 상세 파일 |
|--------|-----------|
| auth, jwt | [memory/architecture.md](memory/architecture.md) |
| hooks, 훅 | [memory/tools.md](memory/tools.md) |

---

## architecture/
→ [memory/architecture.md](memory/architecture.md)

## patterns/
→ [memory/patterns.md](memory/patterns.md)

## tools/
→ [memory/tools.md](memory/tools.md)

## gotchas/
→ [memory/gotchas.md](memory/gotchas.md)

---

## meta/
- **프로젝트**: my-project
- **마지막 업데이트**: 2026-03-08

금지 사항

  • MEMORY.md에 로그 출력, 에러 메시지, 설치 결과를 절대 저장하지 않음
  • MEMORY.md에 3줄 이상의 상세 설명을 넣지 않음
  • 인덱스 역할이 아닌 내용은 반드시 memory/*.md로 분리

Read the full file on GitHub · 128 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. 6d ago First seen · 128 lines · 71 tokens per session scan A 00923eb1e1cf

Subscribe to this mod's changes

memory-compact is a skill published in the GitHub repository Dannykkh/skill-olympus (5 stars, last pushed today), licensed MIT. It adds 71 tokens to every session and 987 once invoked, about $0.0004 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-09-03.