Introduction¶
The Agent writes conversation summaries, preferences, and task contexts into a memory directory within the workspace (this Skill targets .workbuddy/memory/). As the directory expands, the snippets injected into the context during each session increase, making real Token consumption often higher than intuition suggests. If the entire library is loaded, it also brings along old memories irrelevant to the current task. Here, we introduce the “Memory Manager” V3.9.0 on SkillHub: it utilizes tiktoken for tokenization measurement, selects and loads memories based on task relevance, and automatically compacts data when the budget is exceeded. The goal can be summarized as “Smaller, More Accurate, and More Economical.”
What is this¶
“Memory Manager” is a Memory Accelerator / Token Throttle Skill designed for AI Agents, maintained by SkillHub user @indiv-aakook/memory-manager-v2 (Official Entry: https://api.skillhub.cn/user_98283d0f/memory-manager-v2). It does not handle general file operations, code analysis, or document editing; instead, it focuses on the measurement, loading strategies, compaction, cleanup, backup, and Prompt templates related to the memory directory.
SkillHub categorizes it under ai-agent; the Skill’s rating on the public page is 72700, with approximately 17367 cumulative downloads (subject to SkillHub display).
Core Features (V3.9.0)¶
Token Measurement & Budgeting¶
- Uses tiktoken for real tokenization measurement. Token figures in the interface are labeled as “Estimated” to avoid the misunderstanding that they are exactly equivalent to model-side billing.
- Three-color budget alerts, referencing the 7-day average, to help determine if memory volume is consistently high.
- Hard budget gate: supports automatic compaction when the budget is exceeded; also provides a throttle one-click button to compress the budget.
Task-Relevance Loading¶
- Supports
--query/--tags: In zero-dependency scenarios, it ranks items using CJK character bigrams along with keyword and tag relevance; optional embedding backends can enhance relevance. - Performance features include: parallel generation (thread pool) for summaries, rank disk signature cache, read short-circuiting, and an LRU cache for fallback estimation.
CLI & Automation¶
- Supports
--forcefor destructive operations, facilitating scripting and CI-style workflows. --jsonoutput for all commands, facilitating programmatic parsing.- Built-in
self-test: includes verification for protections against Prompt injection, path traversal, etc.
Experience & Other Fixes¶
- 24 short aliases to reduce the cost of typing full subcommands.
- Progress feedback during interactions; clean labels the amount of space freed.
- V3.9 Fixes: prompt-get no longer crashes when a template is missing; backup can now accept a workspace parameter.
When a user mentions “Memory Manager,” “Token Check,” “Throttle,” “Relevance Loading,” “Cache Cleanup,” “Memory Search,” “Memory Analysis,” “Deduplication,” “Backup Memory,” “Prompt Template,” “Token Trend,” “Cache Alert,” “Memory Report,” “Smart Loading,” “Diagnostics,” “Memory Grading,” or asks about memory / token / cache / prompt management, the Agent should prioritize enabling this Skill. It is not applicable for general file operations, code analysis, system cleanup, or document editing.
Installation & Activation¶
The installation guide provided on the current SkillHub skill page is: instruct the Agent to read the SkillHub Installation Instructions and install the package @indiv-aakook/memory-manager-v2. The steps below align with the official documentation.
- Check if the
skillhubCLI is already available:
command -v skillhub && skillhub --version
- If not installed, you can perform a full installation (CLI + default Skills) or just the CLI:
# Full installation (CLI + default Skills, recommended)
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash
# Install CLI only
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash -s -- --cli-only
- When installing Memory Manager, you must use
--dirto point to the skills directory actually used by the current Agent. Otherwise, it defaults to./skills/, which the Agent might not recognize:
skillhub install @indiv-aakook/memory-manager-v2 --dir <your skills directory>
Common client skills paths (excerpted from SkillHub installation docs; choose based on your local environment):
- Cursor:
~/.cursor/skills/ - Claude Code:
~/.claude/skills/ - Codex:
~/.codex/skills/or.agents/skills/under the project - workbuddy:
~/.workbuddy/skills/
After installation, you need to restart or reload skills according to the requirements of the client being used (policies vary by client; refer to the client’s documentation).
Typical Usage¶
This Skill is primarily triggered by natural language; V3.9.0 emphasizes the following parameter combinations at the subcommand level (specific subcommand names are subject to SKILL.md within the Skill).
-
Check Token & Trends
When a user says “Token Check,” “Token Trend,” or “Memory Report,” the Agent calls the Memory Manager’s statistics/reporting capabilities, combining tiktoken measurement with the 7-day average and three-color alerts to determine if compaction is needed. -
Load Memory by Current Task
When a user says “Relevance Loading,” “Smart Loading,” or provides a task description, use--queryto pass the task text, and use--tagsto limit tags if necessary, loading only relevant snippets instead of flooding the context with the entire directory. -
Over-Budget Handling
When a budget alert appears or the user says “Throttle,” first evaluate the three-color alert status; if tokens need to be reduced immediately, use throttle; if the budget is consistently exceeded, the hard budget gate triggers automatic compaction (destructive steps require confirmation in interactive scenarios;--forcecan be added for automation). -
Cleanup, Deduplication & Backup
Use clean and other maintenance capabilities for “Cache Cleanup” and “Deduplication” (clean will explain the amount freed); use backup for “Backup Memory,” specifying the workspace starting from V3.9. Add--jsonto the corresponding commands when machine-readable results are needed. -
Prompt Templates & Self-Test
Use prompt-get for “Prompt Template” (the crash issue when templates are missing has been fixed in V3.9). After deployment or changes, use self-test for built-in self-checks to verify if protections against Prompt injection and path traversal are still valid.
Applicable Scenarios & Notes¶
Suitable for: Developers running Agents in the same workbuddy workspace long-term, where memory files accumulate continuously, requiring control over context Tokens, wanting to select memory snippets based on the current task, or wanting to delegate memory maintenance (cleanup, backup, compaction) to a Skill for unified handling.
Notes:
- The default context for the memory directory is
.workbuddy/memory/; if the workspace structure differs, refer to the Skill description and the workspace parameter of backup. - Token display is an estimate. Budgets and alerts are governance aids and cannot replace the billing statements of various model providers.
--forceskips some interactive confirmations and is recommended only for scripted operations with backups in place.- The optional embedding backend depends on additional configuration or services; the zero-dependency path primarily uses CJK bigrams + keywords/tags.
- The version on the SkillHub skill page may update with releases; this article describes the V3.9.0 feature set. If the installed package version is higher, refer to the
SKILL.mdand changelog within the package; do not assume it is identical to V3.9.
Conclusion¶
Memory Manager V3.9.0 chains “Measurement → Relevance Loading → Budget Alerts → Compaction/Throttling → Cleanup & Backup → Self-Test” into an actionable memory governance pipeline, making it suitable as a resident Skill for workbuddy-type Agents. Official Address: https://api.skillhub.cn/user_98283d0f/memory-manager-v2; Installation and CLI behavior are subject to the SkillHub Installation Instructions.