Agent skill

Token Optimizer

by alexgreensh in alexgreensh/token-optimizer

Audit your OpenClaw setup for token waste, context bloat, and cost optimization opportunities

Custom licenceAuto-check passedAI & LLM Engineering

Install Token Optimizer

skills CLI
$ npx skills add alexgreensh/token-optimizer --skill token-optimizer -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install alexgreensh/token-optimizer token-optimizer --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ 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-src

Use ~/.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/

Facts

Skill name
token-optimizer
GitHub stars
2.5k
Token cost
~481 tokens
SKILL.md length
263 words
Files
1
Skills in repo
6
Repo updated
First seen
Licence
Custom licence

At a glance

Audit your OpenClaw setup for token waste, context bloat, and cost optimization opportunities

  • Works in 4 steps: Detect + Scan → Audit → Coaching → …
  • Tasks that involve LLM cost and token optimization
  • SKILL.md covers Workflow and Rules
  • Calls npx

What it does

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.

When your agent uses it

  • Tasks that involve LLM cost and token optimization

Example prompts

  • “/token-optimizer”

Requirements

  • Node.js

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Detect + Scan
  2. Audit
  3. Coaching
  4. Actionable Fixes

What it can do on your machine

Read from SKILL.md and the folder at commit 7c05b70. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    Shell commands in SKILL.md call:

    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    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.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

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.

Always · name and description, kept in context so the agent knows when to use it
~27
When it runs · the whole SKILL.md, loaded when a task matches
~481

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.

Safety

Auto-check passed

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.

SKILL.md

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.”

— opening of SKILL.md by alexgreensh, Custom licence
name
token-optimizer

Read the full SKILL.md on GitHub

Files

Just SKILL.md in openclaw/skills/token-optimizer of alexgreensh/token-optimizer.

Open the folder on GitHubat commit 7c05b70

Compare with similar skills

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.

Token Optimizer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Token Optimizer this skillalexgreensh/token-optimizer2.5k—~481Automated safety check: PassCustom licence
Context Compressionguanyang/open-agent-hub9772 repos~4.6kAutomated safety check: PassMIT
Context Auditundefined-ui/second-brain-os1k—~802Automated safety check: PassMIT
Analyzing Claude Code Sessionsamd/gaia1.6k—~2.3kAutomated safety check: PassMIT
Cco Budgetegorfedorov/claude-context-optimizer114—~808Automated safety check: PassMIT
Cost Trackerrohitg00/pro-workflow2.9k—~814Automated safety check: PassNone

Similar skills

  • 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…

    977 GitHub starsUsed in 2 repos~4.6k tokens
    AI & LLM EngineeringAuto-check passed
  • Context Audit

    undefined-ui/second-brain-os

    Audit an agent's context layout against the four places: system prompt, tools, history, tail.

    1k GitHub stars~802 tokensUpdated 2 days ago
    AI & LLM EngineeringAuto-check passed
  • 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.

    1.6k GitHub stars~2.3k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Cco Budget

    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)

    114 GitHub stars~808 tokensUpdated 10 days ago
    AI & LLM EngineeringAuto-check passed
  • Cost Tracker

    rohitg00/pro-workflow

    Track session costs, set budget alerts, and optimize token spend.

    2.9k GitHub stars~814 tokensUpdated 10 days ago
    AI & LLM EngineeringAuto-check passed
  • Openrouter Context Optimization

    jeremylongshore/tons-of-skills-marketplace

    Optimize context window usage for OpenRouter models to reduce cost and improve quality.

    2.8k GitHub stars~2.4k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed

More from alexgreensh/token-optimizer

  • Token Optimizer

    alexgreensh/token-optimizer

    Audit a Claude Code or Codex setup for context-window waste, then fix it and measure the savings.

    2.5k GitHub stars~3.6k tokensUpdated yesterday
    Auto-check passed
  • Resume Checkpoint

    alexgreensh/token-optimizer

    Pull a prior session's checkpoint on demand when the user is continuing prior work.

    2.5k GitHub stars~826 tokensUpdated yesterday
    Auto-check passed
  • Token Coach

    alexgreensh/token-optimizer

    Plan a token-efficient Claude Code or Codex setup, or get a quick health check.

    2.5k GitHub stars~3.2k tokensUpdated yesterday
    Auto-check passed
  • Fleet Auditor

    alexgreensh/token-optimizer

    Cross-system agent token/cost audit (Claude Code, Codex, OpenClaw, Hermes, OpenCode): idle burns, model misrouting, config bloat, with dollar savings.

    2.5k GitHub stars~1.7k tokensUpdated yesterday
    Auto-check passed
  • Token Dashboard

    alexgreensh/token-optimizer

    Open the Token Optimizer dashboard in your browser (context usage, quality, savings).

    2.5k GitHub stars~946 tokensUpdated yesterday
    Auto-check passed

Questions about Token Optimizer

What does Token Optimizer do?

Audit your OpenClaw setup for token waste, context bloat, and cost optimization opportunities. Token Optimizer is an agent skill from alexgreensh/token-optimizer.

When should I use Token Optimizer?

Token Optimizer fits situations like: tasks that involve LLM cost and token optimization.

How do I install Token Optimizer in Claude Code?

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.

How do I install Token Optimizer in Codex?

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.

Can I use Token Optimizer in Cursor, Gemini CLI or GitHub Copilot?

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.

What does Token Optimizer need to run?

Going by SKILL.md and its folder, Token Optimizer needs the command-line tools its instructions call (npx). Our summary lists: Node.js.

Does Token Optimizer access the network?

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.

Is Token Optimizer safe to install?

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.

What licence does Token Optimizer use?

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.

How many tokens does Token Optimizer use?

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.

What are the alternatives to Token Optimizer?

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.

Who maintains Token Optimizer?

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.