Context Compression
guanyang/open-agent-hub
This skill should be used when long-running agent sessions need context compression, structured summarization, compaction, token-per-task optimization, or durable handoff summaries that preserve…
Audit your OpenClaw setup for token waste, context bloat, and cost optimization opportunities
$ npx skills add alexgreensh/token-optimizer --skill token-optimizer -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install alexgreensh/token-optimizer token-optimizer --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/alexgreensh/token-optimizer.git skills-src && mkdir -p .claude/skills && cp -r skills-src/openclaw/skills/token-optimizer .claude/skills/token-optimizer && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "token-optimizer" agent skill from https://github.com/alexgreensh/token-optimizer/tree/main/openclaw/skills/token-optimizer into .claude/skills/token-optimizer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "token-optimizer", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/alexgreensh/token-optimizer/tree/main/openclaw/skills/token-optimizerType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add alexgreensh/token-optimizer --skill token-optimizer -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install alexgreensh/token-optimizer token-optimizer --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/alexgreensh/token-optimizer.git skills-src && mkdir -p .agents/skills && cp -r skills-src/openclaw/skills/token-optimizer .agents/skills/token-optimizer && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "token-optimizer" agent skill from https://github.com/alexgreensh/token-optimizer/tree/main/openclaw/skills/token-optimizer into .agents/skills/token-optimizer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "token-optimizer", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add alexgreensh/token-optimizer --skill token-optimizer -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install alexgreensh/token-optimizer token-optimizer --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/alexgreensh/token-optimizer.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/openclaw/skills/token-optimizer .cursor/skills/token-optimizer && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "token-optimizer" agent skill from https://github.com/alexgreensh/token-optimizer/tree/main/openclaw/skills/token-optimizer into .cursor/skills/token-optimizer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "token-optimizer", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/alexgreensh/token-optimizer.git --path openclaw/skills/token-optimizer--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add alexgreensh/token-optimizer --skill token-optimizer -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install alexgreensh/token-optimizer token-optimizer --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/alexgreensh/token-optimizer.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/openclaw/skills/token-optimizer .gemini/skills/token-optimizer && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "token-optimizer" agent skill from https://github.com/alexgreensh/token-optimizer/tree/main/openclaw/skills/token-optimizer into .gemini/skills/token-optimizer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "token-optimizer", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install alexgreensh/token-optimizer token-optimizerInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add alexgreensh/token-optimizer --skill token-optimizer -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/alexgreensh/token-optimizer.git skills-src && mkdir -p .github/skills && cp -r skills-src/openclaw/skills/token-optimizer .github/skills/token-optimizer && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "token-optimizer" agent skill from https://github.com/alexgreensh/token-optimizer/tree/main/openclaw/skills/token-optimizer into .github/skills/token-optimizer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "token-optimizer", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add alexgreensh/token-optimizer --skill token-optimizer -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install alexgreensh/token-optimizer token-optimizer --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/alexgreensh/token-optimizer.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/openclaw/skills/token-optimizer .opencode/skills/token-optimizer && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "token-optimizer" agent skill from https://github.com/alexgreensh/token-optimizer/tree/main/openclaw/skills/token-optimizer into .opencode/skills/token-optimizer/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "token-optimizer", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
token-optimizerAudit your OpenClaw setup for token waste, context bloat, and cost optimization opportunities
Token Optimizer is an agent skill from alexgreensh/token-optimizer. Audit your OpenClaw setup for token waste, context bloat, and cost optimization opportunities
Its SKILL.md is about 480 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in AI & LLM Engineering, covering LLM cost and token optimization. The repository describes itself as: Find the ghost tokens. Fix them. Survive compaction. Avoid context quality decay.
4 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 7c05b70. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
npxFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use npx, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Token Optimizer loads about 481 tokens when it runs. Until then it costs about 27 tokens; SKILL.md has 263 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 263 words (~481 tokens).
“You are a token optimization expert. Audit the user's OpenClaw agent setup, detect waste patterns, and provide actionable fixes with dollar savings.”
Just SKILL.md in openclaw/skills/token-optimizer of alexgreensh/token-optimizer.
Open the folder on GitHubat commit 7c05b70
Token Optimizer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Token Optimizer this skillalexgreensh/token-optimizer | 2.5k | — | ~481 | Automated safety check: Pass | Custom licence | |
| Context Compressionguanyang/open-agent-hub | 977 | 2 repos | ~4.6k | Automated safety check: Pass | MIT | |
| Context Auditundefined-ui/second-brain-os | 1k | — | ~802 | Automated safety check: Pass | MIT | |
| Analyzing Claude Code Sessionsamd/gaia | 1.6k | — | ~2.3k | Automated safety check: Pass | MIT | |
| Cco Budgetegorfedorov/claude-context-optimizer | 114 | — | ~808 | Automated safety check: Pass | MIT | |
| Cost Trackerrohitg00/pro-workflow | 2.9k | — | ~814 | Automated safety check: Pass | None |
guanyang/open-agent-hub
This skill should be used when long-running agent sessions need context compression, structured summarization, compaction, token-per-task optimization, or durable handoff summaries that preserve…
undefined-ui/second-brain-os
Audit an agent's context layout against the four places: system prompt, tools, history, tail.
amd/gaia
Mines local Claude Code session transcripts with a deterministic Python pipeline to show what the agent is actually used for, how often it fails and what it costs.
egorfedorov/claude-context-optimizer
Configure token budget limits, auto-compact settings, and view current budget status (model-aware — Claude 5 lineup, Opus 5.5 default fallback, full 1M context at standard price)
rohitg00/pro-workflow
Track session costs, set budget alerts, and optimize token spend.
jeremylongshore/tons-of-skills-marketplace
Optimize context window usage for OpenRouter models to reduce cost and improve quality.
alexgreensh/token-optimizer
Audit a Claude Code or Codex setup for context-window waste, then fix it and measure the savings.
alexgreensh/token-optimizer
Pull a prior session's checkpoint on demand when the user is continuing prior work.
alexgreensh/token-optimizer
Plan a token-efficient Claude Code or Codex setup, or get a quick health check.
alexgreensh/token-optimizer
Cross-system agent token/cost audit (Claude Code, Codex, OpenClaw, Hermes, OpenCode): idle burns, model misrouting, config bloat, with dollar savings.
alexgreensh/token-optimizer
Open the Token Optimizer dashboard in your browser (context usage, quality, savings).
Categories
Audit your OpenClaw setup for token waste, context bloat, and cost optimization opportunities. Token Optimizer is an agent skill from alexgreensh/token-optimizer.
Token Optimizer fits situations like: tasks that involve LLM cost and token optimization.
Run `npx skills add alexgreensh/token-optimizer --skill token-optimizer -a claude-code`. Or copy the skill folder (openclaw/skills/token-optimizer in alexgreensh/token-optimizer) into .claude/skills/token-optimizer in your project. Claude Code loads it when a task matches its description.
Run `npx skills add alexgreensh/token-optimizer --skill token-optimizer -a codex`. Or copy the skill folder (openclaw/skills/token-optimizer in alexgreensh/token-optimizer) into .agents/skills/token-optimizer in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add alexgreensh/token-optimizer --skill token-optimizer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/token-optimizer, .gemini/skills/token-optimizer, .github/skills/token-optimizer and .opencode/skills/token-optimizer in your project.
Going by SKILL.md and its folder, Token Optimizer needs the command-line tools its instructions call (npx). Our summary lists: Node.js.
SKILL.md contains no URLs. Its commands use npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Token Optimizer has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.
About 481 tokens (SKILL.md is roughly 1.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Token Optimizer: Context Compression (guanyang/open-agent-hub, 977 stars), Context Audit (undefined-ui/second-brain-os, 1k stars), Analyzing Claude Code Sessions (amd/gaia, 1.6k stars) and Cco Budget (egorfedorov/claude-context-optimizer, 114 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
alexgreensh (a GitHub user) maintains it in alexgreensh/token-optimizer, which has 2,520 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on October 8, 2026.
Source: alexgreensh/token-optimizer on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.