stark-memory

Audit and rewrite Claude Code auto-memory files to fit load and recall caps.

Updated Mar 16, 2026
One-click install
npx skills add https://github.com/21StarkCom/stark-skills --skill stark-memory-21starkcom
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: stark-memory
Source: https://github.com/21StarkCom/stark-skills/tree/main/skill/stark-memory
Command: npx skills add https://github.com/21StarkCom/stark-skills --skill stark-memory-21starkcom

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Claude Code silently truncates a project's MEMORY.md index past 200 lines or 25,000 characters and topic files past 4,096 bytes, so growing memory hides its newest entries and loses file tails without warning. This Skill measures every memory directory against those caps and, on request, rewrites the files to fit. ## Core Features & Use Cases - Read-only measurement: Runs a Node tool that reports index size, over-cap files, long index lines, orphans, dangling entries, and cross-repo facts as JSON. - Dry-run by default: Presents a ranked report of what needs fixing without writing anything unless --apply is passed. - Lossless rewriting: Shortens index lines, splits or tightens over-cap topic files only when no facts are lost, and moves cross-repo facts into the correct project's memory dir. - Use Case: Your MEMORY.md has grown past 25,000 characters and new memories stop appearing at session start. Run the audit, review the dry-run plan, then apply it to shorten index lines and split dense notes. ## Quick Start Ask the assistant to audit my Claude Code memory with /stark-memory, review the dry-run report, then rerun with --apply to fix over-cap files.

Frequently Asked Questions about stark-memory

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix a MEMORY.md that is too big in Claude Code?▼

Run the memory audit to measure the index against the 200-line and 25,000-character caps, then apply the rewrite phase. It shortens index lines over 150 characters to a title plus one hook while preserving every link target.

Why are my Claude Code memory entries not loading at session start?▼

Claude Code loads only the first 200 lines or 25,000 characters of MEMORY.md, whichever comes first, and silently drops the rest. The audit report names the first dropped line so you can see exactly which entries are invisible.

Does the memory tidy tool modify files automatically?▼

No. Dry-run is the default and the measuring tool is read-only. Rewrites happen only when you pass --apply, and all writes go through Write/Edit tools rather than shell moves.

Can it handle memory files about a different repository?▼

Yes. The report flags cross-repo facts as strong or weak based on foreign repo slugs. With --apply, strong facts are moved into the target repo's own memory directory after operator confirmation.

What happens when a memory file cannot be shortened without losing facts?▼

The skill never blind-tightens dense notes. It either splits the file into separate one-fact files with new index lines, or leaves the original in place and flags it for a manual split.