AI Coding Token Optimizer
БесплатноБез исполняемых скриптовНе проверенMake any repository cheap for an AI agent to work in. Measure the instruction file every session loads, cut it to the rules that bind every task, and move…
от asif2bd616 установок в других каталогахОб этом скилле
AI Coding Token Optimizer
Why the entry point matters most
A coding agent pays for context twice.
- Always-loaded context. Files such as
CLAUDE.mdandAGENTS.mdload in full at the start of every session. A 40 KB entry point costs about 10,000 tokens before the agent has read the task. - Rediscovery. The agent searches folders, opens unrelated files and rereads docs to find where a change belongs.
A map on its own only helps with the second cost. The larger, more certain saving is shrinking what loads every time. Keep only the rules that bind every task in the entry point, and put everything else one link away, in a router the agent opens when the task needs it.
The target shape
AGENTS.md / CLAUDE.md ≤ ~8 KB, always loaded: purpose, read-first, hard rules,
workflow, commands, reflexes, Project map + upkeep rule
docs/map/ task routers (tables), opened on demand
PRODUCT.md code area → its README router → its design doc
OPERATIONS.md ops task → guide → notes (see references/operations.md)
DOCS.md | PLAN.md | CONTENT.md question → the one document that answers it
src/README.md, app/README.md… one short router beside each code area; that area's
own rules (e.g. UI design rules) live here
docs/guides/… reference material moved out of the entry point, verbatim
The names are defaults, not requirements. Reuse an existing index that already does the job. A small project may need only a Project map section and one router. In a monorepo, each package gets its own entry point and routers, and a root router links to them.
Workflow: run all of it when asked to adopt, apply or refresh
Do not ask a setup questionnaire when the root is clear. Ask one focused question only if several unrelated roots are plausible. Work in the current repository, following its own branch and PR conventions.
1. Measure
- Record the byte size of what each host loads at session start, and report each host separately; never add them together. For Claude Code that is
CLAUDE.mdor.claude/CLAUDE.mdplus its@pathimports. For Codex it isAGENTS.md, which doesn't follow imports. Record nested instruction files the host auto-loads per area too. - Estimate tokens as bytes ÷ 4.
- Read those files fully, then inspect the real tree, existing indexes,
git statusand recent history. - Sample the source files needed to understand ownership. Use targeted searches, not bulk reads.
2. Sort the entry point
Label every section of the entry point as one of two kinds:
- Binds every task. It stays.
- What the project is.
- What to read first, and which document wins when two disagree.
- Hard rules and security rules.
- Branch, commit and PR workflow.
- Core commands.
- "When you are about to X, do Y" reflexes.
- The Project map section.
- Reference. It moves. For example:
- source trees and file-by-file lists
- environment-variable tables
- CI and workflow walkthroughs
- server, box and deploy layouts
- release checklists
- gotcha lists
- one area's style or design rules
- long examples and history
Move each reference section verbatim to the guide or router that owns its topic: an existing guide when one exists, otherwise a new docs/guides/<topic>.md or the area's README. Move, don't copy. If the owning guide already covers the topic, merge in only the facts it's missing. Appending the whole section creates a second copy that drifts; in one adoption it left a guide stating two different bundle sizes. When a moved section contradicts the guide it joins, check the code and keep the true one. Fix relative links for the new location. A rule stays in the entry point. Shorten its wording if you like, but never weaken it.
3. Write the routers
Write every router as a table. That is | Task | Where | Notes | in the maps, and | Folder or file | What lives there | Read before changing | in area READMEs.
- Keep each router to about 15–35 lines, with one row per real task and a relative link to the authoritative file.
- Describe what a file is for, checked against the code. Never guess from its name.
- Mark current source, historical notes, generated output and runtime data outside Git for what they are.
- Link across areas where ownership overlaps, and keep procedures in their home document.
- Never put a router inside a folder that ships to users. Examples are a WordPress plugin's
includes/, a package's publisheddist/, or anything a build copies into a release archive. Read the packaging config (.distignore,filesinpackage.json,MANIFEST.in, the build script) to see what ships, and route shipped areas fromdocs/map/instead. Add new agent files such asAGENTS.mdto the exclude list when packaging works by exclusion. - Give operations full coverage using [references/op
Установить AI Coding Token Optimizer в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл AI Coding Token Optimizer?
Make any repository cheap for an AI agent to work in. Measure the instruction file every session loads, cut it to the rules that bind every task, and move reference material behind short task routers (docs/map/ plus a README next to each code area) that agents open only when a task needs them. Use it when asked to adopt, apply or refresh this skill, or to "map", "optimize tokens" or "slim CLAUDE.md/AGENTS.md" in a project. Also offer it when an entry point grows past about 8 KB. For Codex, Claude Code, OpenClaw and any agent with file access. It edits documentation only, never application behaviour.
Как установить скилл AI Coding Token Optimizer?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл AI Coding Token Optimizer запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic