reflect
Spawn three parallel review subagents over the active transcript, surface learnings, and route each to a concrete edit on an existing skill. Use when the user says reflect.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 5
- Forks
- 0
01 前言 Front Matter
- name
- reflect
- description
- Spawn three parallel review subagents over the active transcript, surface learnings, and route each to a concrete edit on an existing skill. Use when the user says reflect.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/divergent-reviewer.md3.6 KB
- 参考文档references/judgment-reviewer.md3.1 KB
- 参考文档references/synthesizer.md4.0 KB
- 参考文档references/tooling-reviewer.md4.4 KB
03 SKILL.md 正文
Reflect
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.
1. Locate the active transcript
Before fanning out, find this conversation's transcript among this workspace's Pi session files and pi-pstack subagent transcripts, at the paths the system prompt names. Do not glob across other workspaces' session directories. That crosses workspace boundaries and reads private chats from unrelated projects.
ls -t <sessions>/*.jsonl <subagents>/*.jsonl 2>/dev/null | head -10
That covers this workspace's Pi session files (<sessions>/*.jsonl) and subagent transcripts (<subagents>/*_<agent id>.jsonl). Each file holds one entry per line: the first is a session header, and conversation turns have type: "message". For each candidate, read its first user message entry. Take the file whose first user message text contains the conversation's opening user prompt. If none matches, pass a tight digest of the session instead.
2. Spawn three reviewers in parallel
One message, three Task calls, subagent_type: generalPurpose, readonly unset (readonly: false). Reviewers need MCP access to look up the tickets, chat threads, and observability traces the transcript references, and readonly strips MCPs.
Each reviewer and the synthesizer name a role line in the model rule at the path the system prompt names and a default. Set model to that line's value, or to the default if the rule or the line is missing. Leave model unset when the value is auto or inherit-parent. If the Task tool rejects a slug, use the default and say so. If it rejects the default, use the closest valid slug of the same family from its error message. Pick each subagent's reasoning level (the :<level> suffix), and fast or standard speed when the model has a -fast variant, for the job, per the Subagents section of the poteto-mode skill.
| Lens | Role line | Default model |
Prompt template |
|---|---|---|---|
| Judgment | reflect judgment, divergent, synthesizer |
claude-opus-5-5:xhigh |
references/judgment-reviewer.md |
| Tooling | reflect tooling |
grok-4.7[effort=xhigh,fast=true] |
references/tooling-reviewer.md |
| Divergent | reflect judgment, divergent, synthesizer |
claude-opus-5-5:xhigh |
references/divergent-reviewer.md |
Pass each template verbatim, substituting the transcript path or digest where marked. Reviewers return findings in the Task response body.
3. Synthesize
One Task call, subagent_type: generalPurpose, model from the reflect judgment, divergent, synthesizer line (default claude-opus-5-5:xhigh), readonly unset (readonly: false). It spot-verifies citations through MCP, and readonly strips MCPs. Pass references/synthesizer.md verbatim, with each reviewer's full output inlined where marked. It returns an Accepted / Rejected / Backlog list.
4. Structural enforcement check
Move any Accepted item that a lint rule, script, metadata flag, or runtime check would enforce more reliably to Backlog. See the encode-lessons-in-structure principle skill.
5. Apply
Present the synthesizer's full Accepted / Rejected / Backlog output and wait for explicit approval before applying any Accepted edit. The user picks the subset and may redirect routings. Skill changes affect every future agent in the org. Do not auto-apply.
File each Backlog item to your team's devex or backlog tracker without waiting. Only the Accepted list waits for approval.
Never edit a skill inside an installed package such as pi-pstack. Before approval, show its destination, .pi/skills/<skill>/ or ~/.pi/agent/skills/<skill>/. After approval, copy the skill folder there and edit the copy. Never open a PR or push.
Follow each approved row's Routing exactly:
- Trivial existing-skill edit (a one-line bullet, a tightened sentence, a stale fact corrected): the parent does it directly.
- Substantive existing-skill edit (a new section, a new pattern table, more than ~10 lines): hand to the
create-skillskill and run its draft / test / iterate loop. tune description: <skill path>(the skill exists but didn't trigger when it should have): hand tocreate-skilland run its description-optimization loop.new skill via create-skill: <kebab-name>: hand creation tocreate-skill. Do not invent the shape ad hoc.
If your environment ships a SKILL.md validator, run it on every touched skill before declaring done.
6. Summarize for the user
Short list, no preamble:
- Edits applied:
<skill path>. What changed, one line each. - New skills created:
<skill path>. One line each (rare). - Backlog filed to the devex tracker:
<issue title>(<tags>). One line each. - Dropped: one line per rejected finding + reason from the synthesizer.
04 同仓库更多 Skills
plant
暂无简介
vitest-best-practices
Use when writing or reviewing Vitest tests, fixing flaky or slow tests, debugging failures, structuring suites, writing assertions (toBe vs toEqual vs toStrictEqual, asymmetric matchers, expect.soft, expect.poll, vi.waitFor), testing async code, setup/teardown hooks, test context and fixtures (test.extend, aroundEach), mocking (vi.fn, vi.spyOn, vi.mock, vi.hoisted, vi.when, classes), fake timers and dates, globals and env stubs, network mocking with MSW, file system mocking, snapshots, type testing (expectTypeOf), DOM environments (jsdom, happy-dom), Browser Mode, component testing (React, Vue, Svelte), benchmarking, database/integration tests, test tags and filtering, configuration and projects (monorepos), parallelism and performance, coverage, reporters, CI sharding, or migrating from Jest or Vitest 4. Targets Vitest 5.x.
plant-run
A planted skill whose blocks compile; one test fails, one is compile-only, and one never runs.
nope
A planted skill whose every file holds a mistake the gate must report, one class of mistake per block.
compose-robolectric-best-practices
Use when writing or reviewing Jetpack Compose UI tests that run on the JVM with Robolectric, fixing flaky or slow Compose tests, debugging test failures, structuring suites, choosing finders and semantics matchers (onNodeWithText, onNodeWithTag, hasX, useUnmergedTree), assertions, actions and gestures (performClick, performTextInput, performTouchInput, performScrollTo), synchronization (waitForIdle, waitUntil, mainClock, the v2 StandardTestDispatcher test APIs), JUnit rules and fixtures, screen robots, fakes and test data, ViewModel and StateFlow screens, navigation (Navigation Compose, Navigation 3), lists and scrolling, text fields and forms, dialogs and popups, animations and the test clock, configuration changes (qualifiers, dark mode, locale, RTL, font scale, state restoration), View interop, activities, intents, permissions and back press, screenshot tests with Roborazzi, accessibility checks, Robolectric configuration (@Config, sdk, qualifiers, looper and graphics modes), CI, performance, coverage, or migrating from the v1 Compose test APIs. Targets Compose BOM 2026.09 (ui-test 1.12) and Robolectric 4.17.
create-skill
Create Cursor Agent Skills. Use when authoring a new skill or asking about SKILL.md structure.