profile

Featured

Session clock-time AND token/cost analyzer. Reads the foundry plugin's timings.jsonl and invocations.jsonl logs (written by task-log.js) for wall-time, plus Claude Code transcripts (~/.claude/projects/**, main-loop + subagent files) for token usage and USD cost, and merges both into one per-session and per-skill report — local-tool vs subagent-spawn vs Skill vs AskUserQuestion idle vs main-loop reasoning residual time, and main-loop vs subagent spend by model tier. Useful for answering "why did /oss:resolve run 30 minutes?", "what did this session cost?", or "which skill burns the most tokens?". Pure log/transcript read — no instrumentation, no skill edits, no LLM calls. TRIGGER when: user asks where wall-clock time OR tokens/cost go during a skill/session, why a skill is slow or expensive, what dominates total runtime or spend, or wants a per-skill rollup over a recent window; phrases: "where does time go", "why so slow", "what did this cost", "token spend", "why so expensive", "profile last session", "clock

Data & Documents 27 stars 4 forks Updated today Apache-2.0

Install

View on GitHub

Quality Score: 88/100

Stars 20%
48
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

<objective> Bucket session **clock time** from `~/.claude/logs/{timings,invocations}.jsonl` into: 1. **Local tools** — Bash/Read/Edit/Write/Grep/Glob and other main-process tools 2. **Agent / subagent spawns** — Task/Agent calls (sync + background) 3. **Skill** — `tool=Skill` wall durations 4. **AskUserQuestion idle** — human-wait, separate column, excluded from compute total 5. **Main-loop reasoning (residual)** — session wall minus buckets above ...and bucket session **tokens/cost** from Claude Code transcripts (`~/.claude/projects/**`, main-loop + subagent files) into: 6. **Sessions ranked by cost** (window mode) — main $ vs subagent $ vs total $ per session, plus a per-command rollup; or **one session's deep-dive** (`--session-id`) — cost by main/sidechain × model tier, agent roster, top cache-rebuild calls, cold-start share Outputs a markdown report at `.reports/profile/<UTC-timestamp>/report.md` plus a `.temp/output-profile-...md` copy: per-session clock table, per-skill clock rollup, top-N longest single calls, plus a `## Tokens & cost` section scoped to the same window / `--session-id`. NOT for: per-line Python perf (use `foundry:perf-optimizer`); known failure diagnosis (use `/foundry:investigate`); a real billing statement (prices are public list rates, not effective plan rates). </objective> <inputs> - **`--since DURATION`** (default `24h`) — window: `NNs|NNm|NNh|NNd` - **`--session-id ID`** — optional; restrict to one session - **`--top-n N`** (default `5...

Details

Author
Borda
Repository
Borda/AI-Rig
Created
6 months ago
Last Updated
today
Language
Python
License
Apache-2.0

Similar Skills

Semantically similar based on skill content — not just same category

Code & Development Listed

profile-session

Answers "why was that session slow?" from the agent transcript's own timestamps. Attributes wall-clock time to categories (tests/build, subagent dispatch, adversarial review, model thinking, stalls, user-away), ranks the biggest gaps, and names the specific commands behind them. Reads Claude Code session JSONL and Codex rollout JSONL. Modes: [transcript], --last, --skill <name>, --since <iso>, --compare <a> <b>.

6 Updated 4 days ago
greglas75
AI & Automation Listed

stats

Query Claude Code usage stats from observability logs. Shows costs, session summaries, tool usage, token consumption, and more. Use when asked about costs, usage, stats, spending, session history, most-used tools, or token usage. Invoked with /stats or when asking questions like "how much have I spent today?"

0 Updated 3 weeks ago
Saturate
Data & Documents Listed

session-report

Use when the user asks what they are spending on Claude, how many tokens something cost, why a session got expensive, or how well caching is working. Triggers: 'session report', 'token usage', 'how many tokens', 'what did that cost', 'am I burning tokens', 'cache hit rate', 'why is this session so expensive', 'which project costs most', 'show my usage', 'usage this week', 'last 7 days', 'claude stats', 'token breakdown', 'subagent cost'. Also use proactively after a long or context-heavy session when the user wonders where the budget went. Reads Claude Code's own JSONL transcripts under ~/.claude/projects; on other harnesses it reports that no compatible transcripts exist rather than inventing numbers.

2 Updated today
Tamircohen28