Agent skill

Token Efficiency

by HHU3637kr in HHU3637kr/skills

Cross-platform token audit and optimization for AI coding agents (Cursor, Codex, Claude Code, Hermes, Windsurf, Cline, OpenClaw, Gemini CLI, Aider).

Apache-2.0Auto-check passedAgent Workflows

Install Token Efficiency

skills CLI
$ npx skills add HHU3637kr/skills --skill token-efficiency -a claude-code

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

GitHub CLI
$ gh skill install HHU3637kr/skills token-efficiency --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/HHU3637kr/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/token-efficiency .claude/skills/token-efficiency && 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-efficiency
GitHub stars
145
Token cost
~842 tokens
SKILL.md length
226 words
Files
57 (incl. scripts, references)
Skills in repo
37
Repo updated
First seen
Licence
Apache-2.0

At a glance

Cross-platform token audit and optimization for AI coding agents (Cursor, Codex, Claude Code, Hermes, Windsurf, Cline, OpenClaw, Gemini CLI, Aider).

  • Works in 4 steps: AUDIT — scripts/audit.py → fixed tax +… → FIX L0 — MCP prune, skill on-demand,… → FIX L1/L2/L3 — scripts/install.py →… → …
  • Reduce API cost
  • SKILL.md covers 学员 / 讲师, Quick commands, Workflow and Six layers, plus 3 more sections
  • Calls python3 and bash

What it does

Token Efficiency is an agent skill from HHU3637kr/skills. Cross-platform token audit and optimization for AI coding agents (Cursor, Codex, Claude Code, Hermes, Windsurf, Cline, OpenClaw, Gemini CLI, Aider). Scans always-on context, MCP tools, skills; ranks ROI fixes; installs L0-L3 rules; shrinks large tool outputs. Use for save tokens, token audit, context bloat, MCP prune, reduce API cost, agent efficiency, payload shrink.

Its SKILL.md is about 840 tokens, which your agent loads only when the skill is triggered. The skill folder holds 60 other files, including scripts and reference files (for example `AGENT_INSTALL.md`, `README.md` and `START_HERE.md`).

It sits in Agent Workflows, covering MCP servers. It works with Model Context Protocol. The licence is Apache-2.0.

When your agent uses it

  • Reduce API cost
  • Agent efficiency

Example prompts

  • “/token-efficiency”

Requirements

  • Python 3

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. AUDIT — scripts/audit.py → fixed tax + duplicates + ROI fixes
  2. FIX L0 — MCP prune, skill on-demand, compress, dedup
  3. FIX L1/L2/L3 — scripts/install.py → behavior + payload + output + capability guardrails
  4. VERIFY — scripts/perf.py --compare-baseline or re-run audit

What it can do on your machine

Read from SKILL.md and the folder at commit a2cccf6. 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

    Ships 1 file in scripts/, which the agent can run.

    Shell commands in SKILL.md call:

    • python3
    • bash

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

  • Network

    No URLs in SKILL.md.

    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 Efficiency loads about 842 tokens when it runs, and up to ~1.8k if it reads all its reference files. Until then it costs about 97 tokens; SKILL.md has 226 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~97
When it runs · the whole SKILL.md, loaded when a task matches
~842
With references · SKILL.md plus every file in references/, read only if the agent opens them
~1.8k

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); the scripts in this folder are not scanned.

SKILL.md

The full file from HHU3637kr/skills at commit a2cccf6, republished under its Apache-2.0 licence (© HHU3637kr). 226 words, ~842 tokens.

