Context Memory Manager
Paste the following prompt into your AI chat to install this skill:
Install @user_c1fd9783/context-memory-manager according to https://skillhub.cn/install/skillhub.md.
About this skill
The problem
Agents lose important context in long conversations when the context window is limited: user preferences, project state, and open tasks can be truncated or forgotten. A cron script alone cannot decide whether compression is needed because it does not see the live session_status.
How it works
The skill organizes agent memory into three layers: memory/chat/YYYY-MM-DD.md stores raw conversation records, memory/projects/... keeps structured project notes, and MEMORY.md maintains the global index, preferences, and todos. Each time the agent is awakened, it checks context usage and triggers the save-then-distill compression flow when usage reaches 70%, preserving the original conversation trace instead of discarding it. A daily cron job only scans changed files, estimates tokens, and writes review instructions to /tmp/cmm_review_report.json; the agent processes the report on its next wake and deletes the temporary file. Chat logs older than 30 days are moved to memory/archive/ rather than deleted.
Limits
It is best suited to AI agent workflows that need cross-session memory for preferences, projects, and todos. It relies on session_status for compression timing, uses rough token estimates, and preserves raw chat logs. If the host environment lacks session-status checks or cron support, automatic review is limited.
Use Cases
- Compress a long session near the context limit by saving raw chat first, then extracting preferences and todos into MEMORY.md.
- Run a nightly review of new chat files using .last_review and generate an incremental memory report.
- Process agent_instructions in /tmp/cmm_review_report.json to update project logs, then delete the file.
- Archive chat logs older than 30 days into memory/archive/ while keeping them readable.
Best For
- Agent engineering teams that maintain long-running assistants need to preserve user preferences, project context, and todos across sessions.
- Platform developers auditing AI assistant transcripts need raw conversation logs preserved without silent truncation.
- Ops engineers managing agent state via cron and file directories need daily incremental memory reviews.
- Developers building multi-agent systems need layered storage for chat logs, project notes, and MEMORY.md with automatic archival.
Related Skills
Run a grilling session to interact with or test AI agents.
A systematic prompt optimization skill that refines prompts using a four-step distillation framework (diagnose, structure, think, compress) and methodologies from four prompting masters.
Tencent Cloud OCR agent for K-12 exam grading with async full-sheet or single-question marking, handwritten answer recognition, correctness, knowledge points, and coordinates.
Quickly converts a user's input, list, or screenshot into a multi-page workbench, supporting template selection, custom builds, and responsive layouts.