audit-session-metrics
Skill2.7k starsChanged 6 months agoMITView on GitHub
Audit a session-metrics JSON export for token-usage waste and produce a plain-English findings report. Trigger when the user runs /audit-session-metrics, when session-metrics suggests an audit after an HTML export, or when the user asks to audit / review / find waste in a saved session-metrics JSON. Two modes: "quick" (ratios + cache health + top expensive turns/sessions) and "detailed" (adds CLAUDE.md / settings / re-read scan). Supports session, project, and instance JSON scopes. Args: $ARGUMENTS[0] = quick|detailed, $ARGUMENTS[1] = path to a session-metrics JSON export.
Trending
Quiet since October.about the whole repository
Who's talking about centminmod/my-claude-code-setup
- @georgesl.bsky.social“Claude Code created images using my ai-image-creator Skill that leverages Google Gemini Nano Banana 2, Flux …”Bluesky · Mar 31, 2026 · 4 likes
- @georgesl.bsky.social“Claude Code + using GLM 4.7 Pro coding plan with Claude Code Github Actions for auto reviewing pull …”Bluesky · Jan 19, 2026 · 4 likes
- @georgesl.bsky.social“Updated my Claude Code statusline.sh script and starter Github template repo github.com/centminmod/m... …”Bluesky · Jan 13, 2026 · 4 likes
- @georgesl.bsky.social“Updated my Claude Code custom slash commands with /secure-prompts to detect prompt injections and malicious …”Bluesky · Jul 18, 2025 · 4 likes
- @georgesl.bsky.social“Updated my Claude Code ai-image-creator SKILL to my Claude Code starter template GitHub repo at …”Bluesky · Mar 25, 2026 · 3 likes
The biggest 5 of 56 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 56
Talked about on Bluesky, GitHub and Hacker News (56 times).
On Bluesky · 50
- Mar 31, 2026Claude Code created images using my ai-image-creator Skill that leverages Google Gemini Nano Banana 2, Flux 2, Riverflow V2 Pro, Bytedance… — @georgesl.bsky.social4 likes and reposts · 1 reply
- Jan 19, 2026Claude Code + using GLM 4.7 Pro coding plan with Claude Code Github Actions for auto reviewing pull requests. How to configure GLM 4.7 for… — @georgesl.bsky.social4 likes and reposts
- Jan 13, 2026Updated my Claude Code statusline.sh script and starter Github template repo github.com/centminmod/m... with new Claude Code 2.1.6 status… — @georgesl.bsky.social4 likes and reposts
- Jul 18, 2025Updated my Claude Code custom slash commands with /secure-prompts to detect prompt injections and malicious payloads in prompts… — @georgesl.bsky.social4 likes and reposts · 1 reply
- Mar 25, 2026Updated my Claude Code ai-image-creator SKILL to my Claude Code starter template GitHub repo at github.com/centminmod/m... so Claude can… — @georgesl.bsky.social3 likes and reposts · 2 replies
45 more on Bluesky
- Mar 1, 2026OpenAI ChatGPT users migrating to Claude Code might find my Claude Code starter template repo useful - currently at over 1900+ GitHub stars… — @georgesl.bsky.social3 likes and reposts · 1 reply
- Jan 24, 2026Been supplementing my Claude Code Max $100 plan usage with a heavily discounted ZAI GLM Coding Pro plan $10.80/month… — @georgesl.bsky.social3 likes and reposts · 1 reply
- Jan 23, 2026Coincidentally, I was watching Theo's YouTube video while using Claude Code with my Claude Skill, consult-codex to have Opus 4.5 and… — @georgesl.bsky.social3 likes and reposts
- Jan 21, 2026Compared on same GitHub repo Claude Code GitHub Action + GLM 4.7 pull request vs Kilo Code Reviews with OpenAI GPT-5.2-codex, Claude Code… — @georgesl.bsky.social3 likes and reposts
- Jan 16, 2026ZAI GLM 4.7 coding plan has heavy discount offers that stack - 10% off invite code + 60% yearly plan discount. Invite code and guide to… — @georgesl.bsky.socialsays it tested it3 likes and reposts
- Aug 18, 2025My Claude Code starter template repo is quite popular - now approaching 900 GitHub stars soon with CLAUDE.md, hooks, subagents and custom… — @georgesl.bsky.social3 likes and reposts
- Jul 28, 2025Created new Claude Code code-search subagent with its own separate context from main context in my Claude Code starter template repo at… — @georgesl.bsky.social3 likes and reposts
- Jul 25, 2025Claude Code /ccusage-daily slash command parsing and analysing ccusage metrics github.com/centminmod/m... 🤓 #claudecode #claude #ai — @georgesl.bsky.social3 likes and reposts
- Jul 25, 2025Claude Code /ccusage-daily slash command parsing and analysing ccusage metrics github.com/centminmod/m... 🤓 #claudecode #claude #ai — @georgesl.bsky.social3 likes and reposts · 1 reply
- Jul 19, 2025If we are borrowing each others prompts, might want to check them first. Updated my Claude Code custom slash commands with /secure-prompts… — @georgesl.bsky.social3 likes and reposts
- Jul 16, 2025My Claude Code /refactor-code slash prompt is nailing large Python files code refactoring and breaking down large monolith files to modules… — @georgesl.bsky.social3 likes and reposts · 2 replies
- Apr 3, 2026Updated my Claude Code ai-image-creator skill to support analysing images with Gemini 3.1 Flash Image Lite and GPT-5 Nano… — @georgesl.bsky.social2 likes and reposts
- Mar 31, 2026Claude Code ai-image-creator Skill using Google Gemini Nano Banana 2 github.com/centminmod/m... to created my Claude Code token usage… — @georgesl.bsky.social2 likes and reposts · 1 reply
- Mar 31, 2026Claude Code created images using my ai-image-creator Skill that leverages Google Gemini Nano Banana 2, Flux 2, Riverflow V2 Pro, Bytedance… — @georgesl.bsky.social2 likes and reposts · 1 reply
- Mar 25, 2026And costs for my Claude Code ai-image-creator SKILL at github.com/centminmod/m... where Claude generated images using: - Google Nano Banana… — @georgesl.bsky.social2 likes and reposts
- Mar 25, 2026Added Claude Code ai-image-creator SKILL to my Claude Code starter template GitHub repo at github.com/centminmod/m... so that Claude… — @georgesl.bsky.social2 likes and reposts · 1 reply
- Feb 11, 2026Claude Code Opus 4.6 waiting on my consult-codex GPT-5.3 skill's 2nd opinion github.com/centminmod/m... 🤓 — @georgesl.bsky.social2 likes and reposts
- Jan 23, 2026I use my Claude Code Skill, consult-codex so can leverage OpenAI GPT-5.2 + my Claude Opus 4.5 code-searcher agent to get a 2nd opinion for… — @georgesl.bsky.social2 likes and reposts
- Nov 2, 2025Added Claude claude-docs-consultant SKILL to my Claude Code start template to selectively consult official Claude Code documentation when… — @georgesl.bsky.social2 likes and reposts · 2 replies
- Aug 24, 2025How well AI understands your code? Test Kilo Code in Visual Studio Code to analyse my codebase with various LLM models, asked Claude Code -… — @georgesl.bsky.social2 likes and reposts
- Aug 14, 2025Asked Claude Code for all known subagents to see if there are any more undocumented subagents github.com/anthropics/c.... There is a… — @georgesl.bsky.social2 likes and reposts
- Aug 14, 2025Asked Claude Code for all known subagents see if there are any more undocumented subagents github.com/anthropics/c.... Seems there is a… — @georgesl.bsky.social2 likes and reposts · 1 reply
- Jul 31, 2025Created Threads API client that can also generate Threads Insight dashboard using Claude Code subagents, code-searcher, ux-design-expert… — @georgesl.bsky.social2 likes and reposts
- Jul 30, 2025Built Threads API client that can also generate Threads Insight dashboard using Claude Code subagents, code-searcher, ux-design-expert and… — @georgesl.bsky.social2 likes and reposts
- Jul 30, 2025Built Threads API client that can also generate Threads Insight dashboard using Claude Code subagents, code-searcher, ux-design-expert and… — @georgesl.bsky.social2 likes and reposts · 1 reply
- Jul 30, 2025Claude Code code-search subagent with its own separate context from the main context in my Claude Code starter template repo at… — @georgesl.bsky.social2 likes and reposts
- Jul 16, 2025My Claude Code /refactor-code slash prompt is nailing large Python files code refactoring and breaking down large monolith files to modules… — @georgesl.bsky.social2 likes and reposts
- Jul 16, 2025My Claude Code /refactor-code slash prompt is nailing large Python files code refactoring and breaking down large monolith files to… — @georgesl.bsky.social2 likes and reposts
- Jul 8, 2025Uploaded the Claude Code command slash prompt /cleanup-context markdown file and Claude Code hooks to my Claude Code starter repo at… — @georgesl.bsky.social2 likes and reposts
- Apr 1, 2026Claude Code created images using my ai-image-creator Skill that leverages Google Gemini Nano Banana 2 Flux 2, Riverflow V2 Pro Bytedance… — @georgesl.bsky.social1 likes and repost
- Mar 31, 2026Claude Code ai-image-creator Skill using Google Gemini Nano Banana 2 github.com/centminmod/m... to created my Claude Code token usage… — @georgesl.bsky.social1 likes and repost
- Mar 31, 2026Claude Code ai-image-creator Skill using Google Gemini Nano Banana 2 github.com/centminmod/m... to created my Claude Code token usage… — @georgesl.bsky.social1 likes and repost · 2 replies
- Mar 31, 2026Claude Code created images using my ai-image-creator Skill that leverages Google Gemini Nano Banana 2, Flux 2, Riverflow V2 Pro, Bytedance… — @georgesl.bsky.social1 likes and repost
- Mar 25, 2026Added Claude Code ai-image-creator SKILL to my Claude Code starter template GitHub repo at github.com/centminmod/m... so that Claude… — @georgesl.bsky.social1 likes and repost
- Feb 11, 2026ZAI GLM-5 in the house 😎 Using GLM 5 LLM model with my Claude Code setup github.com/centminmod/m... 🤓 — @georgesl.bsky.social1 likes and repost
- Jan 28, 2026OpenAI ChatGPT Plus $20/m plan definitely not going to make it for this week's usage limits with 3+ days to go 😅 Been using Codex CLI… — @georgesl.bsky.social1 likes and repost
- Jan 26, 2026I use my Claude Code Skill, consult-codex so I can leverage OpenAI GPT-5.2 + my Claude Opus 4.5 or, in this case, ZAI GLM 4.7 code-searcher… — @georgesl.bsky.social1 likes and repost
- Jan 24, 2026Been supplementing my Claude Code Max $100 plan usage with a heavily discounted ZAI GLM Coding Pro plan $10.80/month… — @georgesl.bsky.social1 likes and repost
- Jan 13, 2026Updated my Claude Code starter templates with consult-zai & consult-codex skill/agent pairs to invoke Claude Code and consult ZAI GLM 4.7… — @georgesl.bsky.social1 likes and repost · 1 reply
- Jan 13, 2026My Claude Code starter template GitHub repo has 1600+ GitHub stars now and at least ~1000 visitors/week. I wanted to rewrite my repo's… — @georgesl.bsky.social1 likes and repost
- Jan 12, 2026Claude Code + ZAI Pro AI plan with stacked discount with 10% invite discount + current 50% yearly discount 🚀 z.ai/subscribe?ic... reduces… — @georgesl.bsky.socialsays it tested it1 likes and repost
- Jan 9, 2026What Claude Code plugins are you using? Mine from my Claude Code setup at github.com/centminmod/m... 🤓 — @georgesl.bsky.social1 likes and repost
- Jan 9, 2026Updated my Claude Code starter template repo with Z.AI + Claude Code config instructions at github.com/centminmod/m... — @georgesl.bsky.social1 likes and repost
- Jan 2, 2026My Claude Code AI coding starter template setup Github repo just broke 1500 Github stars github.com/centminmod/m... 😎 Here's to more… — @georgesl.bsky.social1 likes and repost · 1 reply
- Dec 28, 2025Amazed by Claude Code CLI ability to complete tasks flawlessly. Taking advantage of 2x usage limits revisiting my 5 month old or-cli code… — @georgesl.bsky.social1 likes and repost
On GitHub · 5
- Oct 3, 2026agent-skills.github.centminmod.my-claude-code-setup: 0-unstable-2026-09-22 → 0-unstable-2026-09-28 — sudosubin/agents.nix0 reactions
- Sep 26, 2026agent-skills.github.centminmod.my-claude-code-setup: init at 0-unstable-2026-09-22 — sudosubin/agents.nix0 reactions
- Apr 18, 2026Audit candidate: centminmod/my-claude-code-setup — xiaolai/nlpm0 reactions · 2 comments
- Apr 4, 2026feat: .worktreeinclude 自動生成 hook で worktree .env コピーを完全自動化 — it-all-playpark/skills0 reactions
- Oct 15, 2025How hard would it be to aggregate all skills into one repo? — obra/superpowers-skills0 reactions · 3 comments
On Hacker News · 1
In this repository8 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- ai-image-creatorSkill
- claude-docs-consultantSkill
- consult-codexSkill
- consult-zaiSkill
- session-metricsSkill
- task-breakdownSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 4 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 36
Read $ARGUMENTS[0] and match by literal equality:
- Very specific: line 50
If $ARGUMENTS[1] is missing, empty, or the file does not exist, print:
- Distinctive: line 63
Run the extract helper once with the input path:
- Very specific: line 71
Do not: read the raw .jsonl, and do not re-derive numbers the digest already carries.
- Distinctive: line 84
Follow the playbook step-by-step.
- Distinctive: line 92
Output contract — three artefacts: All playbooks specify the same three-artefact contract:
- Very specific: line 111
IMPORTANT: Use the Write tool directly for steps 3 and 5.
- Very specific: line 112
Do NOT generate a Python script (e.g.
- Distinctive: line 123
Honour the playbook: If quick-audit.md asks for 5 rows, produce 5 rows — don't invent a 6th to look thorough.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Audit Session-Metrics
Reads a session-metrics JSON export and produces a prioritised, plain-English
audit of token-usage waste. It runs on the session's current model (it no
longer pins one — a hard model pin capped the usable context at that model's
window and broke invocation on long sessions). The work is mostly
summarisation over a small disk-read export, so for a ~10× cheaper run
/model haiku before invoking (short/early sessions only — Haiku's 200k
window can't hold a long conversation).
Supports three JSON scopes auto-detected from digest.scope:
- session — single session (
session_*.json) — per-turn analysis - project — all sessions for one project (
project_*.json) — per-session analysis - instance — all projects (
instance/*/index.json) — per-project analysis
Dispatch — how to route this invocation
First positional argument received: $ARGUMENTS[0]
Second positional argument received: $ARGUMENTS[1]
Read $ARGUMENTS[0] and match by literal equality:
$ARGUMENTS[0] | Route | Then read (session scope) | Then read (project/instance scope) |
quick | Quick audit | references/quick-audit.md | see Scope routing below |
detailed | Detailed audit | references/detailed-audit.md | see Scope routing below |
| (empty / other) | Print usage and stop | this file's "Usage" block below | — |
$ARGUMENTS[1] must be the path to a JSON export written by session-metrics.
Accepted patterns:
exports/session-metrics/session_<id8>_<ts>.json— session scopeexports/session-metrics/project_<ts>.json— project scopeexports/session-metrics/instance/<datedir>/index.json— instance scope
If $ARGUMENTS[1] is missing, empty, or the file does not exist, print:
Usage: /audit-session-metrics {quick|detailed} <path-to-session-metrics.json>
Accepted JSON types: session: exports/session-metrics/session_.json project: exports/session-metrics/project_.json instance: exports/session-metrics/instance/*/index.json
…and stop without further work.
Steps
Run the extract helper once with the input path:
python3 scripts/audit-extract.py $ARGUMENTS[1] --mode $ARGUMENTS[0]The helper emits a single JSON digest to stdout. Read
digest.scopefrom the output — it will be"session","project", or"instance". Do not read the raw.jsonl, and do not re-derive numbers the digest already carries.Scope routing — read the matching reference file:
digest.scope$ARGUMENTS[0]Reference file sessionquickreferences/quick-audit.mdsessiondetailedreferences/detailed-audit.mdprojectquickreferences/project-quick-audit.mdprojectdetailedreferences/project-detailed-audit.mdinstancequickordetailedreferences/instance-quick-audit.mdFollow the playbook step-by-step. Do not improvise additional phases.
- For
detailedmode on session scope only, the playbook also asks you to read the user's config files (~/.claude/CLAUDE.md,./CLAUDE.md,~/.claude/settings.json,./.claude/settings.json,./.claudeignore). Each is capped at ≤500 lines — if a file is bigger, that itself is a finding. Output contract — three artefacts. All playbooks specify the same three-artefact contract:
- JSON sidecar at
<project>/exports/session-metrics/audit_<id8>_<ts>_<mode>.json— structured findings (versioned schema, enum'd metrics). - Markdown copy at
<project>/exports/session-metrics/audit_<id8>_<ts>_<mode>.md— same content rendered for humans. - Inline chat output — the markdown content printed in your reply.
<id8>and<ts>come fromdigest.session_id_shortanddigest.ts_str(the helper parses the input filename and normalises all three filename patterns).- JSON sidecar at
Write order. Populate the JSON object first using the digest values, write the JSON sidecar, render the markdown using the template in the playbook, write the markdown copy, then print the markdown inline (without the H1 heading — the chat client already shows context above the audit). Finish with two stderr-style lines on their own:
[audit] saved → <json-path>[audit] saved → <md-path>IMPORTANT: Use the Write tool directly for steps 3 and 5. Do NOT generate a Python script (e.g. writing to
/tmp/audit_synthesis.pyand executing it) — this adds unnecessary failure modes (syntax errors, f-string escaping) and is never required. Build the JSON in the AI's own context; call Write. Render the markdown in context; call Write again.
Tone
- Direct and specific. Cite the exact ratio, dollar figure, or turn index. No motivational language, no LLM-theory padding.
- Prioritise by impact. Sort findings so the costliest fix is first.
- Quote sparingly. Snippets capped at 5 lines each.
- Honour the playbook. If quick-audit.md asks for 5 rows, produce 5 rows — don't invent a 6th to look thorough.
Why this is a separate skill
The audit is a distinct, user-initiated analysis step over a finished
export, not part of generating one. It reads only the on-disk JSON — never
the conversation — so it stands alone as its own turn, which is why
session-metrics suggests /audit-session-metrics rather than invoking it
programmatically. Running it as a fresh slash command keeps the turn focused
and lets the user decide when to spend on it. The work is summarisation-heavy
and the input is tiny, so the cost path is /model haiku before invoking
(short/early sessions only — Haiku's 200k window can't hold a long
conversation) — ~10× cheaper than a frontier model, with identical output
(every dollar figure is pre-computed by audit-extract.py, not guessed by
the model).
Reference files
Session scope
references/quick-audit.md— Distilled ratios + cache health + top expensive turns. Read when scope=session, mode=quick.references/detailed-audit.md— Quick audit findings plus config + re-read scans. Read when scope=session, mode=detailed.
Project scope
references/project-quick-audit.md— Per-session cost outliers, cache health, breaks, weekly trend. Read when scope=project, mode=quick.references/project-detailed-audit.md— Project quick findings plus per-session turn-level drilldown on the most expensive sessions. Read when scope=project, mode=detailed.
Instance scope
references/instance-quick-audit.md— Per-project cost breakdown, cache health, weekly cost trend. Used for both quick and detailed modes (no per-turn data available at instance scope).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

