context-budget

context-budget is a skill for Claude Code, Codex from tellmefrankie/news-engine. It costs 0 tokens per session (1,079 once invoked), scanned A, original, MIT.

A context-usage tracker for long coding-agent sessions. It estimates how much of the model's conversation window has been used and what consumed it.

In plain words
What is it for?
Checking used and remaining context, seeing the usage percentage, identifying large context consumers, and deciding what information to trim or checkpoint.
Why use it?
It warns when the session may run out of working memory before the task is finished. This helps decide when to summarise and start a fresh session.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument; mentions Claude Code.

Good fit Checking used and remaining context, seeing the usage percentage, identifying large context consumers, and deciding what information to trim or checkpoint.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tellmefrankie/news-engine/context-budget
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add tellmefrankie/news-engine --skill context-budget
Clone the repo
git clone --depth 1 https://github.com/tellmefrankie/news-engine

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for context-budget

README.md
[![agentmods](https://agentmods.dev/badge/skills/tellmefrankie/news-engine/context-budget/github.svg)](https://agentmods.dev/skills/tellmefrankie/news-engine/context-budget)
Your own site
<a href="https://agentmods.dev/skills/tellmefrankie/news-engine/context-budget"><img src="https://agentmods.dev/badge/skills/tellmefrankie/news-engine/context-budget/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for context-budget

Your own site · 80×15
<a href="https://agentmods.dev/skills/tellmefrankie/news-engine/context-budget"><img src="https://agentmods.dev/badge/skills/tellmefrankie/news-engine/context-budget.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,079 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01079
Opus 5 $0.00000 $0.00540
Sonnet 5 $0.00000 $0.00216
Haiku 4.5 $0.00000 $0.00108

Measured 11d ago against content hash 44c7e9dd7a64, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

context-budget scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/context-budget/SKILL.md · 134 lines

How it starts

The opening of the file, as written. The whole thing — 134 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Context Budget Tracker

Know how much context window you have left before Claude loses memory mid-task. Stop getting surprised by truncation on long coding sessions.

The problem

You are 90 minutes into a refactor. Claude has read 15 files, written 400 lines, discussed 3 design decisions. Then it starts forgetting things from the beginning of the conversation. You did not know you were near the limit. Now you are.

This skill tracks your context budget and warns you before it runs out.

What it does

  • Estimates tokens used so far in the current session
  • Shows remaining budget as a percentage
  • Recommends when to checkpoint (summarize + start fresh)
  • Identifies which parts of context are most expensive (large file reads, long outputs)
  • Suggests what to prune if you need to extend the session

Usage

Check my context budget.
Estimate tokens used in this session.
Show: used, remaining, percentage, biggest consumers.
Warn me if I am past 70%.

Example Output

Context Budget — Current Session

Model: claude-opus-4-6 (200k token window)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

USAGE ESTIMATE
  Used:       142,000 tokens  (71%)
  Remaining:   58,000 tokens  (29%)
  Status:     YELLOW — consider checkpointing soon

TOP CONSUMERS
  src/options/analyzer.ts     ~18,000 tokens  (full file read x2)
  src/db/schema.ts            ~12,000 tokens  (full file read)
  Conversation history        ~45,000 tokens  (90 messages)
  Code outputs generated      ~38,000 tokens  (4 large code blocks)
  Tool results                ~29,000 tokens  (15 Bash + 8 Read calls)

RECOMMENDATIONS
  You have ~2-3 more large file reads before hitting 90%.

  If you need to continue this session:
  → Ask me to summarize decisions made so far (saves ~30k tokens)
  → Avoid re-reading files already discussed

  If starting fresh:
  → I can write a CHECKPOINT.md with full context to paste into next session

Checkpoint mode

When you are near the limit, this skill can generate a CHECKPOINT.md:

Read the full file on GitHub · 134 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 134 lines · 0 tokens per session scan A 44c7e9dd7a64

Subscribe to this mod's changes

context-budget is a skill published in the GitHub repository tellmefrankie/news-engine (1 stars, last pushed 4mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,079 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

mem0-tour

Browses all stored memories grouped by category with full content display. Use when reviewing all project memories, exploring stored knowledge, onboarding to a project, or getting an overview of captured decisions, conventions, and learnings.

mem0ai/mem0 · 47 tokens

mem0-vercel-ai-sdk

Mem0 provider for Vercel AI SDK (@mem0/vercel-ai-provider). TRIGGER when: user mentions "vercel ai sdk", "@mem0/vercel-ai-provider", "createMem0", "retrieveMemories", "addMemories", "getMemories", "searchMemories", "mem0 vercel", "AI SDK provider", "AI SDK memory", or is using generateText/streamText with mem0. Also…

mem0ai/mem0 · 146 tokens

pause

Pause Mem0 memory capture on this machine. Use when the user wants to stop memories being recorded, for example for private work or experiments.

mem0ai/mem0 · 30 tokens

mine

Mine a project or conversation into your MemPalace — extract and store memories for later retrieval.

MemPalace/mempalace · 21 tokens

agent-carnet

Use this skill when the user asks to save, recall, find, or organize notes. Triggers on: 'remember this', 'save this', 'note this', 'what did we discuss about...', 'check the notebook', 'find in carnet'. Also use proactively when discovering findings worth preserving across sessions.

yamadashy/repomix · 67 tokens

mem0-oss-to-platform

Plan and then execute a migration of a project from the mem0 open-source / self-hosted SDK (the local Memory class) to the mem0 Platform / hosted / managed SDK (the MemoryClient class). Use this whenever a developer wants to move, switch, or migrate their mem0 usage off OSS/self-hosted to the hosted API — e.g.…

mem0ai/mem0 · 273 tokens