agentleFS
Arnie016Arnie016/codex-prompt-templates/skills/low-token-context/SKILL.md

low-token-context

Skill3 starsChanged 6 months agoMITView on GitHub

Build compact Codex task context and avoid token blowups. Use when work spans large repos, repeated sessions, long logs, many files, expensive models, or the user mentions limits, context, tokens, compression, summaries, or keeping Codex fast.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    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:

    Run a compact repo snapshot when the repo is unfamiliar: scripts/repo_snapshot.sh <repo>.

    line 16
  2. Very specific:

    Search first with rg, git diff, package manifests, and exact symbols.

    line 20
  3. Distinctive:

    Read only the files needed to state:

    line 21
  4. Distinctive:

    Write or update a small task brief if the work will continue across turns.

    line 26
  5. Distinctive:

    Stop exploring once new files are repeating facts.

    line 43
  6. Very specific:

    Read references/low-token-patterns.md for budgets and anti-patterns.

    line 48

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “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

Low-Token Context

Goal: get enough evidence to act without loading the whole project.

Workflow

  1. Run a compact repo snapshot when the repo is unfamiliar: scripts/repo_snapshot.sh <repo>.
  2. Estimate heavy files before reading broadly: scripts/token_budget.sh <repo>.
  3. Search first with rg, git diff, package manifests, and exact symbols.
  4. Read only the files needed to state:
    • edit surface
    • invariants
    • verification command
    • known risks
  5. Write or update a small task brief if the work will continue across turns.

Task Brief Contract

# Task Brief
## Goal
## Relevant Files
## Current Behavior
## Required Change
## Constraints
## Verification
## Open Risks

Stop Rules

  • Stop exploring once new files are repeating facts.
  • Summarize command output instead of pasting logs.
  • Store durable project facts in markdown memory; do not repeat them in every prompt.
  • For codebase graph tools, request exact symbols or files rather than broad "explain everything" queries.

Read references/low-token-patterns.md for budgets and anti-patterns.

Validation

  • Context includes the goal, edit surface, constraints, verification, and risks.
  • Large logs or broad file reads are summarized instead of pasted.
  • Durable facts are written to memory/wiki only when they will help future sessions.

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.