agentleFS
nilkanthdesai76nilkanthdesai76/universal-agent-skills/skills/token-optimizer/SKILL.md

token-optimizer

Skill0 starsChanged 58 days agoMITView on GitHub

Minimizes LLM token consumption and context bloat by enforcing codebase-first documentation lookups, targeted symbol searches, and surgical file slice viewing. Use on every coding and research task.

13 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use skill-creator.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • MicrosoftSkill

    skill-creator

    Guide for creating effective GitHub Copilot skills (.github/skills/) in this repository. Use when creating a new skill, updating an existing skill, or when asked about skill structure, format, or best practices for the vscode-documentdb project.

    Also in 5 projects that use this

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 10 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Before listing whole directories or grepping across hundreds of files, check if AGENTS.md or ARCHITECTURE.md exists in the repository root.

    line 14
  2. Very specific:

    Read the directory taxonomy in ARCHITECTURE.md to pinpoint the exact 1–2 files that contain the relevant logic.

    line 15
  3. Distinctive:

    Never load entire 500+ line files into context when checking a specific function or struct.

    line 18
  4. Very specific:

    Use targeted range reads (StartLine and EndLine) or grep for specific symbol signatures.

    line 19
  5. Distinctive:

    Run the project's fast test command (specified in AGENTS.md) rather than generating dozens of exploratory speculative code variations.

    line 26

“Common” is measured: kept by at least 6 in 10 of the 10 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Token Optimizer Skill

This skill teaches AI agents how to maximize reasoning quality while slashing token consumption by up to 80%.

Core Principles

  1. Manifest-First Traversal:
    • Before listing whole directories or grepping across hundreds of files, check if AGENTS.md or ARCHITECTURE.md exists in the repository root.
    • Read the directory taxonomy in ARCHITECTURE.md to pinpoint the exact 1–2 files that contain the relevant logic.
  2. Surgical Slice Reading:
    • Never load entire 500+ line files into context when checking a specific function or struct.
    • Use targeted range reads (StartLine and EndLine) or grep for specific symbol signatures.
  3. Incremental Patching:
    • Make precise diff edits rather than regenerating whole source files.
    • Preserves token budget for multi-step reasoning and deep verification.
  4. Verify Locally, Don't Guess:
    • Run the project's fast test command (specified in AGENTS.md) rather than generating dozens of exploratory speculative code variations.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.