MCPInstall
athola avatar

token-conservation

Enforces token quota management at session start with conservation and compression checks. Use at the start of every session or before large context loads.

Installs
118
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/athola/claude-night-market --skill token-conservation
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads token-conservation automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Token Conservation Workflow

When To Use

  • Run at the start of every session and whenever prompt sizes or tool calls begin to spike.
  • Mandatory before launching long-running analyses, wide diffs, or massive context loads.

When NOT To Use

  • Context-optimization already handles the scenario
  • Simple queries with minimal context

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)

  • Record current session duration and weekly usage (from /status or notebook). Note the 5-hour rolling cap and weekly cap highlighted in the Claude community notice.
  • Capture remaining budget and set a max token target for this task.

Step 2 – Context Plan (context-plan)

  • Set a discovery read budget BEFORE reading any files. Count each Read call and each content-mode Grep as one read. Glob and files-with-matches Grep are free.

    • Implement from spec/requirements: max 8 reads
    • Bug fix at known location: max 5 reads
    • Refactor with known scope: max 1 read per file being changed
    • Open exploration: max 15 reads
  • Read order (most valuable first): spec/requirements, files to modify, imports/interfaces, then stop and start writing.

  • When budget is spent: ask the user if more context is needed. Do NOT self-authorize additional reads. Only explicit user approval overrides the budget.

  • Prefer Read with offset/limit params or Grep tool over loading whole files. 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).

  • PDFs (Claude Code 2.1.30+): Use Read with pages: "1-5" for targeted PDF reading 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).

  • Convert prose instructions into bullet lists before prompting so only essential info hits the model.

  • Before a web search or fetch, decide whether the claim needs a 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)

  • Evaluate whether compute-intensive tasks can go to Qwen MCP or other external tooling (use qwen-delegation skill if needed).
  • For local work, favor deterministic scripts (formatters, analyzers) instead of LLM reasoning when possible.

Step 4 – Compression Review (compression-review)

  • Summarize prior steps/results before adding new context. Remove redundant history, collapse logs, and avoid reposting identical code.
  • Use prompt caching ideas: reference prior outputs instead of restating them when the model has already processed the information (cite snippet IDs).
  • Decide whether the current thread should be compacted:
    • If only recent context is stale, use "Summarize from here" (Claude Code 2.1.32+) via the message selector to partially summarize the conversation. This preserves recent context while compressing older portions
    • If the active workflow is finished and earlier context will not be reused, instruct the user to run /new
    • If progress requires the existing thread but the window is bloated, prompt them to run /compact before continuing
  • Automatic memory (Claude Code 2.1.32+): Claude now records and recalls session 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

  • A short explanation of token-saving steps, delegated tasks, and remaining runway.
  • Concrete next-action list that keeps the conversation lean (e.g.):
    • "next turn: provide only failing test output lines 40-60"
  • Explicit reminder about /new or /compact whenever you determine it would save tokens (otherwise state that no reset/compaction is needed yet).

Exit Criteria

  • All 5 progress items created and checked off in order: quota-check, context-plan, delegation-check, compression-review, logging
  • Discovery read budget set before the first Read call, with the task type (spec/bug/refactor/exploration) and max-reads limit recorded
  • Output summary states the remaining token runway (or warns "budget low") and includes an explicit /new or /compact recommendation, or a justification for why neither is needed
  • No additional file reads taken after the read budget is exhausted without explicit user approval in the same session
  • Every version, performance, security, API or pricing claim in the output carries a citation or an uncertainty marker, per modules/source-selection.md

FAQ

What does the token-conservation skill do?

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 do I install token-conservation?

Run npx skills add https://github.com/athola/claude-night-market --skill token-conservation in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/token-conservation/ (personal) or .claude/skills/token-conservation/ (project).

Which AI agents can use token-conservation?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is token-conservation safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains token-conservation?

It is published by athola in athola/claude-night-market. It has 118 recorded installs.

More from athola/claude-night-market

View all →
athola avatar

project-planning

athola/claude-night-market

Converts a specification into a phased, dependency-ordered implementation plan. Use after specification is complete and before execution begins.

athola avatar

code-quality-principles

athola/claude-night-market

Applies KISS, YAGNI, and SOLID principles for clean code with reduced complexity. Use when refactoring or reviewing code for over-engineering.

athola avatar

slop-detector

athola/claude-night-market

Detects AI-generated writing patterns in prose. Use when reviewing docs for slop, vague language, or identity leaks before publishing.

Docs & Writing183 installs
athola avatar

bloat-detector

athola/claude-night-market

Detects codebase bloat via dead code, duplication, complexity, and doc bloat scans. Use when codebase feels large or before a release.

athola avatar

doc-generator

athola/claude-night-market

Generates or remediates documentation with human-quality writing. Use when creating new docs, rewriting AI-generated content, or applying style profiles.

Docs & Writing162 installs
athola avatar

project-brainstorming

athola/claude-night-market

Guides project ideation via Socratic questioning to produce a validated brief. Use before specification when requirements are unclear.

161 installs

Popular other skills

View category →
heygen-com avatar

hyperframes-cli

heygen-com/hyperframes

The HyperFrames CLI by job - scaffold, check, look at frames, edit the timeline, preview, render locally or in the cloud, publish, project history - plus reading its JSON and recovering from build or render failures.

1.7M installs
mattpocock avatar

triage

mattpocock/skills

Move issues and external PRs through a state machine of triage roles, categorise, verify, grill if needed, and write agent-ready briefs.

1.1M installs
mattpocock avatar

ask-matt

mattpocock/skills

Ask which skill or flow fits your situation. A router over the skills in this repo.

871.6K installs
mattpocock avatar

to-questionnaire

mattpocock/skills

Turn a decision you can't fully answer into a questionnaire for someone else to fill in.

599.8K installs
mattpocock avatar

wait-what

mattpocock/skills

Stop. That last message did not land: re-pitch it.

551.2K installs
mattpocock avatar

loop-me

mattpocock/skills

Grill me about specs for the workflows I want to build, within this workspace.

514.8K installs