context-budget

context-budget is a skill for Claude Code from AfterRealm/father-time. It costs 64 tokens per session (975 once invoked), scanned A, original, MIT.

A rough estimate of how many tokens—units used to measure text in an AI context—reading a file or directory would consume.

In plain words
What is it for?
Estimating token counts from file size, comparing older and newer model estimates, and assessing the likely context impact of reading files or directories.
Why use it?
It helps you judge whether something is too large to read within your available context before opening it.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: positional $N argument.

Part of the father-time plugin — 9 skills, 1 agent, 2 hooks shipped together

Good fit Estimating token counts from file size, comparing older and newer model estimates, and assessing the likely context impact of reading files or directories.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/afterrealm/father-time/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 AfterRealm/father-time --skill context-budget
Clone the repo
git clone --depth 1 https://github.com/AfterRealm/father-time

Made for: Claude Code.

Or install father-time, the plugin that ships this one along with the rest of its 9 skills, 1 agent, 2 hooks.

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/afterrealm/father-time/context-budget/github.svg)](https://agentmods.dev/skills/afterrealm/father-time/context-budget)
Your own site
<a href="https://agentmods.dev/skills/afterrealm/father-time/context-budget"><img src="https://agentmods.dev/badge/skills/afterrealm/father-time/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/afterrealm/father-time/context-budget"><img src="https://agentmods.dev/badge/skills/afterrealm/father-time/context-budget.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 64 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 975 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.00064 $0.00975
Opus 5 $0.00032 $0.00487
Sonnet 5 $0.00013 $0.00195
Haiku 4.5 $0.00006 $0.00097

Measured 9d ago against content hash 93b8bf4e195e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, 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 9d 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 · 81 lines

How it starts

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

Context Budget — Token Estimation

Estimate how many tokens a file or directory will consume before reading it.

How to Estimate

Rule of thumb: 1 token ≈ 4 characters (English text/code). This is a rough estimate.

Opus 4.7 tokenizer note: Opus 4.7 uses a new tokenizer that can produce up to 35% more tokens for the same text vs. prior models. If the user is on Opus 4.7, multiply the rough estimate by ~1.35 for a conservative upper bound. Opus 4.6, Sonnet 4.6, and Haiku 4.5 use the older tokenizer.

When the user asks about a file or directory:

  1. Get the file size in bytes using:
wc -c < "filepath"

Or for a directory:

find "dirpath" -type f -exec wc -c {} + | tail -1
  1. Estimate tokens: file_size_bytes / 4 (add ~35% headroom if they're on Opus 4.7)

  2. Show the estimate with context AND model comparison:

File: path/to/file.py
Size: 12,400 bytes
Est. tokens: ~3,100 (~4,200 on Opus 4.7)
Context impact: 0.3% of 1M window

Cost to read (first time / cached):
  Opus 4.7: $0.016 / $0.002
  Opus 4.6: $0.016 / $0.002
  Sonnet 4.6: $0.009 / $0.001
  Haiku 4.5: $0.003 / $0.0003

Use these prices per 1M tokens for the comparison:

Model Input Cache Read Cache Write (5m) Output
Opus 4.7 $5.00 $0.50 $6.25 $25.00
Opus 4.6 $5.00 $0.50 $6.25 $25.00
Sonnet 4.6 $3.00 $0.30 $3.75 $15.00
Haiku 4.5 $1.00 $0.10 $1.25 $5.00

Opus 4.7 and 4.6 share the same per-token pricing. The 1M-context variants (claude-opus-4-7[1m], claude-opus-4-6[1m], claude-sonnet-4-6[1m]) are also at standard pricing — no long-context premium.

  • "First time" = input price (first read, not yet cached)
  • "Cached" = cache read price (subsequent reads in same session)
  • Always show all four models so users can compare

For directories, also show file count and breakdown of largest files.

Context Impact Table

Tokens % of 1M % of 200K Verdict
< 1K 0.1% 0.5% Trivial
1-5K 0.1-0.5% 0.5-2.5% Light
5-20K 0.5-2% 2.5-10% Moderate
20-50K 2-5% 10-25% Heavy — consider reading specific sections
50K+ 5%+ 25%+ Very heavy — read only what you need

Read the full file on GitHub · 81 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. 9d ago First seen · 81 lines · 64 tokens per session scan A 93b8bf4e195e

Subscribe to this mod's changes

context-budget is a skill published in the GitHub repository AfterRealm/father-time (6 stars, last pushed 4mo ago), licensed MIT. It adds 64 tokens to every session and 975 once invoked, about $0.0003 per session on Opus 5. 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.