No slash command · from sparkjoy
Generates a report of sparkjoy's context compaction activity across Claude Code sessions, showing verdicts, context savings, and costs in a self-contained HTML page.
Ships in sparkjoy. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Run the report script. It reads the user's transcripts in ~/.claude/projects (or
$CLAUDE_CONFIG_DIR/projects), writes a self-contained HTML page to the temp
directory, prints a few lines of summary and the page's path, and opens the page:
SPARKJOY_DATA="${CLAUDE_PLUGIN_DATA}" uv run --script --locked "${CLAUDE_PLUGIN_ROOT}/model/report.py" --figures
With --figures it also saves the floors sparkjoy asks from and the figures its
question's threshold takes, such as the context after a compaction and the
tokens a request adds, fitted to the same sessions, to figures.json in
sparkjoy's data folder, where it also reads sparkjoy's log. From the next turn end, the plugin uses them
in place of its defaults, except for a floor the user set in sparkjoy's
settings.
It covers the last 14 days. When the user names another window, pass it as
--since and --until, each an ISO date or time, read as local time unless it
carries an offset. Pass --no-open where no browser can open the page, such as
on a remote machine, and give the user the path.
It needs uv, which fetches Python and numpy on first use. If uv is missing,
point the user to https://docs.astral.sh/uv/ to install it. The script reads
every transcript modified in the window at low priority, which takes about half
a minute for two weeks of heavy use, and longer for a longer window.
Reply with the summary it printed and the page's path. Both open on the result: the context the sessions kept past where Claude Code's 400K default compacts, and what they cost against that default and against keeping the full window; or, where sparkjoy made no compaction, such as on a first run, what compacting from the floors fitted to the same sessions would have saved; or why it had nothing to do. The page then shows:
/sparkjoy bug.The savings come from replaying each session's logged requests with sparkjoy's compactions where it made them and without them, at list prices for the session's model, so they are estimates. As the sessions ran, Claude Code's own compactions stay where they ran. Without sparkjoy's, Claude Code compacts on its own near the full 1M window, which the headline compares against, and after any request from about 367k at its 400K default, which the line after it compares against. On a subscription the same tokens count against usage limits rather than a bill. The page leaves out sessions that Claude Code compacted before 200k, as it does in a 200k context window, since sparkjoy acts only in sessions with a 1M window, and says so.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
2 skills in this plugin
npx claudepluginhub max-sixty/sparkjoy --plugin sparkjoy