agentleFS
EswarSkEswarSk/token-lean/skills/token-efficiency/SKILL.md

token-efficiency

Skill1 starsChanged 5 months agoMITView on GitHub

This skill should be used when the user asks to "save tokens", "reduce cost", "be token efficient", "token diet", "optimize context", "keep it lean", "minimize tokens", or when starting long sessions on large codebases where context and cost efficiency matter.

9 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

12 rules. 0 are common, 10 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 9 edited versions we read keep these.

  • 10

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Never read a whole file when a targeted read works.

    line 18
  2. Distinctive:

    Never re-read a file already in context unless it changed.

    line 19
  3. Very specific:

    Prefer Glob/Grep over find, grep -r, or exploratory ls chains.

    line 20
  4. Very specific:

    Use terse command flags by default: git status --porcelain -b, git log --oneline -15, git diff --stat (then targeted diffs), ls -1, pytest …

    line 21
  5. Distinctive:

    When context grows stale or bloated, recommend compacting early — before quality degrades, not after.

    line 24
  6. Distinctive:

    Before writing any code, climb this ladder and stop at the first rung that works:

    line 28
  7. Distinctive:

    Does it already exist in the codebase?: Search first. Reuse or extend the existing function/pattern.

    line 31
  8. Distinctive:

    Can it be one line, or a few?: Write the least code that solves the stated problem — no speculative parameters, no "flexibility" nobody …

    line 33
  9. Distinctive:

    Only then write new code — and make it small.

    line 34
  10. Distinctive:

    No preamble, no recap, no "Great question", no restating the task.

    line 40
  11. Distinctive:

    Do not narrate tool calls or explain each step.

    line 42
  12. Distinctive:

    No summaries of what was just done when the diff/file speaks for itself — one sentence max.

    line 43

“Common” is measured: kept by at least 6 in 10 of the 9 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 Efficiency

Operate in maximum token efficiency mode. Every token read, written, or spoken must earn its place. Three pillars, applied in this order: read less, write less, say less.

Pillar 1: Read Less (context hygiene)

  • Never read a whole file when a targeted read works. Use Grep to locate, then Read with offset/limit on the matching region.
  • Never re-read a file already in context unless it changed. Trust what was read.
  • Prefer Glob/Grep over find, grep -r, or exploratory ls chains.
  • Use terse command flags by default: git status --porcelain -b, git log --oneline -15, git diff --stat (then targeted diffs), ls -1, pytest -q.
  • Pipe potentially long output through filters: | head -50, | grep <pattern>, | tail -20. Never dump raw logs, full test output, or dependency trees into context.
  • For broad exploration ("where is X handled?"), delegate to the scout subagent so search noise stays out of the main context; only the conclusion returns.
  • When context grows stale or bloated, recommend compacting early — before quality degrades, not after.

Pillar 2: Write Less (minimal-code decision ladder)

Before writing any code, climb this ladder and stop at the first rung that works:

  1. Does this need to exist at all? Question the requirement. Sometimes deleting code or config is the fix.
  2. Does it already exist in the codebase? Search first. Reuse or extend the existing function/pattern.
  3. Does the standard library or a native platform feature cover it? No new dependency, no new abstraction.
  4. Can it be one line, or a few? Write the least code that solves the stated problem — no speculative parameters, no "flexibility" nobody asked for, no wrapper classes around single functions.
  5. Only then write new code — and make it small.

Corollaries: no dead code "for later", no duplicated logic, no boilerplate comments, no restating types in docstrings. Fewer lines means fewer output tokens now and less context to re-read later.

Pillar 3: Say Less (terse output)

  • No preamble, no recap, no "Great question", no restating the task.
  • Answer first. Detail only if asked.
  • Do not narrate tool calls or explain each step. Show the result.
  • No summaries of what was just done when the diff/file speaks for itself — one sentence max.
  • Match answer length to question weight: one-line question, one-line answer.

Escalation and routing

  • Route grunt work (log scans, file summaries, repo-wide searches) to the scout subagent — it runs on a cheaper model and returns only conclusions.
  • Reserve the most capable model for architecture and hard multi-file debugging.
  • Vague tasks burn tokens exploring. If the task is ambiguous enough to force a repo-wide hunt, ask one precise clarifying question instead — a question costs less than a wrong exploration.

For rationale, measured savings, and extended patterns, read references/playbook.md.

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.