Skip to content

Token saving

Usage limits depend on how much text goes through the model. agent-skills keeps that small in five ways. The numbers below were measured on real projects by the agent-skills authors.

Load on demand

An agent keeps only each skill's name and description in context. The full SKILL.md loads when the skill runs, and reference files only when a step needs them. Every SKILL.md is at most 110 lines, and a check in CI enforces it.

Scripts do the mechanical work

Fetching, parsing, counting and filtering are done by scripts that print only what the model needs. Sizes are in bytes, and four bytes are roughly one token.

Scrollable table

Raw input compared with script output, in bytes
TaskRaw inputScript outputSaved
Lighthouse report455,53475499.8%
Test log of 86 passing tests27,0988699.7%
npm audit --json on a 300-package app20,5552,12690%
git log -60 to learn the commit style7,41573990%
GitHub issue and comments8,1781,01888%
SQL log of one request with an N+14,20449088%
package.json to find test and lint commands2,12227587%

Fetching a task again prints only new comments and changed fields. Failing test runs print the failing blocks with file:line and a summary, never the full log.

Ask before expensive actions

A screenshot costs about 1,000 to 2,000 tokens, so browser-check asks first and captures only the changed element. Local Lighthouse, full test suites and load tests are proposed, not run silently.

Sessions that restart cheaply

STATE.md, about 30 lines long, holds the goal, what was done, changed files, check results, decisions and one concrete next step. After a stage, clear the session and resume from the file. It is cheaper and more precise than dragging a long transcript along.

Working rules

The token-saver skill gives every agent the same habits:

  • Search before reading, and read line ranges.
  • Never open lockfiles or build output.
  • Use short command forms, such as git status --short.
  • Edit instead of rewriting.
  • Put results first in answers.
  • Use subagents with narrow briefs for wide searches.

Keep reading

Search this site

Arrows move through the results, Enter opens one, Esc closes. Ctrl K /