Download SKILL.mdSave it as .claude/skills/token-efficiency/SKILL.md (or your agent's skills folder). This skill also uses 56 other files; get the full folder from GitHub.
name
token-efficiency
description
Cross-platform token audit and optimization for AI coding agents (Cursor, Codex, Claude Code, Hermes, Windsurf, Cline, OpenClaw, Gemini CLI, Aider). Scans always-on context, MCP tools, skills; ranks ROI fixes; installs L0-L3 rules; shrinks large tool outputs. Use for save tokens, token audit, context bloat, MCP prune, reduce API cost, agent efficiency, payload shrink.
disable-model-invocation
true

Token Efficiency v0.3.1

Prime directive: Audit before adding rules. Rules are fixed tax too.

Capability promise: Save waste, not intelligence. Guardrails ship with every rule install.

学员 / 讲师

bash
# 讲师打包
python3 scripts/package_release.py   # → dist/token-efficiency-0.3.1.zip

# 学员解压后
bash install.sh
python3 scripts/setup_student.py

文档:docs/学员安装指南.md · docs/能力保障说明.md · docs/架构说明.md

Quick commands

bash
# Install skill globally (once)
bash install.sh
# or: python3 scripts/install_skill.py --write

# Audit + optional ledger
python3 scripts/audit.py --project . --with-ledger

# Fix auto-invoke skills (L0)
python3 scripts/fix_skills.py --list
python3 scripts/fix_skills.py --write --keep skill-a,skill-b

# Compress bloated CLAUDE.md (L0)
python3 scripts/compress.py CLAUDE.md --write

# Shrink large tool output (L2)
python3 scripts/shrink.py build.log --vault -o build.log.shrunk

# Before/after savings report
python3 scripts/perf.py --save-baseline
python3 scripts/perf.py --compare-baseline

# Install rules to project
python3 scripts/install.py --write --agents cursor,claude-code,hermes,openclaw,codex --levers 1,2,3

Windows: replace python3 with python or py -3.

Workflow

  1. AUDIT — scripts/audit.py → fixed tax + duplicates + ROI fixes
  2. FIX L0 — MCP prune, skill on-demand, compress, dedup
  3. FIX L1/L2/L3 — scripts/install.py → behavior + payload + output + capability guardrails
  4. VERIFY — scripts/perf.py --compare-baseline or re-run audit

Six layers

LLayerFix tool
L0Fixed taxaudit, compress, MCP edit
L1Turn multiplierinstall lever 1
L2Context inflationinstall lever 2 + shrink.py (+ vault restore)
L3Output wasteinstall lever 3
L4Session bloatnew chat / Ask mode — see context-design
L5Model mismatchuser picks tier — see context-design

Details: taxonomy.md

Supported agents

cursor · claude-code · codex · hermes · openclaw · windsurf · cline · aider · continue · gemini · generic

Matrix: references/agent-matrix.md

References

Agent execution rules (when this skill is active)

  • Run audit before proposing new always-on rules
  • Present top 3 ROI fixes with layer tags
  • One lever at a time unless user asks batch
  • Never let efficiency block correct task completion — see capability-guardrails.md
  • Use shrink.py with --vault for tool output > ~4K est. tokens; restore if detail missing
  • Honor user overrides: 详细解释 / explore freely / run tests / 看完整日志
  • Never claim exact dollar savings without user's pricing data

© HHU3637kr, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 56 other files (scripts, references) in token-efficiency of HHU3637kr/skills.

  • SKILL.md
  • .gitignore
  • AGENT_INSTALL.md
  • LICENSE
  • README.md
  • START_HERE.md
  • VERSION
  • adapters/claude-code/AGENTS-behavior.snippet.md
  • adapters/claude-code/AGENTS-output.snippet.md
  • adapters/claude-code/CLAUDE.snippet.md
  • adapters/claude-code/README.md
  • adapters/codex/README.md
  • adapters/codex/SKILL.snippet.md
  • adapters/cursor/token-efficiency-behavior.mdc
  • adapters/cursor/token-efficiency-context.mdc
  • adapters/cursor/token-efficiency-output.mdc
  • adapters/generic
  • … and 40 more

Open the folder on GitHubat commit a2cccf6

Compare with similar skills

Token Efficiency 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 Efficiency compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Token Efficiency this skillHHU3637kr/skills145—~842Automated safety check: PassApache-2.0
MCP Server Builderanthropics/skills180k64 repos~2.3kAutomated safety check: PassApache-2.0
MCP Server BuildershareAI-lab/learn-claude-code78k5 repos~1.2kAutomated safety check: PassMIT
MCP Integration for Pluginsanthropics/claude-plugins-official38k11 repos~3.1kAutomated safety check: PassApache-2.0
Fastmcp Client CLIPrefectHQ/fastmcp28k1 repos~823Automated safety check: PassApache-2.0
Crush Configurationcharmbracelet/crush29k—~3.7kAutomated safety check: PassCustom licence

Similar skills

  • MCP Server Builder

    anthropics/skills

    Official

    Guides the design and implementation of Model Context Protocol servers in TypeScript or Python, from tool naming and error messages to evaluation.

    180k GitHub starsUsed in 64 repos~2.3k tokens
    Agent WorkflowsAuto-check passed
  • MCP Server Builder

    shareAI-lab/learn-claude-code

    Walks through building MCP servers in Python or TypeScript that expose tools, resources and prompts to Claude, with templates, registration and testing.

    78k GitHub starsUsed in 5 repos~1.2k tokens
    Agent WorkflowsAuto-check passed
  • MCP Integration for Plugins

    anthropics/claude-plugins-official

    Official

    Explains how to bundle Model Context Protocol servers in a Claude Code plugin, covering config files, stdio, SSE, HTTP and WebSocket server types, and authentication.

    38k GitHub starsUsed in 11 repos~3.1k tokens
    Agent WorkflowsAuto-check passed
  • Fastmcp Client CLI

    PrefectHQ/fastmcp

    Query and invoke tools on MCP servers using fastmcp list and fastmcp call.

    28k GitHub starsUsed in 1 repo~823 tokens
    Agent WorkflowsAuto-check passed
  • Crush Configuration

    charmbracelet/crush

    Explains how to configure the Crush coding agent with crushrc or crush.json, covering providers, models, LSPs, MCP servers, hooks, permissions and config precedence.

    29k GitHub stars~3.7k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Context Mode Output Sandbox

    mksglu/context-mode

    Routes large command, file, API and browser output through context-mode tools so only the needed result enters the agent's context, instead of dumping it via Bash.

    26k GitHub stars~4.1k tokensUpdated today
    Agent WorkflowsAuto-check passed

More from HHU3637kr/skills

All 37 skills in this repo
  • Gif Sticker Maker

    HHU3637kr/skills

    Convert photos (people, pets, objects, logos) into 4 animated GIF stickers with captions.

    145 GitHub starsUsed in 4 repos~1.3k tokens
    Auto-check passed
  • Agent Browser

    HHU3637kr/skills

    Headless browser automation for AI agents using agent-browser CLI.

    145 GitHub stars~1.9k tokensUpdated 15 days ago
    Auto-check passed
  • Darwin Skill

    HHU3637kr/skills

    Darwin Skill (达尔文.skill): autonomous skill optimizer inspired by Karpathy's autoresearch.

    145 GitHub starsUsed in 1 repo~2.2k tokens
    Auto-check passed
  • Guizang Ppt Skill

    HHU3637kr/skills

    生成横向翻页网页 PPT(单 HTML 文件),含 WebGL 背景、章节幕封、数据大字报、图片网格等模板。提供两种风格:① "电子杂志 × 电子墨水"(衬线 + 流体背景 + 暖色) ② "瑞士国际主义"(无衬线 + 网格点阵 + IKB/柠檬黄/柠檬绿/安全橙高亮)。当用户需要制作分享 / 演讲 / 发布会风格的网页 PPT,或提到"杂志风 PPT"、"瑞士风 PPT"、"Swiss…

    145 GitHub starsUsed in 1 repo~4.7k tokens
    Auto-check passed
  • Huashu Nuwa

    HHU3637kr/skills

    女娲造人:输入人名/主题/甚至只是模糊需求,自动深度调研→思维框架提炼→生成可运行的人物Skill. An agent skill from HHU3637kr/skills.

    145 GitHub starsUsed in 1 repo~4k tokens
    Auto-check passed
  • Fullstack Dev

    HHU3637kr/skills

    Full-stack backend architecture and frontend-backend integration guide.

    145 GitHub starsUsed in 3 repos~8.6k tokens
    Auto-check: notes

Categories

Questions about Token Efficiency

What does Token Efficiency do?

Cross-platform token audit and optimization for AI coding agents (Cursor, Codex, Claude Code, Hermes, Windsurf, Cline, OpenClaw, Gemini CLI, Aider). Token Efficiency is an agent skill from HHU3637kr/skills. Cross-platform token audit and optimization for AI coding agents (Cursor, Codex, Claude Code, Hermes, Windsurf, Cline, OpenClaw, Gemini CLI, Aider).

When should I use Token Efficiency?

Token Efficiency fits situations like: reduce API cost; agent efficiency.

How do I install Token Efficiency in Claude Code?

Run `npx skills add HHU3637kr/skills --skill token-efficiency -a claude-code`. Or copy the skill folder (token-efficiency in HHU3637kr/skills) into .claude/skills/token-efficiency in your project. Claude Code loads it when a task matches its description.

How do I install Token Efficiency in Codex?

Run `npx skills add HHU3637kr/skills --skill token-efficiency -a codex`. Or copy the skill folder (token-efficiency in HHU3637kr/skills) into .agents/skills/token-efficiency in your project. Codex loads it when a task matches its description.

Can I use Token Efficiency 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 HHU3637kr/skills --skill token-efficiency -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-efficiency, .gemini/skills/token-efficiency, .github/skills/token-efficiency and .opencode/skills/token-efficiency in your project.

What does Token Efficiency need to run?

Going by SKILL.md and its folder, Token Efficiency needs the command-line tools its instructions call (python3 and bash). Our summary lists: Python 3.

Does Token Efficiency access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Token Efficiency 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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Token Efficiency use?

Token Efficiency is published under the Apache-2.0 licence (from the LICENSE file in the skill folder). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Token Efficiency use?

About 842 tokens (SKILL.md is roughly 3.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 954 tokens, read only when the agent opens those files.

What are the alternatives to Token Efficiency?

Skills that share tags, products or a category with Token Efficiency: MCP Server Builder (anthropics/skills, 180k stars), MCP Server Builder (shareAI-lab/learn-claude-code, 78k stars), MCP Integration for Plugins (anthropics/claude-plugins-official, 38k stars) and Fastmcp Client CLI (PrefectHQ/fastmcp, 28k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Token Efficiency?

HHU3637kr (a GitHub user) maintains it in HHU3637kr/skills, which has 145 GitHub stars. The repository holds 37 skills in this directory. The repository was last updated on September 23, 2026.

Source: HHU3637kr/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.