claude-devtools: Command for Claude Code

.claude/commands/devtools/explain-visible-context.md

claude-devtools:explain-visible-context is a command for Claude Code from matt1398/claude-devtools. It costs 57 tokens per session (1,291 once invoked), scanned A, original, MIT.

A guide to “Visible Context,” the part of an AI assistant's context window whose token usage can be identified and measured by source.

In plain words
What is it for?
Use it when answering questions about token attribution, context-window usage, tracked context categories, or the display of visible context.
Why use it?
It helps explain where context space is being used, such as instructions, files, tool outputs, and other tracked categories, and what is not counted.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

This is matt1398/claude-devtools's own configuration. It tells Claude Code how to work on claude-devtools itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything claude-devtools configures →

About the project

claude-devtools is a visual debugging application that reads Claude Code's locally saved logs and session transcripts and presents their hidden details. Developers use it to inspect tool inputs and outputs, file activity, token usage, subagents, context consumption, and team coordination. The catalogue entries add commands, hooks, agents, instructions, and settings for the tool.

matt1398/claude-devtools · 3,994 stars · on GitHub · claude-dev.tools

Reuse

Borrowing it

Nothing to install: this file belongs to matt1398/claude-devtools. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/matt1398/claude-devtools/main/.claude/commands/devtools/explain-visible-context.md
Clone the repo
git clone --depth 1 https://github.com/matt1398/claude-devtools

Made for: Claude Code.

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 claude-devtools:explain-visible-context

README.md
[![agentmods](https://agentmods.dev/badge/commands/matt1398/claude-devtools/explain-visible-context/github.svg)](https://agentmods.dev/commands/matt1398/claude-devtools/explain-visible-context)
Your own site
<a href="https://agentmods.dev/commands/matt1398/claude-devtools/explain-visible-context"><img src="https://agentmods.dev/badge/commands/matt1398/claude-devtools/explain-visible-context/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 claude-devtools:explain-visible-context

Your own site · 80×15
<a href="https://agentmods.dev/commands/matt1398/claude-devtools/explain-visible-context"><img src="https://agentmods.dev/badge/commands/matt1398/claude-devtools/explain-visible-context.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,291 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.00057 $0.01291
Opus 5.5 $0.00023 $0.00516
Sonnet 5.5 $0.00011 $0.00258
Haiku 4.5 $0.00006 $0.00129

Measured 1mo ago against content hash 712e127aad10, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

claude-devtools:explain-visible-context 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 1mo 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.

.claude/commands/devtools/explain-visible-context.md · 105 lines

How it starts

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

Present the following explanation directly to the user. Output the full content below as your response — do not summarize, ask follow-up questions, or treat this as background context.

Visible Context

What It Is

"Visible Context" is the portion of Claude's context window that we can identify and measure. Every time Claude processes a turn, its context window fills with various pieces of information — your messages, file contents, tool outputs, thinking, and more. Visible Context tracks what we can attribute to a known source, so you can see where your tokens are going.

What We Track (6 Categories)

CLAUDE.md Files

Memory files that Claude loads automatically at the start of every session and after each compaction. These include:

  • Global CLAUDE.md (~/.claude/CLAUDE.md) — your personal instructions across all projects
  • Project CLAUDE.md (.claude/CLAUDE.md or CLAUDE.md at project root) — project-specific instructions
  • Directory CLAUDE.md — instructions scoped to subdirectories (e.g., src/renderer/CLAUDE.md)

These are injected repeatedly (once per compaction phase), so their token cost accumulates. A 500-token CLAUDE.md file injected across 3 compaction phases costs ~1,500 tokens total.

@-Mentioned Files

Files you reference with @path/to/file in your messages. When you mention a file, Claude Code injects the full file contents into the context. Large files consume significant tokens — a 1,000-line source file could use 5,000+ tokens per mention.

Tool Outputs

Results returned from tool executions: file reads (Read), command output (Bash), search results (Grep, Glob), and others. Every tool result stays in the context window until compaction. A Bash command that prints 500 lines of output or a Read of a large file both count here.

Thinking + Text Output

Claude's own output that consumes context:

  • Extended thinking — Claude's internal reasoning (when thinking mode is active). This can be substantial for complex tasks.
  • Text output — Claude's visible responses to you. Longer explanations and code blocks use more tokens.

Read the full file on GitHub · 105 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. 1mo ago First seen · 105 lines · 57 tokens per session scan A 712e127aad10

Subscribe to this mod's changes

claude-devtools:explain-visible-context is a command published in the GitHub repository matt1398/claude-devtools (3,994 stars, last pushed 1mo ago), licensed MIT. It adds 57 tokens to every session and 1,291 once invoked, about $0.0002 per session on Opus 5.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.