Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By sarins-labv2.4.2In 1 marketplace
A plugin for analyzing and optimizing coding sessions, providing cost tracking, session logs, turn-gate analysis, and actionable insights to improve performance and reduce costs.
Run automatically on Claude Code events. Claude doesn't decide.
1 caution to review before installing
A hook runs when Claude writes or edits files
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
A Claude Code plugin that analyses your actual session transcripts (JSONL) to surface real token costs, waste patterns, and week-over-week improvement trends — no manual tracking required.
cost_summary
Actual token usage from JSONL transcripts, broken out by session, date, and grand total.
days, default 30)project slug or across all projectsWhen to use: "How many tokens did we use this week?" / "Which session was most expensive?"
cost_trend
Week-over-week comparison of token usage and waste metrics.
✓ Token usage down 18% / ✗ Redundant reads up 12%weeks, default 2)When to use: "How much cost optimization did we achieve?" / "Are we improving week over week?"
suggest_optimizations
Analyses transcripts and returns prioritised actionable suggestions.
When to use: "What are the biggest waste patterns?" / "What should I fix first?"
file_read_analysis
Deep-dive on file read behaviour across sessions.
When to use: "Which files am I re-reading unnecessarily?" / "Is the redundant read problem getting better?"
top_repeated_tasks
Finds recurring task patterns across sessions using bigram clustering on human messages.
When to use: "What work keeps coming back?" / "What should we automate or template?"
summarise
Pure-computation before/after health report against the last time summarise was called. No LLM involved — all classification is rule-based with a 5% change threshold.
IMPROVINGMOSTLY_IMPROVINGMIXEDMOSTLY_DECLININGDECLININGBASELINE_SET~/.claude/cost-analysis-state.json — survives across sessionsFirst call captures the baseline and returns
BASELINE_SET. Subsequent calls compare against it.
All other tools (cost_summary, suggest_optimizations, file_read_analysis) also emit a vsLastRun field showing key deltas from their own previous call — same state file, per-tool snapshots.
When to use: "Are things better or worse than last time?" / End-of-week retrospective.
reset
Clears all persisted plugin state so every tool starts fresh.
target: "all" (default) — clears both baselines and read trackertarget: "baselines" — clears only vsLastRun snapshots for all tools and summarisetarget: "tracker" — clears only the session read tracker used by the PreToolUse:Read hookWhen to use: Beginning of a new sprint/week, after a major workflow change, or when summarise baselines are stale.
The plugin registers a UserPromptSubmit hook that fires whenever your message contains cost/token/efficiency keywords:
costtokenoptimspendusageefficienhow muchwasteredundantcache hitsession logwhat did weIt injects a reminder to use the plugin tools before reading manual files.
macOS / Linux:
curl -fsSL https://raw.githubusercontent.com/sarins-lab/code-optimization-plugin/main/install.sh | sh
Windows (PowerShell):
irm https://raw.githubusercontent.com/sarins-lab/code-optimization-plugin/main/install.ps1 | iex
Both scripts automatically update ~/.claude/settings.json with the marketplace entry, enable the plugin, and wire the cost-keyword reminder hook. Restart Claude Code after running.
Add to ~/.claude/settings.json:
npx claudepluginhub sarins-lab/code-optimization-plugin --plugin code-optimization-pluginBuilt from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
Plugins from other owners that cover similar ground