/leaf:leaf-session-reviewfrom leaf
Reviews local Leaf agent conversations and state to surface long-horizon issues missed by unit tests. Proposes improvements to Leaf and the user's Leaf practice.
Ships in leaf. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Review recent local conversations and Leaf state to surface long-horizon issues and real user reactions that unit tests and synthetic evals miss. Produce concrete, evidence-backed proposals split between Leaf itself and the user's own practice and setup.
Run Leaf's read-only session-review survey, as leaf where the harness puts its
launcher on PATH, and otherwise as ../../bin/leaf from the directory holding this
SKILL.md:
leaf session-review --days 14
--since YYYY-MM-DD (or another --days N) for a specific window, and
--harness <name> to narrow to one harness. For busy windows, redirect stdout to a
file or pipe through jq so long output is not truncated.pages/ and deliveries/) and returns
one JSON summary: per-page engagement and event counts (pages.list), response
timings (timings), command exit statuses, findings and measured stdout bytes (cli.by_command),
background automation yield and token cost (automation), actual inline or pointer offers by harness
(deliveries.hook_offers), frozen envelopes and their thread elisions (deliveries), browser errors, and linked harness sessions with local
transcript_path and transcript_bytes.stdout_bytes.observed to see how many command runs supplied a byte count.
A hook offer records what Leaf selected. Use the transcript to check what reached
the model. The frozen envelope's current-reader size estimates what a read would
cost with the Leaf running the survey.exclusions: if unreadable_pages or unreadable_deliveries is non-zero (for
example because a sandbox blocked ~/.local/state/leaf), report what could not be
read rather than treating missing data as zero incidents.Never propose changes from aggregate numbers alone. Open the linked transcripts and
page files (events.jsonl, observations.jsonl, index.html, deliveries/*.json) to
see what was in context and how the user reacted. When the window holds many candidates,
fan out transcript reading to parallel subagents with exact session and page paths.
Focus on outcomes that tests and narrow evals cannot see:
transcript_bytes is a quick signal for long or
compacted sessions.about: "design"
comments, immediate undos, edit bursts, detached reanchors (anchor: null),
abandoned On Me items, and browser errors.page state
or index.html reads right after deliveries, ignored hooks or reminders, foreground
commands blocking incoming updates, and slow pickups or unanswered comments.clerk (turn_end_check, and page_repair for the fork it starts), line/summary
forks, and thread titles; harness-specific delivery, wake, and sandbox behavior.Read contrasts, not only failures: from pages.list, compare pages with high
refusals, errors, undos, or slow pickups against smooth multi-round pages to see what
makes collaboration click, and distinguish read_only pages (opened and read by a
human) from genuinely unopened pages (zero lifetime visits or actions).
Two practical notes when opening raw logs:
events.jsonl keys records by .kind; observations.jsonl keys by .type (mostly
high-frequency browser pointer, scroll, and resource rows, so filter by .type, e.g.
leaf_command with .refused, turn_end_check with .usage, fork_outcome,
render_pass).leaf session-review checks each harness's
standard local transcript store automatically; when transcript_path is null, look
under any custom config dir (CLAUDE_CONFIG_DIR, CODEX_HOME,
ANTIGRAVITY_APP_DATA_DIR, PI_CODING_AGENT_DIR), Codex desktop SQLite
(~/.codex/state_*.sqlite / thread_history_*.sqlite), or the harness's store for
an unrecorded session.window.leaf_version (and current
main if running inside a Leaf checkout). Drop already-fixed issues or note clearly
that they predate the current install.../leaf/SOUL.md (when present in the Leaf plugin)
when judging Leaf changes: report exposure (count, denominator, window) and severity,
prefer fixing the underlying primitive, default, or envelope over adding an
instruction rule or special-case guard, and drop rare low-severity hiccups that do
not repay their maintenance or context cost.Structure the review into four parts:
When running interactively with multiple proposals, present the review on a Leaf page
(via /leaf), putting claims and proposed changes up front and tucking raw log
evidence into <details>; otherwise reply in markdown.
Never modify user config or file a public issue without explicit approval. Before
filing a chosen Leaf proposal against max-sixty/leaf, draft an issue body stripped of
private repository names, local paths, session IDs, and confidential excerpts and show
it for review.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub max-sixty/leaf --plugin leaf2 skills in this plugin