Agent Token-Saving Workflow Optimizer
Paste the following prompt into your AI chat to install this skill:
Please follow https://skillhub.cn/install/skillhub.md to install @user_8d4ddd46/token-saving.
About this skill
Problem
In multi-turn, multi-tool, multi-document agent tasks, token waste often comes from repeated retrieval, verbose planning, dumping long tool output into context, and over-expanded step reasoning. This skill adds workflow constraints instead of replacing model capability: it makes output, loading, and validation decisions explicit to avoid useless tokens.
How It Works
- Routing: one-step tasks answer directly; two-to-three-step tasks plan internally then execute; tasks with three or more steps use
plan -> pilot -> execute. - Parallelism and deduplication: independent tool calls are issued in parallel; already retrieved data is not searched or read again.
- CoD reasoning: in compressible scenarios, each step stays within
<=5 words, with the answer after####. - Context management: tool output above
500 tokenskeeps key conclusions; long content may be written toworkspaceafter user confirmation and referenced by path; complex tasks maintainprogress.md. - Memory injection: if missing memory is detected, it reads
memory-inject.md, asks for confirmation, and writes tosoul_mdoragent_md.
Boundaries
Do not use it for simple Q&A or very short contexts. When anti-hallucination, high precision, creativity, first execution, or visible reasoning is required, validation takes priority over saving tokens. It does not modify conversation history; it mainly affects the agent output side. For data volume, aggregate no more than 200K characters and paginate 10-20 items per page.
Use Cases
- In 10+ turn multi-tool conversations, let the agent call search, read, and analysis tools in parallel, merge results, and avoid repeated retrieval.
- When analyzing long documents, truncate tool output above 500 tokens to key conclusions and track task progress in progress.md.
- Before multi-step data aggregation, use plan, pilot, and execute to validate a small sample first and reduce wasted context.
- In long conversations, write confirmed materials to workspace and reference them by path instead of loading full text repeatedly.
Best For
- Engineers building multi-tool agent apps: need fewer repeated tool calls and less redundant output in 3+ step tasks.
- Developers maintaining long-conversation assistants: need context control by truncating tool output and maintaining progress.md.
- Data analytics engineers producing reports: need to aggregate results from multi-turn retrieval and document reading without token bloat.
- Team leads managing enterprise knowledge-base assistants: need automatic routing, parallel tool calls, and path-referenced materials for complex tasks.
Related Skills
A free matrix publishing assistant for Skill developers, guiding distribution to Tencent SkillHub, XiaLiao, XiaYou SkillHub, GitHub, and ClawHub with create, update, and delete safeguards.
A guide for writing Seedance 2.0 video prompts, covering @ references, camera moves, time segments, audio direction, and common pitfalls.
Collects daily conversations, task logs, and errors, then runs a nine-module review to surface blind spots, generate actions, and update memory.
Local long-term memory for AI agents that appends key facts and daily logs, supports cross-session context and search recall, and auto-archives old diaries to gzip files.