Memory entrypoint with index discipline

From ychampion/cskill-agents · View interactive version

Memory entrypoint with index discipline is an AI agent skill from the GitHub repository ychampion/cskill-agents. Keep MEMORY.md terse by capping entries, warning when caps hit, and pointing each memory to its own file.

How to use this skill

Skill file

SKILL: Memory Entrypoint With Index Discipline

Domain: context-management

Trigger: Use whenever you’re writing to MEMORY.md so the index stays readable and never exceeds terminal-safe length budgets.

Source Pattern: Distilled from reviewed context, compaction, and memory-governance patterns.

Core Method

Treat MEMORY.md as an index rather than a content store: truncate entries when the line cap or byte cap is reached, issue a warning in place of the dropped detail, and point each entry to a dedicated per-topic file that holds the richer memory frontmatter. Keep the truncation routine deterministic by trimming to 200 lines, then to the last newline before 25 000 bytes, so future reads know exactly what the policy will display.

Key Rules

Example Application

If a user asks you to remember their quarterly OKR planning, add a single hook line to MEMORY.md that links to okr.md and let that file carry the context, while the entry keeps MEMORY.md under 200 lines so the prompt cache never truncates the index unexpectedly.

Anti-Patterns (What NOT to do)

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.