profile

Solid

Session clock-time analyzer. Reads the foundry plugin's timings.jsonl and invocations.jsonl logs (written by task-log.js) and produces a per-session and per-skill wall-time breakdown — local-tool work vs subagent spawns vs Skill invocations vs AskUserQuestion idle vs main-loop reasoning residual. Useful for answering "why did /oss:resolve run 30 minutes?" or "what eats clock time in /develop:fix?". Pure log read — no instrumentation, no skill edits, no LLM calls. TRIGGER when: user asks where wall-clock time goes during a skill/session, why a skill is slow, what dominates total runtime, or wants a per-skill rollup over a recent window; phrases: "where does time go", "why so slow", "profile last session", "clock breakdown", "session timing". SKIP: token/cost questions (model field is null in current logs — out of scope); per-line Python perf (use foundry:perf-optimizer); known failure or hang (use /foundry:investigate).

Data & Documents 23 stars 3 forks Updated today Apache-2.0

Install

View on GitHub

Quality Score: 87/100

Stars 20%
46
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 existing `~/.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 Outputs a markdown report at `.reports/profile/<UTC-timestamp>/report.md` plus a `.temp/output-profile-...md` copy. Includes per-session table, per-skill rollup, and top-N longest single calls. NOT for: token or cost accounting (model field null in current logs); per-line Python perf (use `foundry:perf-optimizer`); known failure diagnosis (use `/foundry:investigate`). </objective> <inputs> - **`--since DURATION`** (default `24h`) — window: `NNs|NNm|NNh|NNd` - **`--session-id ID`** — optional; restrict to one session - **`--top-n N`** (default `5`) — slowest single calls to list If $ARGUMENTS empty, default window is 24h. </inputs> <workflow> **Task tracking**: TaskCreate one task ("Run analyzer + render report"); mark in_progress before Bash, completed before final output. ## Step 1: Parse args + create run dir ```bash export CSID="${CLAUDE_CODE_SESSION_ID:-$PPID}" # timeout: 5000 SINCE="24h" SESSION_ID="" TOP_N="5" for tok in $ARGUMENTS; do case "$tok" in --since=*) SINCE="${tok#--since=}" ;; --sinc...

Details

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

Similar Skills

Semantically similar based on skill content — not just same category