context-usage

A session diagnostic that estimates how many tokens, or units of text used by an AI model, were consumed by shell and connected-service tool calls.

In plain words
What is it for?
Use it to review tool-call context usage when a session feels slow or responses seem to be using too much context.
Why use it?
It shows where the conversation context is being spent and which tokens may be recoverable. The supplied instructions also warn that this older skill is deprecated and point to its replacement.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/fending/context-engineering/context-usage
Any agent
npx skills add fending/context-engineering --skill context-usage
Clone the repo
git clone --depth 1 https://github.com/fending/context-engineering

Made for: Claude Code, Codex.

Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,754 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00042 $0.01754
Opus 5 $0.00021 $0.00877
Sonnet 5 $0.00008 $0.00351
Haiku 4.5 $0.00004 $0.00175

Measured 2d ago against content hash d84147eb022a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

context-usage 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 2d 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.

plugins/context-setup/skills/context-usage/SKILL.md · 138 lines

How it starts

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

DEPRECATION NOTICE: You are running context-setup from fending/context-engineering, which is no longer maintained. The active version is at ordovera/ordovera-plugins. To migrate, run:

  1. /plugin marketplace add ordovera/ordovera-plugins
  2. /plugin install context-setup@ordovera-plugins

Then remove the old marketplace: /plugin marketplace remove context-engineering

Print this notice to the user before proceeding with the skill.

Context Usage

Quick diagnostic of how tool calls in the current session are consuming context. Run mid-session when responses feel slow or you suspect token waste.

What This Skill Does

Review visible conversation history and report on Bash and MCP tool calls from the current session. This is a lightweight observation -- no file changes, no recommendations, just a summary of what happened and where context went. Focuses on Bash and MCP calls because they produce the most variable output; Read/Grep/Glob calls are generally predictable in size.

1. Session Tool Call Summary

Count visible Bash and MCP tool calls and estimate token consumption:

  • Total Bash calls in visible history
  • Total MCP tool calls in visible history (tools prefixed with mcp__)
  • Estimated total tokens consumed by all tool output (approximate at ~3 tokens per line of output)
  • Commands or tool calls that produced more than ~50 lines of output (flag as verbose)
  • Commands or tool calls that were run more than once with the same or similar invocation (flag as repeated)
  • Commands that already use concise flags or pipes (acknowledge as concise)

2. Verbose Output Report

For each Bash command or MCP tool call that produced notably verbose output, report:

  • The command or tool call (including key parameters)
  • Approximate output size (line count from what's visible)
  • Whether a concise variant is known:
    • For Bash: based on common tools (vitest, pytest, eslint, cargo, ruff, tsc, docker compose)
    • For MCP: whether the call used default parameters when known optimization knobs exist (e.g., gmail_search_messages without maxResults, list_deployments without since/until, searchJiraIssuesUsingJql without fields)

Read the full file on GitHub · 138 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. 2d ago First seen · 138 lines · 42 tokens per session scan A d84147eb022a

Subscribe to this mod's changes

context-usage is a skill published in the GitHub repository fending/context-engineering (11 stars, last pushed 5mo ago), licensed MIT. It adds 42 tokens to every session and 1,754 once invoked, about $0.0002 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-30.

Related

Other skills, from other repositories

ccc

This skill should be used when code search is needed (whether explicitly requested or as part of completing a task), when indexing the codebase after changes, or when the user asks about ccc, cocoindex-code, or the codebase index. Trigger phrases include 'search the codebase', 'find code related to', 'update the…

cocoindex-io/cocoindex-code · 80 tokens

feature-flags-audit

Audit and inventory all feature flags declared in the Packmind codebase. Use when the user asks to list, audit, review, or inventory feature flags, asks which flags are active, wants to know what a flag gates, or asks which flags are opened to a given domain/user. Produces a synthetic markdown table with each flag…

PackmindHub/packmind · 93 tokens

packmind-create-standard

Guide for creating coding standards via the Packmind CLI. This skill should be used when users want to create a new coding standard (or add rules to an existing standard) that captures team conventions, best practices, or coding guidelines for distribution to GitLab Duo.

PackmindHub/packmind · 57 tokens

create-run-e2e-tests

Guide for writing and running new Playwright end-to-end tests in the apps/e2e-tests/ directory of the Packmind monorepo. Use this skill whenever you add or modify a spec that drives the real frontend and API — for example testing a user flow, a new page/route, a feature behind a flag, or a UI behavior end-to-end.…

PackmindHub/packmind · 175 tokens

working-with-pm-design-kit

This skill provides guidance for using the Packmind UI component library (@packmind/ui). It should be used when building or modifying frontend UI with PM-prefixed components, working with Chakra UI in the Packmind codebase, or when questions arise about available components, theming, or layout patterns. Triggers on…

PackmindHub/packmind · 91 tokens

packmind-onboard

Complete automated onboarding: analyzes codebase, creates package, and generates standards & commands via CLI. Automatic package creation when none exist, user selection when packages are available.

PackmindHub/packmind · 38 tokens