← Back to Skills Marketplace
110
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install token-use-optimizer
Description
AI Agent 项目的 Token 消耗审计与系统性优化。提供四层诊断框架、六步优化 SOP、 自动化审计脚本。适用于任何使用 Rules + Memory + Knowledge + Skills 架构的 AI Agent 项目(如 CodeBuddy、Cursor、Windsurf 等)。 This ski...
Usage Guidance
This skill appears coherent: it bundles a Python auditor and documentation that match its stated goal of auditing Rules/Memory/Knowledge token costs. Before installing or running:
- Inspect SKILL.md and scripts/token_audit.py yourself (or have a developer do so). The included script reads files under the target project and prints a report — it does not perform network calls in the provided code, but executing arbitrary scripts can be risky.
- Run the script on a copy of your project, not on a production workspace containing secrets. The tool will read repository files (including MEMORY.md) and may output their contents or character counts.
- Pay attention to the pre-scan 'system-prompt-override' flag: search SKILL.md for any lines that try to change system prompts or inject agent/system-level instructions. If you find such lines, do not run the skill until they are removed or explained.
- Execute the script in a restricted environment (non-root user, ephemeral container) the first time to confirm behavior.
- If you rely on enterprise security policy, have your security/dev team review the Python file for any unexpected file writes or subprocess/network usage (the provided code appears to use only local file reads and standard libs).
If you want higher confidence, provide the exact SKILL.md frontmatter and the full, untruncated portion of scripts/token_audit.py print/report output for a quick line-by-line check.
Capability Analysis
Type: OpenClaw Skill
Name: token-use-optimizer
Version: 1.0.0
The bundle provides a legitimate utility for auditing and optimizing token consumption in AI agent projects. It includes a Python script (scripts/token_audit.py) that performs local file system scanning of rules, memory, and knowledge files to estimate token overhead, and comprehensive documentation (SKILL.md, references/) providing optimization strategies. No evidence of data exfiltration, malicious execution, or harmful prompt injection was found; the script uses only standard libraries and lacks any network or unauthorized persistence capabilities.
Capability Assessment
Purpose & Capability
Name/description, included audit script (scripts/token_audit.py) and reference docs directly support token auditing and optimization for Rules/Memory/Knowledge architectures; no unrelated binaries, env vars, or external services are requested.
Instruction Scope
SKILL.md instructs the agent/operator to run the included Python audit script against a project root and to follow the provided SOP — this stays within the stated purpose (scanning repo files and producing a report). However, the pre-scan flagged a 'system-prompt-override' pattern in the SKILL.md content; while the visible instructions do not explicitly attempt to change system prompts or exfiltrate data, you should inspect the SKILL.md frontmatter and triggers for any lines that try to override agent/system prompts or execute unexpected actions.
Install Mechanism
No install spec — instruction-only with a bundled Python script. There are no downloads from external URLs and the script uses only standard library modules; risk from installation is low. Executing the included script will run local Python code (review before execution).
Credentials
The skill requests no environment variables, no credentials, and no config paths. The audit script reads local project files (e.g., .codebuddy/rules, knowledge directories, .codebuddy/MEMORY.md) which is appropriate for a token-audit tool.
Persistence & Privilege
Skill is not always-enabled and does not request persistent agent privileges. It does not modify other skill configs or system-wide settings in the provided code or instructions.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install token-use-optimizer - After installation, invoke the skill by name or use
/token-use-optimizer - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
- Major restructure: the skill is now a comprehensive Token Optimization auditor and SOP for AI Agent projects.
- Adds a four-layer diagnostic framework (Rules, Memory, Knowledge, Runtime Behavior) with ROI-focused steps.
- Includes an automated token audit script (`scripts/token_audit.py`) for baselining and structured reporting.
- Provides step-by-step optimization strategies and an actionable decision tree.
- Adds two detailed reference files: `references/optimization-strategies.md` (full playbook) and `references/real-world-cases.md` (real cases).
- README removed; all guidance and instructions consolidated into SKILL.md and references.
Metadata
Frequently Asked Questions
What is token-use-optimizer?
AI Agent 项目的 Token 消耗审计与系统性优化。提供四层诊断框架、六步优化 SOP、 自动化审计脚本。适用于任何使用 Rules + Memory + Knowledge + Skills 架构的 AI Agent 项目(如 CodeBuddy、Cursor、Windsurf 等)。 This ski... It is an AI Agent Skill for Claude Code / OpenClaw, with 110 downloads so far.
How do I install token-use-optimizer?
Run "/install token-use-optimizer" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is token-use-optimizer free?
Yes, token-use-optimizer is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does token-use-optimizer support?
token-use-optimizer is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created token-use-optimizer?
It is built and maintained by Louis Qiu (@louisecxqiu-glitch); the current version is v1.0.0.
More Skills