Ctxprof — Development skill for Claude Code
Profile Claude Code JSONL sessions into six estimated token buckets, compare runs, and identify large context consumers.
How to install Ctxprof
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open SuperMarioYL/ctxprof and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Ctxprof does
Profile Claude Code JSONL sessions into six estimated token buckets, compare runs, and identify large context consumers.
Alternatives in Development
- Ideal Customer Profile — Identify ICP with demographics, behaviors, and JTBD 7.8k ★
- Om Standup — Morning kickoff 4.6k ★
- Claude Supermemory — Persistent memory across sessions and projects using Supermemory 2.3k ★
README
[简体中文](./README.zh-CN.md) · [Website](https://ctxprof.lei6393.com) · [GitHub](https://github.com/SuperMarioYL/ctxprof)
ctxprof
**See what occupies your context window.**
ctxprof reads Claude Code session logs and attributes recorded usage to system, skill, MCP, file, reasoning and output buckets.
Why use it
An aggregate usage number cannot tell you which loaded content deserves attention. A ranked allocation helps you inspect the largest consumers and compare sessions before changing your workflow.
- Six useful buckets — Inspect system, skills, MCP, files, reasoning and output.
- Separate peak from throughput — Cached prefixes are not treated as fresh window capacity on every turn.
- Compare before trimming — Trend and compare operate on explicit session files.
Architecture
The parser reads JSONL turns, a vendored byte-level BPE weights individual blocks, and reconciliation scales those weights to recorded usage. Attribution groups the result into six buckets. The renderer separates peak single-turn window occupancy from cumulative throughput.
| Component | Responsibility |
|---|---|
| `S |
Related Skills
Analyze Patterns
Analyze ~/.claude/tool_logs/operations.jsonl operation logs to identify repeated patterns across sessions and
Context Mem Status
Show session status — estimated token usage, session duration, observation count, and session chain
ClaudeTokenSAP
⚡ Claude Code plugin to reduce token usage by up to 70% with smart compression for logs, JSON, and large conte
Trim Context
Find and fix sources of Claude Code "token bloat" in a repo — oversized CLAUDE.md (vs the 40k-char limit), blo
Checkpoint
Use before ending a session or when context is getting large. Saves decision rationale for future sessions.
Offline Telemetry Script
Offline analyzer for Claude Code session transcripts (~/.claude/projects/.jsonl). Pure-stdlib Python, no API c
Related Agents
Stats Analyzer
Analyzes ~/.claude/stats-cache.json and history.jsonl to produce a concise usage report with model token break
Context Memory Manager
Context Window & Token Optimization Specialist. Manages token budgets, compresses prompts (RTK/Caveman), imple
Context Optimizer
Meta utility agent for token and context optimization. Spawn when needing to compress agent prompts, optimize