/ph-lib:reflectfrom ph-lib
Spawn parallel review subagents over the active transcript, surface learnings, and route each to a concrete edit on an existing skill.
Ships in ph-lib. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Mine the current conversation for durable learnings, then route them into skill edits.
Invoke when the user says "reflect" or "/reflect". Skip when the conversation is trivial, off-topic, or already covered by an existing skill the parent followed correctly. One-offs are not learnings.
The parent finds its own transcript file before fanning out. Claude Code keeps per-project transcripts at ${CLAUDE_CONFIG_DIR:-$HOME/.claude}/projects/<encoded-cwd>/. Do not glob across ${CLAUDE_CONFIG_DIR:-$HOME/.claude}/projects/. That crosses workspace boundaries and reads private chats from unrelated projects.
Run the finder at skills/operator-tools/reflect/scripts/find-transcript.mjs under the installed plugin with the projects directory and a fragment of the conversation's opening user prompt. claude-project-dir.mjs beside it prints this session's projects directory, wherever the shell has moved since, and finds it after /clear. Do not build <encoded-cwd> by hand: Claude Code turns every character other than an ASCII letter or digit into -, so D:\tools\x becomes D--tools-x.
dir=$(node <plugin>/skills/operator-tools/reflect/scripts/claude-project-dir.mjs) && node <plugin>/skills/operator-tools/reflect/scripts/find-transcript.mjs "$dir" "<opening prompt fragment>"
It covers the three layouts (flat <id>.jsonl, nested <id>/<id>.jsonl, subagent <parent>/subagents/<child>.jsonl), newest first, and prints the first path whose opening typed prompt carries the fragment. Do not reimplement the scan by hand: the first line of a transcript is session metadata, not a message, a session that starts with /clear or a ! shell command records that command's wrapper and output as user records before the prompt, and files run to several megabytes, so the finder streams each candidate and stops at its first typed user record. If it exits 1, write a tight digest of the session and pass that instead. The digest lists, one line each in turn order, the user's prompts and corrections, the tool calls and their results, and the files touched. It states no diagnosis, verdict, or cause. The reviewers judge the session, not your conclusions about it.
One message, three Agent calls, subagent_type: "general-purpose", explicit model: on each. Reviewers need MCP access for context lookups (tickets, chat threads, observability traces referenced in the transcript); pick a subagent_type that retains MCP access. The prompt forbids file writes; the parent applies edits.
| Lens | Tier | Prompt template |
|---|---|---|
| Judgment | judgment (see Fan-out) | references/judgment-reviewer.md |
| Tooling | judgment (see Fan-out) | references/tooling-reviewer.md |
| Divergent | judgment (see Fan-out) | references/divergent-reviewer.md |
Pass each template verbatim, substituting the transcript path or digest where marked. Add nothing beside a transcript path, not even a focus note for a long transcript. Reviewers return findings in the Agent response body.
One Agent call, subagent_type: "general-purpose", on the judgment tier (see Fan-out). Pick a subagent_type that retains MCP access — the synthesizer's quality check includes spot-verifying citations, which can require MCP access. Use references/synthesizer.md verbatim, with each reviewer's full output inlined where marked. The synthesizer returns a structured Accepted / Rejected / Backlog list.
Sanity-check the synthesizer's Accepted list. For any item that would be enforced more reliably by a lint rule, script, metadata flag, or runtime check, move it from Accepted to Backlog. See the encode-lessons-in-structure principle skill.
Before applying any Accepted edit, present the synthesizer's full Accepted/Rejected/Backlog output to the user and wait for explicit approval. The user picks which subset to apply and may redirect routings. Skill changes affect every future agent in the org; do not auto-apply.
Backlog items file to whatever devex / backlog tracker your team uses automatically. Only the Accepted list waits for approval.
For each approved Accepted item, follow the Routing field exactly:
tune description: <skill path> (the skill exists but didn't trigger when it should have): hand to plugin-dev:skill-development and run its description-optimization loop.new skill via plugin-dev:skill-development: <kebab-name>: hand creation to plugin-dev:skill-development. Do not invent the shape ad hoc.If your environment ships a SKILL.md validator, run it on every touched skill before declaring done. Skip this step if it doesn't.
Short list, no preamble:
<skill path>. What changed, one line each.<skill path>. One line each (rare).<issue title> (<tags>). One line each.Fixed at four agents. Not configurable.
| Role | Count | Tier |
|---|---|---|
| Reviewers — judgment, tooling, divergent | 3 | judgment |
| Synthesizer | 1 | judgment |
The three reviewers are not interchangeable workers whose count you tune. Each runs a distinct prompt template against a different lens, and the synthesizer expects all three. Dropping one loses that lens; adding a fourth has no template to run. Never scale the count to the size of the transcript.
judgment names an effort rung, never a specific model — the tier-to-model
mapping is per-harness.
agents/openai.yaml (opens in a new tab)references/divergent-reviewer.md (opens in a new tab)references/judgment-reviewer.md (opens in a new tab)references/synthesizer.md (opens in a new tab)references/tooling-reviewer.md (opens in a new tab)scripts/claude-project-dir.mjs (opens in a new tab)scripts/claude-project-dir.test.mjs (opens in a new tab)scripts/find-transcript.mjs (opens in a new tab)scripts/find-transcript.test.mjs (opens in a new tab)scripts/remove-during.test-helper.mjs (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub mattlindell/photon-plugins --plugin ph-lib14 skills in this plugin
/automate-meDraft or revise a personal -mode skill that captures how you work, optionally pulling evidence from recent transcripts./broRestate the last message in plain human language, with no jargon./cavemanUltra-compressed communication mode. Cuts token usage ~75% by dropping filler, articles, and pleasantries while keeping full technical accuracy.
/codebase-designShared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary./handoffCompact the current conversation into a handoff document for another agent to pick up./recallReconstruct your recent working context from chat history, live state, and the shared record, then hand back a tight current-state brief.