Memory Manager V3.9.0
Paste the following prompt into your AI chat to install this skill:
Please refer to https://skillhub.cn/install/skillhub.md to install @user_98283d0f/memory-manager-v2.
About this skill
Problem Statement: The Hidden Token Drain in AI Sessions
In prolonged conversations, AI assistants automatically load all memory files from the .workbuddy/memory directory into the context window. Over time, these files accumulate: obsolete dialogues, duplicated memory fragments, and stale cache data. The direct consequences are soaring initial token consumption per session, leading to slower responses and increased costs, while low-quality memories can distort AI judgment.
Specific symptoms include:
- Token Budget Overrun: An inflated memory file can consume thousands of tokens, crowding out space for new tasks.
- Inefficient Search: Retrieving specific information from a chaotic memory mass forces the AI to process excessive irrelevant content.
- Cache Liability: Piled-up temporary data occupies disk space and may degrade performance.
Core Functionality: Precision Trimming of Memory Streams
Memory Manager V3.9.0, as an AI memory accelerator, achieves token throttling through an automated toolchain. Its workflow revolves around three key steps:
-
Memory Analysis and Quantification
- Commands likeanalyzeortoken-checkscan the memory directory and generate a token usage report.
-token-trendsprovides historical consumption trends to identify abnormal spikes.
- Therankcommand prioritizes memories by importance, offering a basis for cleanup. -
Intelligent Cleanup and Optimization
- Deduplication and Cleaning:dedupdetects duplicate memories, whileauto-cleanperforms differentiated cleaning (e.g., removing old caches, compressing outdated data).
- Budget Control: Thethrottlecommand compresses memory before injection to ensure the total token count stays within a set budget.
- Precision Loading:load --days Norload --query [topic]loads only essential memories, avoiding full scans. -
Safety and Operational Safeguards
- Three-tier operation permissions: read-only actions execute directly; cleanup actions default to preview (dry-run) and require user confirmation; destructive actions must explicitly use--execute.
- Health Checks: Thedoctorcommand diagnoses system status, andcache-remindermonitors cache accumulation.
- Backup and Recovery:exportandimportsupport versioned memory management.
Scope and Limitations
This skill is designed exclusively for the .workbuddy/memory directory. It does not apply to:
- General file management (outside the memory directory)
- Code debugging or refactoring (requires dedicated code tools)
- System-level disk cleanup (involves the global file system)
Key constraints:
- Encoding Dependency: Memory files must be UTF-8; otherwise, UnicodeDecodeError may occur.
- Permission Requirements: Write access to the .workbuddy/ directory is mandatory; otherwise, PermissionError is triggered.
- Feature Fallback: Optional dependencies (e.g., tiktoken for precise token calculation) cause automatic degradation when missing, but core cleanup remains functional.
Usage Tip: After the first run, token data accumulates gradually. It is recommended to regularly execute token-trends to monitor trends and proactively control memory injection scale with throttle.
Use Cases
- During long-term project development, AI memory files balloon to thousands of tokens, causing slow session starts and high costs; use analyze to locate large files and cache-clean to purge old caches.
- Customer service sessions accumulate numerous dialogues; when searching for specific client issues, use search --tag to quickly filter relevant memories, avoiding sifting through cluttered files.
- Before AI generates a report, the total memory exceeds the budget; use the throttle command to compress relevant memories to a specified token count, ensuring fast responses and cost control.
- During routine AI workspace maintenance, use doctor to diagnose memory system health, and auto-clean to automatically delete temporary cache files older than 30 days.
Best For
- Developers relying on AI for long-term project management who need to periodically clean memory caches to reduce token costs and maintain context accuracy.
- Customer service representatives using AI assistants to handle numerous client dialogues who need to search history quickly via tags and folders for consistent service.
- Technical managers operating multiple AI projects who need to diagnose system health and automate cleanup of useless data to maintain performance.
- Researchers using AI to generate lengthy reports who need to leverage the throttle function to compress memory injection and prevent context window overflow affecting generation quality.
Related Skills
Model routing, persistent parameter management, self-check repair, and global default model control for XiaoYi Claw.
Install, update, and manage OpenClaw Skills through SkillHub, with automatic detection after installation.
Provides API endpoints for AI agents to post bottles and graffiti, browse the feed, and interact with likes and comments.
ReqPlan constrains agent development, debugging, and analysis workflows with a seven-stage state machine, checkpoints, quality audits, and local Harness artifacts.