[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7BYMTEZWACW0G89284E19A2":3,"skill-same:01M7BYMTEZWACW0G89284E19A2":43},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":13,"repositoryHtmlUrl":26,"repositoryHomepageUrl":6,"ownerHtmlUrl":27,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":28,"install":29,"resources":42},"01M7BYMTEZWACW0G89284E19A2","analyzing-claude-sessions",null,"Analyze your own local Claude Code session transcripts to find what you actually use the agent for, how effective it is, where it fails, and what it costs. Use when asked to mine Claude Code sessions, extract use-cases or workflows from session history, measure agent effectiveness or error rates, analyze token\u002Fcost usage, or produce a report on how an agent is really being used.","secure-workflows\u002Fgaia","secure-workflows","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F311422533?v=4","01M7BYM925H8FAXM1DRD7F5DQD","01M7BYM92V01EZBAV87C93HNKX",0,"MIT","https:\u002F\u002Fgithub.com\u002Fsecure-workflows\u002Fgaia\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fanalyzing-claude-sessions\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: analyzing-claude-sessions\ndescription: Analyze your own local Claude Code session transcripts to find what you actually use the agent for, how effective it is, where it fails, and what it costs. Use when asked to mine Claude Code sessions, extract use-cases or workflows from session history, measure agent effectiveness or error rates, analyze token\u002Fcost usage, or produce a report on how an agent is really being used.\n---\n\n# Analyzing your Claude Code sessions\n\nClaude Code writes a full JSONL transcript of every session to `~\u002F.claude\u002Fprojects\u002F`.\nThat is a complete record of what an agent was asked to do, every tool call it made,\nwhat failed, and what it cost. This skill turns that exhaust into an evidence-backed\nreport.\n\n**The pipeline is deterministic Python** (`gaia.factory.harvest`); an LLM is used only to\nclassify session intent. Everything derived is written to `~\u002F.gaia\u002Fcache\u002Ffactory\u002F` and\nmust never be committed — transcripts contain absolute paths, branch names, and whatever\nthe user pasted into a prompt.\n\n## Run it\n\nRedirect into the cache directory, never into a repository working tree. These tables\nare built from real transcripts, and an untracked `tables.md` sitting at a repo root is\none `git add -A` away from being published.\n\n```bash\nFACTORY=~\u002F.gaia\u002Fcache\u002Ffactory\n\n# 1. Extract. Deterministic, no LLM, no network. Roughly linear in transcript count.\npython -m gaia.factory.harvest.scan\n\n# 2. Tables. Absolute counts and share-of-total for every figure.\npython -m gaia.factory.harvest.report > \"$FACTORY\u002Ftables.md\"\n\n# 3. With use-case labels (see \"Classifying intent\" below):\npython -m gaia.factory.harvest.report --labels \"$FACTORY\u002Flabels.txt\" > \"$FACTORY\u002Ftables.md\"\n\n# 4. Per-request prompt size and local KV-cache memory. Re-reads the raw\n#    transcripts, because steps 1-2 aggregate per session and that hides how\n#    large any single request got.\npython -m gaia.factory.harvest.context --labels \"$FACTORY\u002Flabels.txt\" > \"$FACTORY\u002Fcontext.md\"\n\n# 5. What each proposed fix would actually save, in tokens and dollars.\npython -m gaia.factory.harvest.savings > \"$FACTORY\u002Fsavings.md\"\n```\n\nAll accept `--root` (transcripts elsewhere) and `--out` \u002F `--cache`; `context` and\n`savings` also take `--projects` if the raw transcripts are not under\n`~\u002F.claude\u002Fprojects`.\n\nOutputs in `~\u002F.gaia\u002Fcache\u002Ffactory\u002F`:\n\n| File | Contents |\n|---|---|\n| `traces.jsonl` | One normalized trace per session: ordered steps, outcomes, tokens, subagents |\n| `intents.jsonl` | One line per session: goal, title, steps, turns, tokens, cost, duration |\n| `stats.json` | Every aggregate, including the `effectiveness` and `error_profile` blocks |\n\n## The five things that will mislead you\n\nLearned by getting each one wrong first.\n\n**1. Subagents are not sessions.** A delegated `Task`\u002F`Agent` run gets its own transcript\nunder `\u003Csession-uuid>\u002Fsubagents\u002F`. A plain `*\u002F*.jsonl` glob misses them entirely, and they\ncan carry a large share of all tool calls in a delegation-heavy corpus. `iter_traces`\nattaches them to the parent; use `Trace.walk()` to include them and say explicitly which\nscope a number covers.\n\n**2. Identity must hash the full arguments.** Keying a tool call on one argument (the file\npath, say) makes consecutive *different* edits to one file look identical. That single\nmistake overstated a \"thrash\" metric ~40×. `Step.arg_hash` covers the whole argument\nobject; `arg_digest` is for display only. Never compute identity from the digest.\n\n**3. Order your error taxonomy specific-before-generic.** Matching is first-wins, and a\ntimeout also carries a non-zero exit code. With `command_failed` above `timeout`, real\ntimeouts — often the largest failure class — get filed as generic command failures.\n\n**4. Rank savings by carried tokens, not by call count.** A prompt is the whole\nconversation so far, so a result emitted at step 5 of a 50-step run is re-sent 45 more\ntimes. That carry multiplier decides what a fix is worth. Expect the two rankings to\ndisagree: re-reads can be a large share of reads by count yet a small share of tokens,\nwhile budgeting oversized results is worth several times more. `savings.py`\ncomputes both; report the token figure and say which one a claim rests on.\n\n**5. Harness turns are not human turns.** Hook feedback and system reminders appear as\n`user` records. They match correction patterns like \"stop\" and inflated a \"user corrected\nthe model\" metric 8×. Filter on the `isMeta` field; a `startswith(\"\u003C\")` heuristic does not\ncatch them.\n\n## Classifying intent\n\n`scan` produces `intents.jsonl` but assigns no use-case. To label:\n\n1. Split the intents into batches of ~70.\n2. For each batch, ask a subagent to assign one primary use-case plus up to two secondary\n   tags, returning strict JSON. Give every batch **the same taxonomy** — the one in the\n   reference report is a good starting set (`pr_lifecycle`, `code_review`, `doc_audit`,\n   `feature_impl`, `ci_debug`, `security_fix`, `research`, …), extended where the corpus\n   demands it.\n3. Write `$FACTORY\u002Flabels.txt` as `\u003C8-char-session-prefix> \u003Cprimary> \u003Csecondary,secondary>`.\n   It carries session-id prefixes, so it belongs in the cache directory like everything\n   else derived — not in a repo.\n4. Re-run `report --labels \"$FACTORY\u002Flabels.txt\"`.\n\nClassify from the **first user message**, not the auto-generated title — the title is a\nsummary of what happened, which leaks the outcome into the label.\n\n## What to actually report\n\nRaw counts alone mislead. The findings that carried signal in the reference corpus:\n\n- **Token composition, not just totals.** Cache-read vs cache-write vs output. Agentic\n  coding is overwhelmingly context, with output a rounding error.\n- **Binary frequency inside shell commands.** The single richest signal — it shows which\n  tools the model *actually* reaches for versus which ones it was given.\n- **Failure rate per tool, not corpus-wide.** A corpus-wide average hides wide per-tool\n  variation — always break failure rate out per tool.\n- **Failure rate by position in the session.** Tests whether reliability decays as context\n  fills. Measure it rather than assuming decay; it may well be flat.\n- **What happens after a failure** — recovery rate and streak length separate \"handles\n  errors well\" from \"gets stuck\".\n- **Main-session vs subagent rates**, which isolates the cost of write capability.\n\n## Honesty requirements\n\nThese are not optional; the analysis is worthless without them.\n\n- **There is no ground truth for task success.** Nothing in a transcript says whether the\n  goal was met. Never present a tool-failure rate as a task-failure rate.\n- **Friction signals are regex proxies.** Corrections and interrupts are evidence, not\n  proof. Compare rates across use-cases; do not quote absolutes as fact.\n- **Cost is API-equivalent**, not money spent, if the sessions ran on a subscription.\n- **Duration is unusable past the median** — a session left open overnight reports the\n  whole night.\n- **The corpus grows while you analyse it.** The session doing the analysis is itself\n  being recorded, so counts drift between runs. Timestamp the snapshot.\n- **Every derived table needs a column glossary.** A column nobody can define is a column\n  nobody should trust.\n\n## Privacy\n\nTranscripts contain absolute paths, branch names, repository content, and any secret\npasted into a prompt. The pipeline writes only to `~\u002F.gaia\u002Fcache\u002Ffactory\u002F`. If a report is\nshared, put it somewhere private and scrub paths first. Nothing derived from a corpus\nbelongs in a public repository.\n\n## Verifying the analysis\n\nBefore publishing, have a subagent adversarially review the *extraction code* against the\ncorpus — not just the prose. Four of the reference report's numbers were wrong on first\npass, including its headline, and every one was a bug in the metric rather than a mistake\nin the writing. Ask specifically: does each metric measure what its name claims, and is\nthe denominator the one the sentence implies?\n","# Analyzing your Claude Code sessions\n\nClaude Code writes a full JSONL transcript of every session to `~\u002F.claude\u002Fprojects\u002F`.\nThat is a complete record of what an agent was asked to do, every tool call it made,\nwhat failed, and what it cost. This skill turns that exhaust into an evidence-backed\nreport.\n\n**The pipeline is deterministic Python** (`gaia.factory.harvest`); an LLM is used only to\nclassify session intent. Everything derived is written to `~\u002F.gaia\u002Fcache\u002Ffactory\u002F` and\nmust never be committed — transcripts contain absolute paths, branch names, and whatever\nthe user pasted into a prompt.\n\n## Run it\n\nRedirect into the cache directory, never into a repository working tree. These tables\nare built from real transcripts, and an untracked `tables.md` sitting at a repo root is\none `git add -A` away from being published.\n\n```bash\nFACTORY=~\u002F.gaia\u002Fcache\u002Ffactory\n\n# 1. Extract. Deterministic, no LLM, no network. Roughly linear in transcript count.\npython -m gaia.factory.harvest.scan\n\n# 2. Tables. Absolute counts and share-of-total for every figure.\npython -m gaia.factory.harvest.report > \"$FACTORY\u002Ftables.md\"\n\n# 3. With use-case labels (see \"Classifying intent\" below):\npython -m gaia.factory.harvest.report --labels \"$FACTORY\u002Flabels.txt\" > \"$FACTORY\u002Ftables.md\"\n\n# 4. Per-request prompt size and local KV-cache memory. Re-reads the raw\n#    transcripts, because steps 1-2 aggregate per session and that hides how\n#    large any single request got.\npython -m gaia.factory.harvest.context --labels \"$FACTORY\u002Flabels.txt\" > \"$FACTORY\u002Fcontext.md\"\n\n# 5. What each proposed fix would actually save, in tokens and dollars.\npython -m gaia.factory.harvest.savings > \"$FACTORY\u002Fsavings.md\"\n```\n\nAll accept `--root` (transcripts elsewhere) and `--out` \u002F `--cache`; `context` and\n`savings` also take `--projects` if the raw transcripts are not under\n`~\u002F.claude\u002Fprojects`.\n\nOutputs in `~\u002F.gaia\u002Fcache\u002Ffactory\u002F`:\n\n| File | Contents |\n|---|---|\n| `traces.jsonl` | One normalized trace per session: ordered steps, outcomes, tokens, subagents |\n| `intents.jsonl` | One line per session: goal, title, steps, turns, tokens, cost, duration |\n| `stats.json` | Every aggregate, including the `effectiveness` and `error_profile` blocks |\n\n## The five things that will mislead you\n\nLearned by getting each one wrong first.\n\n**1. Subagents are not sessions.** A delegated `Task`\u002F`Agent` run gets its own transcript\nunder `\u003Csession-uuid>\u002Fsubagents\u002F`. A plain `*\u002F*.jsonl` glob misses them entirely, and they\ncan carry a large share of all tool calls in a delegation-heavy corpus. `iter_traces`\nattaches them to the parent; use `Trace.walk()` to include them and say explicitly which\nscope a number covers.\n\n**2. Identity must hash the full arguments.** Keying a tool call on one argument (the file\npath, say) makes consecutive *different* edits to one file look identical. That single\nmistake overstated a \"thrash\" metric ~40×. `Step.arg_hash` covers the whole argument\nobject; `arg_digest` is for display only. Never compute identity from the digest.\n\n**3. Order your error taxonomy specific-before-generic.** Matching is first-wins, and a\ntimeout also carries a non-zero exit code. With `command_failed` above `timeout`, real\ntimeouts — often the largest failure class — get filed as generic command failures.\n\n**4. Rank savings by carried tokens, not by call count.** A prompt is the whole\nconversation so far, so a result emitted at step 5 of a 50-step run is re-sent 45 more\ntimes. That carry multiplier decides what a fix is worth. Expect the two rankings to\ndisagree: re-reads can be a large share of reads by count yet a small share of tokens,\nwhile budgeting oversized results is worth several times more. `savings.py`\ncomputes both; report the token figure and say which one a claim rests on.\n\n**5. Harness turns are not human turns.** Hook feedback and system reminders appear as\n`user` records. They match correction patterns like \"stop\" and inflated a \"user corrected\nthe model\" metric 8×. Filter on the `isMeta` field; a `startswith(\"\u003C\")` heuristic does not\ncatch them.\n\n## Classifying intent\n\n`scan` produces `intents.jsonl` but assigns no use-case. To label:\n\n1. Split the intents into batches of ~70.\n2. For each batch, ask a subagent to assign one primary use-case plus up to two secondary\n   tags, returning strict JSON. Give every batch **the same taxonomy** — the one in the\n   reference report is a good starting set (`pr_lifecycle`, `code_review`, `doc_audit`,\n   `feature_impl`, `ci_debug`, `security_fix`, `research`, …), extended where the corpus\n   demands it.\n3. Write `$FACTORY\u002Flabels.txt` as `\u003C8-char-session-prefix> \u003Cprimary> \u003Csecondary,secondary>`.\n   It carries session-id prefixes, so it belongs in the cache directory like everything\n   else derived — not in a repo.\n4. Re-run `report --labels \"$FACTORY\u002Flabels.txt\"`.\n\nClassify from the **first user message**, not the auto-generated title — the title is a\nsummary of what happened, which leaks the outcome into the label.\n\n## What to actually report\n\nRaw counts alone mislead. The findings that carried signal in the reference corpus:\n\n- **Token composition, not just totals.** Cache-read vs cache-write vs output. Agentic\n  coding is overwhelmingly context, with output a rounding error.\n- **Binary frequency inside shell commands.** The single richest signal — it shows which\n  tools the model *actually* reaches for versus which ones it was given.\n- **Failure rate per tool, not corpus-wide.** A corpus-wide average hides wide per-tool\n  variation — always break failure rate out per tool.\n- **Failure rate by position in the session.** Tests whether reliability decays as context\n  fills. Measure it rather than assuming decay; it may well be flat.\n- **What happens after a failure** — recovery rate and streak length separate \"handles\n  errors well\" from \"gets stuck\".\n- **Main-session vs subagent rates**, which isolates the cost of write capability.\n\n## Honesty requirements\n\nThese are not optional; the analysis is worthless without them.\n\n- **There is no ground truth for task success.** Nothing in a transcript says whether the\n  goal was met. Never present a tool-failure rate as a task-failure rate.\n- **Friction signals are regex proxies.** Corrections and interrupts are evidence, not\n  proof. Compare rates across use-cases; do not quote absolutes as fact.\n- **Cost is API-equivalent**, not money spent, if the sessions ran on a subscription.\n- **Duration is unusable past the median** — a session left open overnight reports the\n  whole night.\n- **The corpus grows while you analyse it.** The session doing the analysis is itself\n  being recorded, so counts drift between runs. Timestamp the snapshot.\n- **Every derived table needs a column glossary.** A column nobody can define is a column\n  nobody should trust.\n\n## Privacy\n\nTranscripts contain absolute paths, branch names, repository content, and any secret\npasted into a prompt. The pipeline writes only to `~\u002F.gaia\u002Fcache\u002Ffactory\u002F`. If a report is\nshared, put it somewhere private and scrub paths first. Nothing derived from a corpus\nbelongs in a public repository.\n\n## Verifying the analysis\n\nBefore publishing, have a subagent adversarially review the *extraction code* against the\ncorpus — not just the prose. Four of the reference report's numbers were wrong on first\npass, including its headline, and every one was a bug in the metric rather than a mistake\nin the writing. Ask specifically: does each metric measure what its name claims, and is\nthe denominator the one the sentence implies?\n",{"name":5,"description":7},"main","11039b64e036dca33313350b4cd1d6c2a791eb15",".claude\u002Fskills\u002Fanalyzing-claude-sessions","https:\u002F\u002Fgithub.com\u002Fsecure-workflows\u002Fgaia","https:\u002F\u002Fgithub.com\u002Fsecure-workflows","2026-10-26 10:48:34",{"source":8,"skillName":5,"commands":30,"prompt":40,"zipAvailable":41},[31,34,37],{"tool":32,"command":33},"npx","npx skills add secure-workflows\u002Fgaia --skill analyzing-claude-sessions",{"tool":35,"command":36},"bunx","bunx skills add secure-workflows\u002Fgaia --skill analyzing-claude-sessions",{"tool":38,"command":39},"pnpm","pnpm dlx skills add secure-workflows\u002Fgaia --skill analyzing-claude-sessions","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsecure-workflows\u002Fgaia\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fanalyzing-claude-sessions\u002FSKILL.md",true,[],[44,51,58,65,72,79],{"skillNo":45,"name":46,"nameZh":6,"description":47,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":48,"categories":49,"keywords":50,"publishedAt":18},"01M7BYXGPPQJGVVD0DPS2WK3FS","web-search","Search the web via the Brave Search API. Use when the user asks about current events or external facts.","https:\u002F\u002Fgithub.com\u002Fsecure-workflows\u002Fgaia\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Fweb-search\u002FSKILL.md",[],[],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":18},"01M7BYXDF2TM5JPMEQKMMHW0VJ","triage-support-ticket","Triage an inbound support ticket end to end. Use when the user pastes a support ticket or asks to triage one.","https:\u002F\u002Fgithub.com\u002Fsecure-workflows\u002Fgaia\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Ftriage-support-ticket\u002FSKILL.md",[],[],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":18},"01M7BYXAHWNBMJ8Y1Q51EZ53K7","tool-mismatch","Declares a tool its tools.py never registers. Used to prove validation fails loudly with no partial load.","https:\u002F\u002Fgithub.com\u002Fsecure-workflows\u002Fgaia\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Ftool-mismatch\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":18},"01M7BYX6CZ63AM6HB90PPNXKF7","report-archive","Archive a generated report to the user's reports folder and register it with the team's report index. Use when the user asks to file, archive, or publish a finished report.","https:\u002F\u002Fgithub.com\u002Fsecure-workflows\u002Fgaia\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Freport-archive\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":18},"01M7BYX4PM4HGNZ0QBZ54BTG1N","local-capability","Writes files on the local workspace. Used to prove Phase 1 refuses local-capability permissions.","https:\u002F\u002Fgithub.com\u002Fsecure-workflows\u002Fgaia\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Flocal-capability\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":18},"01M7BYX1KVPKHHZ5Z3R3BB0QQA","incident-review","Run an incident postmortem. Stands in for a Claude Code skill library imported read-only from .claude\u002Fskills\u002F.","https:\u002F\u002Fgithub.com\u002Fsecure-workflows\u002Fgaia\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Fincident-review\u002FSKILL.md",[],[]]