Token conservation

From athola/claude-night-market · View interactive version

Token conservation is an AI agent skill from the GitHub repository athola/claude-night-market. Enforces token quota management at session start with conservation and compression checks. Use at the start of every session or before large context loads.

How to use this skill

Skill file

Token Conservation Workflow

When To Use

When NOT To Use

Required Progress Items

  1. token-conservation:quota-check
  2. token-conservation:context-plan
  3. token-conservation:delegation-check
  4. token-conservation:compression-review
  5. token-conservation:logging

Step 1 – Quota Check (`quota-check`)

Note the 5-hour rolling cap and weekly cap highlighted in the Claude community notice.

Step 2 – Context Plan (`context-plan`)

and each content-mode Grep as one read. Glob and files-with-matches Grep are free.

imports/interfaces, then stop and start writing.

self-authorize additional reads. Only explicit user approval overrides the budget.

A Read targeting <50 lines counts as 0.5 reads. Avoid cat/sed/awk via Bash:

Claude Code 2.1.21+ steers toward native file tools (Read, Edit, Write, Grep, Glob).

instead of loading entire documents. Large PDFs (>10 pages) return a lightweight

reference when @-mentioned, so use the pages parameter to read specific sections.

Hard limits: 100 pages max, 20MB max per PDF. Exceeding these previously locked

sessions permanently (fixed in 2.1.31).

info hits the model.

source at all. modules/source-selection.md sorts claims into those

worth citing (versions, performance, security, APIs, pricing) and

those that are not, with the token cost of each approach.

Step 3 – Delegation Check (`delegation-check`)

tooling (use qwen-delegation skill if needed).

of LLM reasoning when possible.

Step 4 – Compression Review (`compression-review`)

Remove redundant history, collapse logs, and avoid reposting identical code.

when the model has already processed the information (cite snippet IDs).

via the message selector to partially summarize the conversation. This preserves

recent context while compressing older portions

instruct the user to run /new

prompt them to run /compact before continuing

memories automatically. This adds minor token overhead but improves cross-session

continuity. No action needed: be aware it contributes to baseline context usage.

Step 5 – Logging (`logging`)

Document the conservation tactics that were applied and note the remaining

token budget. If the budget is low, explicitly warn the user and propose secondary

plans. Record any recommendations made regarding the use of /new or /compact,

or justify why neither was necessary, to inform future context-handling decisions.

Output Expectations

tokens (otherwise state that no reset/compaction is needed yet).

Exit Criteria

quota-check, context-plan, delegation-check,

compression-review, logging

the task type (spec/bug/refactor/exploration) and max-reads

limit recorded

"budget low") and includes an explicit /new or /compact

recommendation, or a justification for why neither is needed

exhausted without explicit user approval in the same session

the output carries a citation or an uncertainty marker, per

modules/source-selection.md

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.