elliot-stack 1.0.29 → 1.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +5 -0
- package/bin/install.cjs +981 -950
- package/hooks/repo-search-nudge.js +32 -32
- package/package.json +1 -1
- package/skills/estack-active-learning-tutor/SKILL.md +339 -339
- package/skills/estack-better-title/SKILL.md +64 -64
- package/skills/estack-better-title/scripts/rename.sh +55 -55
- package/skills/estack-chris-voss/SKILL.md +80 -80
- package/skills/estack-chris-voss/references/elliot-notes.md +120 -120
- package/skills/estack-chris-voss/references/voss-principles.md +210 -210
- package/skills/estack-customer-discovery/SKILL.md +60 -60
- package/skills/estack-flight-planner/SKILL.md +332 -332
- package/skills/estack-flight-planner/references/config_schema.md +156 -156
- package/skills/estack-flight-planner/references/flight_history_schema.md +97 -97
- package/skills/estack-flight-planner/references/shuttle_schedules.md +98 -98
- package/skills/estack-flight-planner/scripts/check_setup.sh +89 -89
- package/skills/estack-flight-planner/scripts/fetch_flights.py +99 -99
- package/skills/estack-flight-planner/scripts/filter_flights.py +265 -265
- package/skills/estack-flight-planner/scripts/pair_shuttles.py +173 -173
- package/skills/estack-github-issue-tracker/SKILL.md +322 -322
- package/skills/estack-github-issue-tracker/bin/tracker-tools.cjs +1358 -1358
- package/skills/estack-github-issue-tracker/references/gh-cli-patterns.md +124 -124
- package/skills/estack-github-issue-tracker/references/result-file-schema.md +156 -156
- package/skills/estack-github-issue-tracker/references/tracker-schema.md +96 -96
- package/skills/estack-github-issue-tracker/tracker-template.md +58 -58
- package/skills/estack-leadership-coach/SKILL.md +235 -0
- package/skills/estack-leadership-coach/adding-references.md +280 -0
- package/skills/estack-leadership-coach/frameworks/delegation/flows/post-mortem.md +120 -0
- package/skills/estack-leadership-coach/frameworks/delegation/flows/pre-delegation.md +138 -0
- package/skills/estack-leadership-coach/frameworks/delegation/phases/1-intake.md +145 -0
- package/skills/estack-leadership-coach/frameworks/delegation/phases/2-trm-assessment.md +119 -0
- package/skills/estack-leadership-coach/frameworks/delegation/phases/3-enrollment.md +132 -0
- package/skills/estack-leadership-coach/frameworks/delegation/phases/4-build-brief.md +171 -0
- package/skills/estack-leadership-coach/frameworks/delegation/phases/5-monitoring.md +134 -0
- package/skills/estack-leadership-coach/frameworks/delegation/phases/6-reverse-delegation.md +118 -0
- package/skills/estack-leadership-coach/frameworks/delegation/phases/7-diagnose.md +200 -0
- package/skills/estack-leadership-coach/references/.source-files/deci-ryan_self-determination-theory__deci-olafsen-ryan-2017-self-determination-theory-in-work-organizations.md +1881 -0
- package/skills/estack-leadership-coach/references/.source-files/deci-ryan_self-determination-theory__gagne-deci-2005-self-determination-theory-and-work-motivation.md +2058 -0
- package/skills/estack-leadership-coach/references/.source-files/deci-ryan_self-determination-theory__selfdeterminationtheory-org-theory-overview-page.md +61 -0
- package/skills/estack-leadership-coach/references/.source-files/gallup_engagement-research__gallup-3-key-insights-into-the-global-workplace-2024.md +57 -0
- package/skills/estack-leadership-coach/references/.source-files/gallup_engagement-research__gallup-managers-account-for-70-percent-of-variance-in-employee-engagement-2015.md +40 -0
- package/skills/estack-leadership-coach/references/.source-files/gallup_engagement-research__gallup-state-of-the-global-workplace-2026-global-data-summary.md +73 -0
- package/skills/estack-leadership-coach/references/.source-files/gallup_engagement-research__gallup-state-of-the-global-workplace-2026-report-landing.md +42 -0
- package/skills/estack-leadership-coach/references/.source-files/hormozi-leila_4-stages__leila-hormozi-the-art-of-delegation-blog-post.md +91 -0
- package/skills/estack-leadership-coach/references/.source-files/oncken-wass_monkeys-hbr-1974__oncken-wass-management-time-whos-got-the-monkey-hbr-classic-1974.md +969 -0
- package/skills/estack-leadership-coach/references/.source-files/sanchez_main-street-millionaire__codie-sanchez-afford-anything-podcast-ep-565-show-notes.md +89 -0
- package/skills/estack-leadership-coach/references/.source-files/sullivan_who-not-how__dan-sullivan-impact-filter-tool-and-guide-booklet.md +565 -0
- package/skills/estack-leadership-coach/references/.source-files/van-edwards_cues__vanessa-van-edwards-lewis-howes-school-of-greatness-ep-1231-show-notes.md +122 -0
- package/skills/estack-leadership-coach/references/.source-files/van-edwards_cues__vanessa-van-edwards-roger-dooley-cues-interview.md +194 -0
- package/skills/estack-leadership-coach/references/deci-ryan_self-determination-theory.md +166 -0
- package/skills/estack-leadership-coach/references/doerr_measure-what-matters.md +154 -0
- package/skills/estack-leadership-coach/references/ferriss_4hww.md +189 -0
- package/skills/estack-leadership-coach/references/gallup_engagement-research.md +105 -0
- package/skills/estack-leadership-coach/references/gerber_e-myth-revisited.md +118 -0
- package/skills/estack-leadership-coach/references/grove_high-output-management.md +95 -0
- package/skills/estack-leadership-coach/references/hormozi-alex_followthrough.md +152 -0
- package/skills/estack-leadership-coach/references/hormozi-leila_4-stages.md +146 -0
- package/skills/estack-leadership-coach/references/oncken-wass_monkeys-hbr-1974.md +128 -0
- package/skills/estack-leadership-coach/references/sanchez_main-street-millionaire.md +196 -0
- package/skills/estack-leadership-coach/references/sullivan_who-not-how.md +137 -0
- package/skills/estack-leadership-coach/references/van-edwards_cues.md +189 -0
- package/skills/estack-migrate-claude-session-history/SKILL.md +226 -0
- package/skills/estack-migrate-claude-session-history/references/path-encoding.md +55 -0
- package/skills/estack-migrate-claude-session-history/references/troubleshooting.md +96 -0
- package/skills/estack-migrate-claude-session-history/scripts/migrate-claude-history.js +1123 -0
- package/skills/estack-migrate-claude-session-history/scripts/test-append-note.js +48 -0
- package/skills/estack-migrate-claude-session-history/scripts/test-validate-migration.py +326 -0
- package/skills/estack-migrate-claude-session-history/scripts/validate-migration.py +493 -0
- package/skills/estack-pdf-to-md/SKILL.md +180 -0
- package/skills/estack-pdf-to-md/scripts/pdf_to_md.py +596 -0
- package/skills/estack-productivity-prioritization-coach/SKILL.md +124 -0
- package/skills/estack-productivity-prioritization-coach/sources/01-tony-robbins-rpm.md +39 -0
- package/skills/estack-productivity-prioritization-coach/sources/02-justin-sung-task-prioritization.md +34 -0
- package/skills/estack-prompt-builder-coach/SKILL.md +81 -81
- package/skills/estack-prompt-builder-coach/definition-of-done-generator.md +42 -42
- package/skills/estack-prompt-builder-coach/prompt-builder.md +37 -37
- package/skills/estack-prompt-builder-coach/task-shaper.md +36 -36
- package/skills/estack-prompt-builder-coach/vague-ask-auditor.md +37 -37
- package/skills/estack-read-claude-session-history/SKILL.md +204 -204
- package/skills/estack-read-claude-session-history/references/jsonl-schema.md +126 -126
- package/skills/estack-read-claude-session-history/references/modes.md +423 -423
- package/skills/estack-read-claude-session-history/references/recipes.md +271 -271
- package/skills/estack-read-claude-session-history/scripts/lib/__init__.py +1 -1
- package/skills/estack-read-claude-session-history/scripts/lib/parser.py +460 -460
- package/skills/estack-read-claude-session-history/scripts/lib/paths.py +234 -234
- package/skills/estack-read-claude-session-history/scripts/lib/search.py +179 -179
- package/skills/estack-read-claude-session-history/scripts/lib/subagents.py +88 -88
- package/skills/estack-read-claude-session-history/scripts/lib/tools.py +144 -144
- package/skills/estack-read-claude-session-history/scripts/read_transcript.py +1776 -1776
- package/skills/estack-read-claude-session-history/scripts/tests/conftest.py +40 -40
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/README.md +20 -20
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/all-noise.jsonl +4 -4
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/basic-session.jsonl +2 -2
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/engagement-gaps.jsonl +9 -9
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/engagement-noise.jsonl +7 -7
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/engagement-parallel-a.jsonl +3 -3
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/engagement-parallel-b.jsonl +3 -3
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/engagement-waiting.jsonl +5 -5
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/interrupted.jsonl +2 -2
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/multi-compact.jsonl +8 -8
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/pending-user.jsonl +2 -2
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/subagent-no-meta/subagents/agent-aaa.jsonl +2 -2
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/subagent-no-meta.jsonl +2 -2
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/subagent-parent/subagents/agent-xyz123.jsonl +2 -2
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/subagent-parent/subagents/agent-xyz123.meta.json +1 -1
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/subagent-parent.jsonl +4 -4
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/time-spread.jsonl +6 -6
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/timeline-day-test.jsonl +5 -5
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/tool-zoo.jsonl +10 -10
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/truncated.jsonl +2 -2
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/unicode.jsonl +2 -2
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/with-advisor.jsonl +3 -3
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/with-compact.jsonl +5 -5
- package/skills/estack-read-claude-session-history/scripts/tests/fixtures/with-thinking.jsonl +2 -2
- package/skills/estack-read-claude-session-history/scripts/tests/test_backup_roots.py +56 -56
- package/skills/estack-read-claude-session-history/scripts/tests/test_engagement.py +239 -239
- package/skills/estack-read-claude-session-history/scripts/tests/test_json_format.py +201 -201
- package/skills/estack-read-claude-session-history/scripts/tests/test_modes.py +199 -199
- package/skills/estack-read-claude-session-history/scripts/tests/test_parser.py +195 -195
- package/skills/estack-read-claude-session-history/scripts/tests/test_paths.py +133 -133
- package/skills/estack-read-claude-session-history/scripts/tests/test_search.py +78 -78
- package/skills/estack-read-claude-session-history/scripts/tests/test_subagents.py +43 -43
- package/skills/estack-read-claude-session-history/scripts/tests/test_timeline.py +179 -179
- package/skills/estack-read-claude-session-history/scripts/tests/test_timezone_and_project.py +212 -212
- package/skills/estack-read-claude-session-history/scripts/tests/test_tools.py +80 -80
- package/skills/estack-repo-search/SKILL.md +65 -65
- package/skills/estack-vscode-file-recovery/SKILL.md +188 -0
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
<role>
|
|
2
|
-
You are a task-shaping partner, Part 4 of a four-part prompt kit, the Task Shaper. You help people move from a fuzzy idea to a decided goal, before any brief is built. You do not build a prompt, and you do not do the task. You help the user decide what the work even is. Read SKILL.md for the shared mindset and the cross-part rules before working this part. This is the earliest stage of the kit: shaping comes before briefing.
|
|
3
|
-
</role>
|
|
4
|
-
|
|
5
|
-
<context>
|
|
6
|
-
This part runs two ways. Standalone: SKILL.md routes the user here because they have an idea, an itch, or an area to work in but have not decided what they are actually trying to do, who it is for, or the core angle. This is exploratory, creative, or judgment-heavy strategy work where the goal is not yet visible. Mid-flow from the builder: the Useful Question Builder paused because, while working the Goal field, it found the goal itself is undecided, and you arrived by a switch, so you have already re-read this file per SKILL.md Rule 1. Either way, when shaping is done you hand off to the Useful Question Builder, because a decided goal is the input a brief needs, not a finished deliverable.
|
|
7
|
-
</context>
|
|
8
|
-
|
|
9
|
-
<instructions>
|
|
10
|
-
1. Open. Ask the user what they have: the rough idea, the itch, the area they want to work in. Make clear you are not going to start the work or build a prompt yet. Your job right now is to help them decide what the work is.
|
|
11
|
-
|
|
12
|
-
2. Map the options. Surface the genuinely distinct directions the idea could take. Lay out 2 to 4 different framings, angles, or goals the idea could become, not variations of one. Make the differences sharp, so the user is choosing between real alternatives rather than rewordings.
|
|
13
|
-
|
|
14
|
-
3. Surface the tensions. Name the tradeoffs between the options: what each direction gains and gives up, who each one serves, what each one closes off. Name the decisions hiding inside the idea that the user has not made yet, such as audience, scope, and purpose. Do not smooth these over; the tensions are the point.
|
|
15
|
-
|
|
16
|
-
4. Help the user decide. Ask the user to choose a direction or narrow toward one. Push gently for a decision and do not let the task stay open. If the user genuinely cannot decide, that is itself a finding: reflect it back plainly rather than guessing for them.
|
|
17
|
-
|
|
18
|
-
5. Stop before drafting. Do not start the work, and do not write a brief or a prompt. Once the goal is decided, state it back in one or two sentences: the decided goal, the audience, and the angle.
|
|
19
|
-
|
|
20
|
-
6. Hand off to the builder. Per SKILL.md Rule 4, control now goes to the Useful Question Builder so the decided task can be turned into a brief. If you were running mid-flow, return to prompt-builder.md, re-read it per Rule 1, and resume the interview using the decided goal. If you were running standalone, read prompt-builder.md in full and run it, carrying the decided goal in as the Goal.
|
|
21
|
-
</instructions>
|
|
22
|
-
|
|
23
|
-
<output>
|
|
24
|
-
- A map of the genuinely distinct directions the idea could take.
|
|
25
|
-
- The tensions and tradeoffs between them, and the decisions hiding inside the idea that the user had not yet made.
|
|
26
|
-
- A single decided goal, stated in one or two sentences: goal, audience, and angle.
|
|
27
|
-
- No brief, no prompt, and no execution of the task. Shaping ends the moment the goal is decided.
|
|
28
|
-
</output>
|
|
29
|
-
|
|
30
|
-
<guardrails>
|
|
31
|
-
- Do not do the task itself, and do not build a prompt. You are deciding what the work is, not expressing it and not executing it.
|
|
32
|
-
- Do not collapse the options prematurely. Give the user real, distinct choices before any steering toward one.
|
|
33
|
-
- Do not invent a goal for the user. Surface options and tensions, and let the user decide.
|
|
34
|
-
- If the idea turns out to be already well-defined, say so and hand off to the builder immediately. Not every task needs shaping.
|
|
35
|
-
- Stop before drafting. The moment the goal is decided, hand off. Do not carry on into the work.
|
|
36
|
-
</guardrails>
|
|
1
|
+
<role>
|
|
2
|
+
You are a task-shaping partner, Part 4 of a four-part prompt kit, the Task Shaper. You help people move from a fuzzy idea to a decided goal, before any brief is built. You do not build a prompt, and you do not do the task. You help the user decide what the work even is. Read SKILL.md for the shared mindset and the cross-part rules before working this part. This is the earliest stage of the kit: shaping comes before briefing.
|
|
3
|
+
</role>
|
|
4
|
+
|
|
5
|
+
<context>
|
|
6
|
+
This part runs two ways. Standalone: SKILL.md routes the user here because they have an idea, an itch, or an area to work in but have not decided what they are actually trying to do, who it is for, or the core angle. This is exploratory, creative, or judgment-heavy strategy work where the goal is not yet visible. Mid-flow from the builder: the Useful Question Builder paused because, while working the Goal field, it found the goal itself is undecided, and you arrived by a switch, so you have already re-read this file per SKILL.md Rule 1. Either way, when shaping is done you hand off to the Useful Question Builder, because a decided goal is the input a brief needs, not a finished deliverable.
|
|
7
|
+
</context>
|
|
8
|
+
|
|
9
|
+
<instructions>
|
|
10
|
+
1. Open. Ask the user what they have: the rough idea, the itch, the area they want to work in. Make clear you are not going to start the work or build a prompt yet. Your job right now is to help them decide what the work is.
|
|
11
|
+
|
|
12
|
+
2. Map the options. Surface the genuinely distinct directions the idea could take. Lay out 2 to 4 different framings, angles, or goals the idea could become, not variations of one. Make the differences sharp, so the user is choosing between real alternatives rather than rewordings.
|
|
13
|
+
|
|
14
|
+
3. Surface the tensions. Name the tradeoffs between the options: what each direction gains and gives up, who each one serves, what each one closes off. Name the decisions hiding inside the idea that the user has not made yet, such as audience, scope, and purpose. Do not smooth these over; the tensions are the point.
|
|
15
|
+
|
|
16
|
+
4. Help the user decide. Ask the user to choose a direction or narrow toward one. Push gently for a decision and do not let the task stay open. If the user genuinely cannot decide, that is itself a finding: reflect it back plainly rather than guessing for them.
|
|
17
|
+
|
|
18
|
+
5. Stop before drafting. Do not start the work, and do not write a brief or a prompt. Once the goal is decided, state it back in one or two sentences: the decided goal, the audience, and the angle.
|
|
19
|
+
|
|
20
|
+
6. Hand off to the builder. Per SKILL.md Rule 4, control now goes to the Useful Question Builder so the decided task can be turned into a brief. If you were running mid-flow, return to prompt-builder.md, re-read it per Rule 1, and resume the interview using the decided goal. If you were running standalone, read prompt-builder.md in full and run it, carrying the decided goal in as the Goal.
|
|
21
|
+
</instructions>
|
|
22
|
+
|
|
23
|
+
<output>
|
|
24
|
+
- A map of the genuinely distinct directions the idea could take.
|
|
25
|
+
- The tensions and tradeoffs between them, and the decisions hiding inside the idea that the user had not yet made.
|
|
26
|
+
- A single decided goal, stated in one or two sentences: goal, audience, and angle.
|
|
27
|
+
- No brief, no prompt, and no execution of the task. Shaping ends the moment the goal is decided.
|
|
28
|
+
</output>
|
|
29
|
+
|
|
30
|
+
<guardrails>
|
|
31
|
+
- Do not do the task itself, and do not build a prompt. You are deciding what the work is, not expressing it and not executing it.
|
|
32
|
+
- Do not collapse the options prematurely. Give the user real, distinct choices before any steering toward one.
|
|
33
|
+
- Do not invent a goal for the user. Surface options and tensions, and let the user decide.
|
|
34
|
+
- If the idea turns out to be already well-defined, say so and hand off to the builder immediately. Not every task needs shaping.
|
|
35
|
+
- Stop before drafting. The moment the goal is decided, hand off. Do not carry on into the work.
|
|
36
|
+
</guardrails>
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
<role>
|
|
2
|
-
You are a delegation clarity auditor, Part 2 of a four-part prompt kit, the Vague Ask Auditor. You review requests written for AI agents or human colleagues and diagnose what is missing, ambiguous, or likely to produce generic output, then rewrite them. You think in the six fields: goal, context, sources, constraints, quality bar, and definition of done. Your tone is direct and constructive, like a sharp colleague who wants the work to succeed. Read SKILL.md for the shared mindset and the cross-part rules before working this part.
|
|
3
|
-
</role>
|
|
4
|
-
|
|
5
|
-
<context>
|
|
6
|
-
This part runs two ways. Standalone: SKILL.md routes the user here because they already have a draft request they want audited. Chained from the builder: the Useful Question Builder just produced a prompt and handed it off per SKILL.md Rule 2, so the request to audit is that built prompt. You arrived here by a switch, so you have already re-read this file per SKILL.md Rule 1.
|
|
7
|
-
</context>
|
|
8
|
-
|
|
9
|
-
<instructions>
|
|
10
|
-
1. Get the request. If standalone, ask: "Paste the request you're about to send, or the one that already produced disappointing results. It can be for an AI, a teammate, a direct report, or a vendor. I'll audit it." Wait for it. If chained from the builder, the request is the prompt just built. Do not ask for it again.
|
|
11
|
-
|
|
12
|
-
2. Diagnose against the six fields. Goal: is the outcome named or just an activity, would two people reading this produce two different kinds of output. Context: would a smart person joining cold understand the situation, is the audience defined, is the why-now clear. Sources: are materials named, is there a hierarchy of primary versus background. Constraints: are boundaries stated, could the recipient make a technically correct but practically wrong choice because a constraint was missing. Quality bar: does the request define what good means, not just the shape of the artifact, is taste communicated. Definition of done: is the deliverable format specified, is there a stopping point or checkpoint.
|
|
13
|
-
|
|
14
|
-
3. Deliver the diagnostic in three sections. What's here: fields adequately covered, be specific about what the request gets right. What's missing: fields absent or too vague to act on, and for each gap state plainly what the recipient will most likely guess, infer, or default to if the request is sent as-is. This default-prediction is the most valuable move in the audit; it converts a vague warning into a concrete, visible cost. What's ambiguous: phrases that can be read multiple ways, words like "better", "cleaner", "strategic", "thorough", "comprehensive".
|
|
15
|
-
|
|
16
|
-
4. Ask only the critical questions. Ask the user 2 to 4 targeted questions, only for the gaps most likely to produce bad output. Do not ask about everything. Wait for the answers.
|
|
17
|
-
|
|
18
|
-
5. Rebuild the prompt, re-reading the builder first. Before producing the corrected version, re-read prompt-builder.md in full. This is SKILL.md Rule 1: you are switching back to the builder's job, so you reload the builder's instructions and assembly method. Do not patch the prompt from memory. Then rebuild the request using the builder's assembly approach, incorporating the user's answers and filling the gaps. Keep the same tone and register as the original; if the original was casual, keep it casual but clear. Do not inflate the request beyond what the task requires.
|
|
19
|
-
|
|
20
|
-
6. Show before and after, then save. Show the original and the rewritten version side by side so the user can see what changed and why. Save the rewritten prompt to a new markdown file in /mnt/user-data/outputs/, a new file rather than overwriting the original, so the before and after are both kept. Present it if present_files is available.
|
|
21
|
-
</instructions>
|
|
22
|
-
|
|
23
|
-
<output>
|
|
24
|
-
- A structured diagnostic showing what is present, missing, and ambiguous across the six fields.
|
|
25
|
-
- A brief explanation of what is likely to go wrong with the request as written.
|
|
26
|
-
- 2 to 4 targeted clarifying questions for the most critical gaps.
|
|
27
|
-
- A rewritten version of the request that fills the gaps, in the same register as the original.
|
|
28
|
-
- A before and after comparison so the user can see what changed and why.
|
|
29
|
-
</output>
|
|
30
|
-
|
|
31
|
-
<guardrails>
|
|
32
|
-
- Do not execute the request itself. You are auditing the delegation, not doing the work.
|
|
33
|
-
- Do not assume you know what the user meant. Name the ambiguity and ask. Do not silently fill it in.
|
|
34
|
-
- Be honest about what is missing, but do not manufacture problems. If three of six fields are already clear, say so.
|
|
35
|
-
- If the request is for a genuinely simple task, say it does not need a full brief and explain why it is probably fine as-is. Match overhead to stakes.
|
|
36
|
-
- Do not use prompt-engineering jargon. Frame everything as clear communication, what a smart recipient would need to do good work.
|
|
37
|
-
</guardrails>
|
|
1
|
+
<role>
|
|
2
|
+
You are a delegation clarity auditor, Part 2 of a four-part prompt kit, the Vague Ask Auditor. You review requests written for AI agents or human colleagues and diagnose what is missing, ambiguous, or likely to produce generic output, then rewrite them. You think in the six fields: goal, context, sources, constraints, quality bar, and definition of done. Your tone is direct and constructive, like a sharp colleague who wants the work to succeed. Read SKILL.md for the shared mindset and the cross-part rules before working this part.
|
|
3
|
+
</role>
|
|
4
|
+
|
|
5
|
+
<context>
|
|
6
|
+
This part runs two ways. Standalone: SKILL.md routes the user here because they already have a draft request they want audited. Chained from the builder: the Useful Question Builder just produced a prompt and handed it off per SKILL.md Rule 2, so the request to audit is that built prompt. You arrived here by a switch, so you have already re-read this file per SKILL.md Rule 1.
|
|
7
|
+
</context>
|
|
8
|
+
|
|
9
|
+
<instructions>
|
|
10
|
+
1. Get the request. If standalone, ask: "Paste the request you're about to send, or the one that already produced disappointing results. It can be for an AI, a teammate, a direct report, or a vendor. I'll audit it." Wait for it. If chained from the builder, the request is the prompt just built. Do not ask for it again.
|
|
11
|
+
|
|
12
|
+
2. Diagnose against the six fields. Goal: is the outcome named or just an activity, would two people reading this produce two different kinds of output. Context: would a smart person joining cold understand the situation, is the audience defined, is the why-now clear. Sources: are materials named, is there a hierarchy of primary versus background. Constraints: are boundaries stated, could the recipient make a technically correct but practically wrong choice because a constraint was missing. Quality bar: does the request define what good means, not just the shape of the artifact, is taste communicated. Definition of done: is the deliverable format specified, is there a stopping point or checkpoint.
|
|
13
|
+
|
|
14
|
+
3. Deliver the diagnostic in three sections. What's here: fields adequately covered, be specific about what the request gets right. What's missing: fields absent or too vague to act on, and for each gap state plainly what the recipient will most likely guess, infer, or default to if the request is sent as-is. This default-prediction is the most valuable move in the audit; it converts a vague warning into a concrete, visible cost. What's ambiguous: phrases that can be read multiple ways, words like "better", "cleaner", "strategic", "thorough", "comprehensive".
|
|
15
|
+
|
|
16
|
+
4. Ask only the critical questions. Ask the user 2 to 4 targeted questions, only for the gaps most likely to produce bad output. Do not ask about everything. Wait for the answers.
|
|
17
|
+
|
|
18
|
+
5. Rebuild the prompt, re-reading the builder first. Before producing the corrected version, re-read prompt-builder.md in full. This is SKILL.md Rule 1: you are switching back to the builder's job, so you reload the builder's instructions and assembly method. Do not patch the prompt from memory. Then rebuild the request using the builder's assembly approach, incorporating the user's answers and filling the gaps. Keep the same tone and register as the original; if the original was casual, keep it casual but clear. Do not inflate the request beyond what the task requires.
|
|
19
|
+
|
|
20
|
+
6. Show before and after, then save. Show the original and the rewritten version side by side so the user can see what changed and why. Save the rewritten prompt to a new markdown file in /mnt/user-data/outputs/, a new file rather than overwriting the original, so the before and after are both kept. Present it if present_files is available.
|
|
21
|
+
</instructions>
|
|
22
|
+
|
|
23
|
+
<output>
|
|
24
|
+
- A structured diagnostic showing what is present, missing, and ambiguous across the six fields.
|
|
25
|
+
- A brief explanation of what is likely to go wrong with the request as written.
|
|
26
|
+
- 2 to 4 targeted clarifying questions for the most critical gaps.
|
|
27
|
+
- A rewritten version of the request that fills the gaps, in the same register as the original.
|
|
28
|
+
- A before and after comparison so the user can see what changed and why.
|
|
29
|
+
</output>
|
|
30
|
+
|
|
31
|
+
<guardrails>
|
|
32
|
+
- Do not execute the request itself. You are auditing the delegation, not doing the work.
|
|
33
|
+
- Do not assume you know what the user meant. Name the ambiguity and ask. Do not silently fill it in.
|
|
34
|
+
- Be honest about what is missing, but do not manufacture problems. If three of six fields are already clear, say so.
|
|
35
|
+
- If the request is for a genuinely simple task, say it does not need a full brief and explain why it is probably fine as-is. Match overhead to stakes.
|
|
36
|
+
- Do not use prompt-engineering jargon. Frame everything as clear communication, what a smart recipient would need to do good work.
|
|
37
|
+
</guardrails>
|
|
@@ -1,207 +1,207 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: estack-read-claude-session-history
|
|
3
|
-
version: 1.0.3
|
|
4
|
-
description: (read-claude-session-history) Invoke for ANY task involving Claude Code session history, transcripts, or .jsonl files — this is the only way to read, parse, or search them; do not attempt to use Bash or Read on .jsonl directly. Use for: recovering context after /compact ("what were we doing before compact"), advisor response retrieval ("what did the advisor say"), subagent output collection ("get all subagent finals"), cross-project session search by keyword, session listing and triage, UUID and title lookup, resume-command generation, file-edit and tool-call forensics, session diff between two sessions or subagents, weekly work journal, day timeline of activity blocks and idle gaps, engagement/attention-time accounting (active vs elapsed time, break detection, parallel-chat-safe totals), recovering from .claude-backups after data loss, session count queries, and reading the last agent message before a crash or interrupt. Trigger phrases: "session history", "before compact", "what did claude do", "what did I work on", "search my sessions", "find that session", "what did the advisor say", "what did the agent edit", "from the backup", "list my sessions", "subagent outputs", "session journal", "resume previous", "which files did claude touch", "go back and look", "what did I do yesterday", "where did my day go", "timeline of my day", "how much time on", "how long did that actually take", "how much did I actually work", "active time", "time I spent".
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Read Claude Session History
|
|
8
|
-
|
|
9
|
-
Search, read, recover, and compare Claude Code session history — across the current session, prior sessions, sibling subagents, all projects, and `.claude-backups` snapshots.
|
|
10
|
-
|
|
11
|
-
Sessions are stored as `.jsonl` files. Reading them raw is hopeless: 1,000–5,000+ lines of dense JSON per session, 33+ project directories, hundreds of historical sessions. This skill wraps a single CLI that knows the entry schema and exposes ~20 modes.
|
|
12
|
-
|
|
13
|
-
## Quick start
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
PY="$HOME/.claude/skills/estack-read-claude-session-history/scripts/read_transcript.py"
|
|
17
|
-
|
|
18
|
-
# What was the last thing the agent said in this session?
|
|
19
|
-
python "$PY" --file <current-session.jsonl> --mode last
|
|
20
|
-
|
|
21
|
-
# Get a 6-line summary of any session (intent, last activity, edits, tool counts, subagent fanout)
|
|
22
|
-
python "$PY" --file <session.jsonl> --mode brief
|
|
23
|
-
|
|
24
|
-
# Recover what got cut off by the most recent /compact
|
|
25
|
-
python "$PY" --file <session.jsonl> --mode pre-compact
|
|
26
|
-
|
|
27
|
-
# Find a session by UUID prefix across all projects
|
|
28
|
-
python "$PY" --mode lookup --uuid abc123de
|
|
29
|
-
|
|
30
|
-
# Search every session in every project for a phrase
|
|
31
|
-
python "$PY" --mode search --all-projects --query "supabase migration"
|
|
32
|
-
|
|
33
|
-
# Pull subagent outputs from a fan-out investigation
|
|
34
|
-
python "$PY" --file <parent.jsonl> --mode subagent-finals
|
|
35
|
-
|
|
36
|
-
# Block-grouped timeline of a whole day across all sessions, with idle gaps
|
|
37
|
-
python "$PY" --mode timeline --date yesterday
|
|
38
|
-
|
|
39
|
-
# How much focused time did today actually consume? (your attention, not Claude's)
|
|
40
|
-
python "$PY" --mode engagement --date today
|
|
41
|
-
|
|
42
|
-
# Any mode as structured JSON for piping into the next step
|
|
43
|
-
python "$PY" --mode list --project keel --since 7d --format json
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
## Time handling — READ THIS before doing anything with time
|
|
47
|
-
|
|
48
|
-
**Every time the CLI displays is already the user's local time.** JSONL files store
|
|
49
|
-
UTC; the script converts on output. Do NOT add or subtract timezone offsets
|
|
50
|
-
yourself, do NOT cross-reference file mtimes to infer the timezone, and do NOT
|
|
51
|
-
treat raw `"timestamp"` fields from a .jsonl (which ARE UTC) as comparable to CLI
|
|
52
|
-
output. If you need a different zone, pass `--tz` (IANA name like
|
|
53
|
-
`America/New_York`, `UTC`, or an offset like `-4`) — never convert manually.
|
|
54
|
-
`--since/--until/--date` specs are interpreted in that same display timezone.
|
|
55
|
-
|
|
56
|
-
## Decision tree
|
|
57
|
-
|
|
58
|
-
```
|
|
59
|
-
What are you trying to do?
|
|
60
|
-
│
|
|
61
|
-
├─ Read the current session / one specific session
|
|
62
|
-
│ ├─ Last assistant message ──────────────────── --mode last
|
|
63
|
-
│ ├─ All advisor responses ───────────────────── --mode advisor
|
|
64
|
-
│ ├─ Content cut off by /compact ─────────────── --mode pre-compact
|
|
65
|
-
│ ├─ Full human-readable dump ────────────────── --mode dump (size-aware)
|
|
66
|
-
│ ├─ 6-line summary for triage ───────────────── --mode brief
|
|
67
|
-
│ └─ Schema/structural diagnosis ─────────────── --mode debug
|
|
68
|
-
│
|
|
69
|
-
├─ Find a session I don't have the path for
|
|
70
|
-
│ ├─ By UUID prefix ──────────────────────────── --mode lookup --uuid <prefix>
|
|
71
|
-
│ ├─ By title or first prompt ────────────────── --mode find --title|--first-prompt
|
|
72
|
-
│ └─ Generate a `claude --resume` command ───── --mode resume-cmd --uuid <prefix>
|
|
73
|
-
│
|
|
74
|
-
├─ Search content
|
|
75
|
-
│ ├─ One session ─────────────────────────────── --mode search --file …
|
|
76
|
-
│ ├─ One project ─────────────────────────────── --mode search --cwd …
|
|
77
|
-
│ ├─ All projects ────────────────────────────── --mode search --all-projects
|
|
78
|
-
│ └─ Filter to user msgs / tool-use inputs ──── --role user --in tool_use
|
|
79
|
-
│
|
|
80
|
-
├─ Forensics on a session
|
|
81
|
-
│ ├─ Chronological tool-call log ────────────── --mode changelog
|
|
82
|
-
│ ├─ Every file touched ─────────────────────── --mode file-edits
|
|
83
|
-
│ └─ Every tool call (optionally filtered) ──── --mode tool-calls --tool Bash,Edit
|
|
84
|
-
│
|
|
85
|
-
├─ Subagent (fan-out) work
|
|
86
|
-
│ ├─ List spawned subagents ─────────────────── --mode subagent-list
|
|
87
|
-
│ ├─ Get every subagent's final message ─────── --mode subagent-finals
|
|
88
|
-
│ └─ Forensics on one subagent ──────────────── --mode subagent-tools|subagent-files --subagent …
|
|
89
|
-
│
|
|
90
|
-
├─ Cross-cutting reporting
|
|
91
|
-
│ ├─ "What did I do this week?" ──────────────── --mode journal --since 7d
|
|
92
|
-
│ ├─ "What was I doing, when?" / day map ─────── --mode timeline --date yesterday
|
|
93
|
-
│ ├─ "How long did X actually take ME?" ──────── --mode engagement --date … | --project … | --file …
|
|
94
|
-
│ ├─ Count sessions matching a query ─────────── --mode count --query …
|
|
95
|
-
│ └─ Resume where I left off in this project ─── --mode resume-prev --cwd …
|
|
96
|
-
│
|
|
97
|
-
└─ Compare two sessions or two sibling subagents
|
|
98
|
-
└─ Interleaved diff ──────────────────────── --mode diff --file-a … --file-b … (or --subagents-of …)
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
## Quick reference
|
|
102
|
-
|
|
103
|
-
| Mode | Required flags | Returns |
|
|
104
|
-
|---|---|---|
|
|
105
|
-
| `last` | `--file` | Last N assistant text outputs |
|
|
106
|
-
| `advisor` | `--file` | All `advisor_tool_result` payloads |
|
|
107
|
-
| `pre-compact` | `--file` | 40 exchanges before the most recent `/compact` |
|
|
108
|
-
| `dump` | `--file` | Human-readable dump (auto-degrades on transcripts >5MB) |
|
|
109
|
-
| `search` | `--query` + scope | Matches windowed for context (supports `--role`, `--in text|tool_use|thinking|all`) |
|
|
110
|
-
| `debug` | `--file` | Entry/block type distributions + probes |
|
|
111
|
-
| `brief` | `--file` | 6-line summary: uuid·project·mtime·status / intent / last / edits / tools / subagents |
|
|
112
|
-
| `list` | `--cwd` or `--all-projects` | Rich table: mtime, size, uuid, msg count, flags, status, title |
|
|
113
|
-
| `lookup` | `--uuid <prefix>` | Absolute path (exit 1 missing, exit 2 ambiguous) |
|
|
114
|
-
| `find` | `--title` or `--first-prompt` | Sessions ranked by recency |
|
|
115
|
-
| `resume-cmd` | `--uuid <prefix>` | `cd <cwd>; claude --resume <uuid>` snippet |
|
|
116
|
-
| `changelog` | `--file` | `HH:MM:SS TOOL one-line-summary`, day-grouped |
|
|
117
|
-
| `file-edits` | `--file` | Unique paths sorted with op tags |
|
|
118
|
-
| `tool-calls` | `--file` (+ `--tool` filter) | Timestamped per-call blocks |
|
|
119
|
-
| `subagent-list` | `--file` | List sibling subagents with agentType + description |
|
|
120
|
-
| `subagent-finals` | `--file` | Every subagent's final assistant message |
|
|
121
|
-
| `subagent-tools` | `--subagent` | Forensics on one subagent |
|
|
122
|
-
| `subagent-files` | `--subagent` | Files one subagent touched |
|
|
123
|
-
| `resume-prev` | `--cwd` | Banner + dump-style tail of last 10 exchanges |
|
|
124
|
-
| `count` | `--query` (+ scope) | `<N>` to stdout, summary to stderr |
|
|
125
|
-
| `journal` | `--since` (+ scope) | Per-session 5-line block: date·uuid / prompt / ended / edits / tools |
|
|
126
|
-
| `timeline` | `--date` or `--since/--until` (defaults: today, all projects) | Map of WHAT was active WHEN: blocks + idle gaps (no attention claim — that's `engagement`) |
|
|
127
|
-
| `engagement` | `--date` or `--since/--until` or `--file` (defaults: today, all projects) | YOUR attention time: active vs elapsed + ratio per session, parallel-chat-safe totals, breaks |
|
|
128
|
-
| `diff` | `--file-a` + `--file-b` OR `--subagents-of` | Timestamp-interleaved A>/B> output |
|
|
129
|
-
|
|
130
|
-
## Global flags
|
|
131
|
-
|
|
132
|
-
- `--root {live|mirror|snapshot-24h|snapshot-1w|snapshot-1mo|<abs-path>}` — read from a `.claude-backups` mirror or snapshot instead of live. Default `live`.
|
|
133
|
-
- `--cwd <path>` — single-project scope. Use the original working directory (e.g. `"C:\Users\2supe\Other Claude Code"`).
|
|
134
|
-
- `--all-projects` — walk every project under `--root`.
|
|
135
|
-
- `--project <name>` — filter projects by name substring, case-insensitive, matches encoded or decoded form (`--project keel`, `--project "Other Claude Code"`). Works on `list`, `journal`, `search`, `count`, `find`, `timeline`, `engagement`. Use this instead of `--cwd` when you know the project's name but not its exact path. (Note: for `engagement`, scope filters which sessions are *reported* — the attention stream is always computed across all projects so parallel chats never double-count.)
|
|
136
|
-
- `--file <path>` — single-session scope.
|
|
137
|
-
- `--since <spec>` / `--until <spec>` — accepts ISO date, ISO datetime, relative (`30m`, `24h`, `7d`, `1w`, `1mo`), named (`today`, `yesterday`, `now`).
|
|
138
|
-
- `--date <spec>` — single-day window for `timeline` (`--date yesterday`, `--date 2026-06-01`).
|
|
139
|
-
- `--gap <spec>` — idle-gap threshold for `timeline` blocks (`15m` default, `1h`).
|
|
140
|
-
- `--break <spec>` — break threshold for `engagement` (`10m` default; `5m` strict, `20m` forgiving). Gaps between your prompts longer than this count as breaks unless you replied right after Claude finished working.
|
|
141
|
-
- `--tz <spec>` — display timezone override (IANA name, `UTC`, or offset like `-4`). Default: system local time.
|
|
142
|
-
- `--format json` (or `--json`) — structured JSON output on every mode (except the legacy `--list`/`--list-subagents` aliases). Pipe-friendly: paths are strings, timestamps ISO.
|
|
143
|
-
- `--exclude-current` — drop the current session (detected via `CLAUDE_SESSION_ID`) from `list`, `journal`, `search`, `count`, `timeline`, and `engagement`.
|
|
144
|
-
- `--include-subagents` — fold subagent finals into `brief`, `last`, `dump` output, each tagged `[subagent <id-short> · <agentType>]`.
|
|
145
|
-
- `--force-dump` — bypass the 5 MB `dump` guard.
|
|
146
|
-
- `-n N` — count modifier (default 5 for `last`, 80 for `dump`, 10 for `resume-prev`).
|
|
147
|
-
|
|
148
|
-
The current session is marked with `[*]` in `list` output. Status glyphs: ✓ clean, ! interrupted, ? pending-user, ● active. Sessions with a compact marker get `[C]`; sessions with subagents get `[S]`.
|
|
149
|
-
|
|
150
|
-
## Backup-aware reads
|
|
151
|
-
|
|
152
|
-
In March 2026 a Claude Code auto-update deleted live `.jsonl` transcripts (GitHub #41591). To survive that class of incident, this machine maintains four backup roots under `C:\Users\2supe\.claude-backups\`:
|
|
153
|
-
|
|
154
|
-
- `mirror` — continuous mirror
|
|
155
|
-
- `snapshot-24h` — 24-hour-old snapshot
|
|
156
|
-
- `snapshot-1w` — 1-week-old snapshot
|
|
157
|
-
- `snapshot-1mo` — 1-month-old snapshot
|
|
158
|
-
|
|
159
|
-
Any mode accepts `--root <name>`. The resolved root is printed to stderr.
|
|
160
|
-
|
|
161
|
-
```bash
|
|
162
|
-
# Find a session that was deleted from live but still in yesterday's snapshot
|
|
163
|
-
python "$PY" --root snapshot-24h --mode lookup --uuid <prefix>
|
|
164
|
-
|
|
165
|
-
# Compare today's mirror against a week ago to confirm what was lost
|
|
166
|
-
python "$PY" --root snapshot-1w --cwd "C:\Users\2supe\Other Claude Code" --list
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
See `references/recipes.md` → "Deletion-incident recovery" for the full playbook.
|
|
170
|
-
|
|
171
|
-
## Common workflows
|
|
172
|
-
|
|
173
|
-
| Need | Command |
|
|
174
|
-
|---|---|
|
|
175
|
-
| Recover advisor output that scrolled out of context | `--file <session> --mode advisor` |
|
|
176
|
-
| Get back to what you were doing before `/compact` | `--file <session> --mode pre-compact` |
|
|
177
|
-
| Fan-out triage: 14 subagents, want all of their finals | `--file <parent> --mode subagent-finals` (or `--mode brief --include-subagents`) |
|
|
178
|
-
| Find "that session where I asked about supabase rate limits" | `--mode search --all-projects --query "supabase rate limits"` |
|
|
179
|
-
| Resume a project after a few days away | `--mode resume-prev --cwd "<project path>"` |
|
|
180
|
-
| Daily/weekly journal | `--mode journal --since 7d --all-projects` |
|
|
181
|
-
| "Where did yesterday go?" (map of activity) | `--mode timeline --date yesterday` |
|
|
182
|
-
| "How much did I actually work today?" | `--mode engagement --date today` |
|
|
183
|
-
| "How much time on Keel today?" | `--mode engagement --project keel --date today` |
|
|
184
|
-
| "How long did that session take me?" | `--mode engagement --file <session.jsonl>` |
|
|
185
|
-
| Feed session data into a script | any mode + `--format json` |
|
|
186
|
-
|
|
187
|
-
See `references/recipes.md` for fuller multi-step workflows.
|
|
188
|
-
|
|
189
|
-
## Windows notes
|
|
190
|
-
|
|
191
|
-
- Use `python` (not `python3`) on this Windows setup.
|
|
192
|
-
- The script handles UTF-8 stdout/stderr internally — both PowerShell and Bash work fine for single commands.
|
|
193
|
-
- **Piping `--format json` into another command: use Bash.** PowerShell 5.1 pipes inject a UTF-8 BOM and re-encode through the console codepage, breaking `json.load` (see `references/recipes.md` §5c for the PowerShell workaround).
|
|
194
|
-
- File paths with spaces need quoting: `--cwd "C:\Users\2supe\Other Claude Code"`.
|
|
195
|
-
|
|
196
|
-
## Reference docs
|
|
197
|
-
|
|
198
|
-
- `references/modes.md` — complete per-mode reference (every flag, every example, exit codes).
|
|
199
|
-
- `references/jsonl-schema.md` — entry/block schema, subagent meta sidecars, compact-marker shape.
|
|
200
|
-
- `references/recipes.md` — multi-step workflows (post-compact recovery, find-then-dump, deletion recovery, week-in-review journal, sibling-agent diff).
|
|
201
|
-
|
|
202
|
-
## When the modes return empty
|
|
203
|
-
|
|
204
|
-
If a mode returns empty/unexpected output, run `--mode debug` first. It prints the entry-type distribution, content-block types, and probes for advisor + compact markers — useful when the transcript schema has drifted or when a session was truncated.
|
|
1
|
+
---
|
|
2
|
+
name: estack-read-claude-session-history
|
|
3
|
+
version: 1.0.3
|
|
4
|
+
description: (read-claude-session-history) Invoke for ANY task involving Claude Code session history, transcripts, or .jsonl files — this is the only way to read, parse, or search them; do not attempt to use Bash or Read on .jsonl directly. Use for: recovering context after /compact ("what were we doing before compact"), advisor response retrieval ("what did the advisor say"), subagent output collection ("get all subagent finals"), cross-project session search by keyword, session listing and triage, UUID and title lookup, resume-command generation, file-edit and tool-call forensics, session diff between two sessions or subagents, weekly work journal, day timeline of activity blocks and idle gaps, engagement/attention-time accounting (active vs elapsed time, break detection, parallel-chat-safe totals), recovering from .claude-backups after data loss, session count queries, and reading the last agent message before a crash or interrupt. Trigger phrases: "session history", "before compact", "what did claude do", "what did I work on", "search my sessions", "find that session", "what did the advisor say", "what did the agent edit", "from the backup", "list my sessions", "subagent outputs", "session journal", "resume previous", "which files did claude touch", "go back and look", "what did I do yesterday", "where did my day go", "timeline of my day", "how much time on", "how long did that actually take", "how much did I actually work", "active time", "time I spent".
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Read Claude Session History
|
|
8
|
+
|
|
9
|
+
Search, read, recover, and compare Claude Code session history — across the current session, prior sessions, sibling subagents, all projects, and `.claude-backups` snapshots.
|
|
10
|
+
|
|
11
|
+
Sessions are stored as `.jsonl` files. Reading them raw is hopeless: 1,000–5,000+ lines of dense JSON per session, 33+ project directories, hundreds of historical sessions. This skill wraps a single CLI that knows the entry schema and exposes ~20 modes.
|
|
12
|
+
|
|
13
|
+
## Quick start
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
PY="$HOME/.claude/skills/estack-read-claude-session-history/scripts/read_transcript.py"
|
|
17
|
+
|
|
18
|
+
# What was the last thing the agent said in this session?
|
|
19
|
+
python "$PY" --file <current-session.jsonl> --mode last
|
|
20
|
+
|
|
21
|
+
# Get a 6-line summary of any session (intent, last activity, edits, tool counts, subagent fanout)
|
|
22
|
+
python "$PY" --file <session.jsonl> --mode brief
|
|
23
|
+
|
|
24
|
+
# Recover what got cut off by the most recent /compact
|
|
25
|
+
python "$PY" --file <session.jsonl> --mode pre-compact
|
|
26
|
+
|
|
27
|
+
# Find a session by UUID prefix across all projects
|
|
28
|
+
python "$PY" --mode lookup --uuid abc123de
|
|
29
|
+
|
|
30
|
+
# Search every session in every project for a phrase
|
|
31
|
+
python "$PY" --mode search --all-projects --query "supabase migration"
|
|
32
|
+
|
|
33
|
+
# Pull subagent outputs from a fan-out investigation
|
|
34
|
+
python "$PY" --file <parent.jsonl> --mode subagent-finals
|
|
35
|
+
|
|
36
|
+
# Block-grouped timeline of a whole day across all sessions, with idle gaps
|
|
37
|
+
python "$PY" --mode timeline --date yesterday
|
|
38
|
+
|
|
39
|
+
# How much focused time did today actually consume? (your attention, not Claude's)
|
|
40
|
+
python "$PY" --mode engagement --date today
|
|
41
|
+
|
|
42
|
+
# Any mode as structured JSON for piping into the next step
|
|
43
|
+
python "$PY" --mode list --project keel --since 7d --format json
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Time handling — READ THIS before doing anything with time
|
|
47
|
+
|
|
48
|
+
**Every time the CLI displays is already the user's local time.** JSONL files store
|
|
49
|
+
UTC; the script converts on output. Do NOT add or subtract timezone offsets
|
|
50
|
+
yourself, do NOT cross-reference file mtimes to infer the timezone, and do NOT
|
|
51
|
+
treat raw `"timestamp"` fields from a .jsonl (which ARE UTC) as comparable to CLI
|
|
52
|
+
output. If you need a different zone, pass `--tz` (IANA name like
|
|
53
|
+
`America/New_York`, `UTC`, or an offset like `-4`) — never convert manually.
|
|
54
|
+
`--since/--until/--date` specs are interpreted in that same display timezone.
|
|
55
|
+
|
|
56
|
+
## Decision tree
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
What are you trying to do?
|
|
60
|
+
│
|
|
61
|
+
├─ Read the current session / one specific session
|
|
62
|
+
│ ├─ Last assistant message ──────────────────── --mode last
|
|
63
|
+
│ ├─ All advisor responses ───────────────────── --mode advisor
|
|
64
|
+
│ ├─ Content cut off by /compact ─────────────── --mode pre-compact
|
|
65
|
+
│ ├─ Full human-readable dump ────────────────── --mode dump (size-aware)
|
|
66
|
+
│ ├─ 6-line summary for triage ───────────────── --mode brief
|
|
67
|
+
│ └─ Schema/structural diagnosis ─────────────── --mode debug
|
|
68
|
+
│
|
|
69
|
+
├─ Find a session I don't have the path for
|
|
70
|
+
│ ├─ By UUID prefix ──────────────────────────── --mode lookup --uuid <prefix>
|
|
71
|
+
│ ├─ By title or first prompt ────────────────── --mode find --title|--first-prompt
|
|
72
|
+
│ └─ Generate a `claude --resume` command ───── --mode resume-cmd --uuid <prefix>
|
|
73
|
+
│
|
|
74
|
+
├─ Search content
|
|
75
|
+
│ ├─ One session ─────────────────────────────── --mode search --file …
|
|
76
|
+
│ ├─ One project ─────────────────────────────── --mode search --cwd …
|
|
77
|
+
│ ├─ All projects ────────────────────────────── --mode search --all-projects
|
|
78
|
+
│ └─ Filter to user msgs / tool-use inputs ──── --role user --in tool_use
|
|
79
|
+
│
|
|
80
|
+
├─ Forensics on a session
|
|
81
|
+
│ ├─ Chronological tool-call log ────────────── --mode changelog
|
|
82
|
+
│ ├─ Every file touched ─────────────────────── --mode file-edits
|
|
83
|
+
│ └─ Every tool call (optionally filtered) ──── --mode tool-calls --tool Bash,Edit
|
|
84
|
+
│
|
|
85
|
+
├─ Subagent (fan-out) work
|
|
86
|
+
│ ├─ List spawned subagents ─────────────────── --mode subagent-list
|
|
87
|
+
│ ├─ Get every subagent's final message ─────── --mode subagent-finals
|
|
88
|
+
│ └─ Forensics on one subagent ──────────────── --mode subagent-tools|subagent-files --subagent …
|
|
89
|
+
│
|
|
90
|
+
├─ Cross-cutting reporting
|
|
91
|
+
│ ├─ "What did I do this week?" ──────────────── --mode journal --since 7d
|
|
92
|
+
│ ├─ "What was I doing, when?" / day map ─────── --mode timeline --date yesterday
|
|
93
|
+
│ ├─ "How long did X actually take ME?" ──────── --mode engagement --date … | --project … | --file …
|
|
94
|
+
│ ├─ Count sessions matching a query ─────────── --mode count --query …
|
|
95
|
+
│ └─ Resume where I left off in this project ─── --mode resume-prev --cwd …
|
|
96
|
+
│
|
|
97
|
+
└─ Compare two sessions or two sibling subagents
|
|
98
|
+
└─ Interleaved diff ──────────────────────── --mode diff --file-a … --file-b … (or --subagents-of …)
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Quick reference
|
|
102
|
+
|
|
103
|
+
| Mode | Required flags | Returns |
|
|
104
|
+
|---|---|---|
|
|
105
|
+
| `last` | `--file` | Last N assistant text outputs |
|
|
106
|
+
| `advisor` | `--file` | All `advisor_tool_result` payloads |
|
|
107
|
+
| `pre-compact` | `--file` | 40 exchanges before the most recent `/compact` |
|
|
108
|
+
| `dump` | `--file` | Human-readable dump (auto-degrades on transcripts >5MB) |
|
|
109
|
+
| `search` | `--query` + scope | Matches windowed for context (supports `--role`, `--in text|tool_use|thinking|all`) |
|
|
110
|
+
| `debug` | `--file` | Entry/block type distributions + probes |
|
|
111
|
+
| `brief` | `--file` | 6-line summary: uuid·project·mtime·status / intent / last / edits / tools / subagents |
|
|
112
|
+
| `list` | `--cwd` or `--all-projects` | Rich table: mtime, size, uuid, msg count, flags, status, title |
|
|
113
|
+
| `lookup` | `--uuid <prefix>` | Absolute path (exit 1 missing, exit 2 ambiguous) |
|
|
114
|
+
| `find` | `--title` or `--first-prompt` | Sessions ranked by recency |
|
|
115
|
+
| `resume-cmd` | `--uuid <prefix>` | `cd <cwd>; claude --resume <uuid>` snippet |
|
|
116
|
+
| `changelog` | `--file` | `HH:MM:SS TOOL one-line-summary`, day-grouped |
|
|
117
|
+
| `file-edits` | `--file` | Unique paths sorted with op tags |
|
|
118
|
+
| `tool-calls` | `--file` (+ `--tool` filter) | Timestamped per-call blocks |
|
|
119
|
+
| `subagent-list` | `--file` | List sibling subagents with agentType + description |
|
|
120
|
+
| `subagent-finals` | `--file` | Every subagent's final assistant message |
|
|
121
|
+
| `subagent-tools` | `--subagent` | Forensics on one subagent |
|
|
122
|
+
| `subagent-files` | `--subagent` | Files one subagent touched |
|
|
123
|
+
| `resume-prev` | `--cwd` | Banner + dump-style tail of last 10 exchanges |
|
|
124
|
+
| `count` | `--query` (+ scope) | `<N>` to stdout, summary to stderr |
|
|
125
|
+
| `journal` | `--since` (+ scope) | Per-session 5-line block: date·uuid / prompt / ended / edits / tools |
|
|
126
|
+
| `timeline` | `--date` or `--since/--until` (defaults: today, all projects) | Map of WHAT was active WHEN: blocks + idle gaps (no attention claim — that's `engagement`) |
|
|
127
|
+
| `engagement` | `--date` or `--since/--until` or `--file` (defaults: today, all projects) | YOUR attention time: active vs elapsed + ratio per session, parallel-chat-safe totals, breaks |
|
|
128
|
+
| `diff` | `--file-a` + `--file-b` OR `--subagents-of` | Timestamp-interleaved A>/B> output |
|
|
129
|
+
|
|
130
|
+
## Global flags
|
|
131
|
+
|
|
132
|
+
- `--root {live|mirror|snapshot-24h|snapshot-1w|snapshot-1mo|<abs-path>}` — read from a `.claude-backups` mirror or snapshot instead of live. Default `live`.
|
|
133
|
+
- `--cwd <path>` — single-project scope. Use the original working directory (e.g. `"C:\Users\2supe\Other Claude Code"`).
|
|
134
|
+
- `--all-projects` — walk every project under `--root`.
|
|
135
|
+
- `--project <name>` — filter projects by name substring, case-insensitive, matches encoded or decoded form (`--project keel`, `--project "Other Claude Code"`). Works on `list`, `journal`, `search`, `count`, `find`, `timeline`, `engagement`. Use this instead of `--cwd` when you know the project's name but not its exact path. (Note: for `engagement`, scope filters which sessions are *reported* — the attention stream is always computed across all projects so parallel chats never double-count.)
|
|
136
|
+
- `--file <path>` — single-session scope.
|
|
137
|
+
- `--since <spec>` / `--until <spec>` — accepts ISO date, ISO datetime, relative (`30m`, `24h`, `7d`, `1w`, `1mo`), named (`today`, `yesterday`, `now`).
|
|
138
|
+
- `--date <spec>` — single-day window for `timeline` (`--date yesterday`, `--date 2026-06-01`).
|
|
139
|
+
- `--gap <spec>` — idle-gap threshold for `timeline` blocks (`15m` default, `1h`).
|
|
140
|
+
- `--break <spec>` — break threshold for `engagement` (`10m` default; `5m` strict, `20m` forgiving). Gaps between your prompts longer than this count as breaks unless you replied right after Claude finished working.
|
|
141
|
+
- `--tz <spec>` — display timezone override (IANA name, `UTC`, or offset like `-4`). Default: system local time.
|
|
142
|
+
- `--format json` (or `--json`) — structured JSON output on every mode (except the legacy `--list`/`--list-subagents` aliases). Pipe-friendly: paths are strings, timestamps ISO.
|
|
143
|
+
- `--exclude-current` — drop the current session (detected via `CLAUDE_SESSION_ID`) from `list`, `journal`, `search`, `count`, `timeline`, and `engagement`.
|
|
144
|
+
- `--include-subagents` — fold subagent finals into `brief`, `last`, `dump` output, each tagged `[subagent <id-short> · <agentType>]`.
|
|
145
|
+
- `--force-dump` — bypass the 5 MB `dump` guard.
|
|
146
|
+
- `-n N` — count modifier (default 5 for `last`, 80 for `dump`, 10 for `resume-prev`).
|
|
147
|
+
|
|
148
|
+
The current session is marked with `[*]` in `list` output. Status glyphs: ✓ clean, ! interrupted, ? pending-user, ● active. Sessions with a compact marker get `[C]`; sessions with subagents get `[S]`.
|
|
149
|
+
|
|
150
|
+
## Backup-aware reads
|
|
151
|
+
|
|
152
|
+
In March 2026 a Claude Code auto-update deleted live `.jsonl` transcripts (GitHub #41591). To survive that class of incident, this machine maintains four backup roots under `C:\Users\2supe\.claude-backups\`:
|
|
153
|
+
|
|
154
|
+
- `mirror` — continuous mirror
|
|
155
|
+
- `snapshot-24h` — 24-hour-old snapshot
|
|
156
|
+
- `snapshot-1w` — 1-week-old snapshot
|
|
157
|
+
- `snapshot-1mo` — 1-month-old snapshot
|
|
158
|
+
|
|
159
|
+
Any mode accepts `--root <name>`. The resolved root is printed to stderr.
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
# Find a session that was deleted from live but still in yesterday's snapshot
|
|
163
|
+
python "$PY" --root snapshot-24h --mode lookup --uuid <prefix>
|
|
164
|
+
|
|
165
|
+
# Compare today's mirror against a week ago to confirm what was lost
|
|
166
|
+
python "$PY" --root snapshot-1w --cwd "C:\Users\2supe\Other Claude Code" --list
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
See `references/recipes.md` → "Deletion-incident recovery" for the full playbook.
|
|
170
|
+
|
|
171
|
+
## Common workflows
|
|
172
|
+
|
|
173
|
+
| Need | Command |
|
|
174
|
+
|---|---|
|
|
175
|
+
| Recover advisor output that scrolled out of context | `--file <session> --mode advisor` |
|
|
176
|
+
| Get back to what you were doing before `/compact` | `--file <session> --mode pre-compact` |
|
|
177
|
+
| Fan-out triage: 14 subagents, want all of their finals | `--file <parent> --mode subagent-finals` (or `--mode brief --include-subagents`) |
|
|
178
|
+
| Find "that session where I asked about supabase rate limits" | `--mode search --all-projects --query "supabase rate limits"` |
|
|
179
|
+
| Resume a project after a few days away | `--mode resume-prev --cwd "<project path>"` |
|
|
180
|
+
| Daily/weekly journal | `--mode journal --since 7d --all-projects` |
|
|
181
|
+
| "Where did yesterday go?" (map of activity) | `--mode timeline --date yesterday` |
|
|
182
|
+
| "How much did I actually work today?" | `--mode engagement --date today` |
|
|
183
|
+
| "How much time on Keel today?" | `--mode engagement --project keel --date today` |
|
|
184
|
+
| "How long did that session take me?" | `--mode engagement --file <session.jsonl>` |
|
|
185
|
+
| Feed session data into a script | any mode + `--format json` |
|
|
186
|
+
|
|
187
|
+
See `references/recipes.md` for fuller multi-step workflows.
|
|
188
|
+
|
|
189
|
+
## Windows notes
|
|
190
|
+
|
|
191
|
+
- Use `python` (not `python3`) on this Windows setup.
|
|
192
|
+
- The script handles UTF-8 stdout/stderr internally — both PowerShell and Bash work fine for single commands.
|
|
193
|
+
- **Piping `--format json` into another command: use Bash.** PowerShell 5.1 pipes inject a UTF-8 BOM and re-encode through the console codepage, breaking `json.load` (see `references/recipes.md` §5c for the PowerShell workaround).
|
|
194
|
+
- File paths with spaces need quoting: `--cwd "C:\Users\2supe\Other Claude Code"`.
|
|
195
|
+
|
|
196
|
+
## Reference docs
|
|
197
|
+
|
|
198
|
+
- `references/modes.md` — complete per-mode reference (every flag, every example, exit codes).
|
|
199
|
+
- `references/jsonl-schema.md` — entry/block schema, subagent meta sidecars, compact-marker shape.
|
|
200
|
+
- `references/recipes.md` — multi-step workflows (post-compact recovery, find-then-dump, deletion recovery, week-in-review journal, sibling-agent diff).
|
|
201
|
+
|
|
202
|
+
## When the modes return empty
|
|
203
|
+
|
|
204
|
+
If a mode returns empty/unexpected output, run `--mode debug` first. It prints the entry-type distribution, content-block types, and probes for advisor + compact markers — useful when the transcript schema has drifted or when a session was truncated.
|
|
205
205
|
---
|
|
206
206
|
|
|
207
207
|
## Skill Feedback
|