协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
relay【开发与工程】Session relay — compresses what's been done so far (writes a one-liner for /compact) and generates a "next task" prompt (a baton) for the user to hand off. Use on requests like "relay / hand off / next session / continue after compact / baton / handoff / clean up context and continue next task." Does not run /compact itself (a skill cannot do that) —…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Think of a relay race: the runner hands off the baton before stopping. Before context fills up, this skill produces two things: ① a one-line
/compactcommand that compresses everything so far, and ② a handoff document (a "baton") that lets the next session start running immediately on the next task.
When: context is 70%+ used, work is about to be interrupted, or the user asks to "relay / hand off / next session / baton / handoff."
Important (invariant): this skill never runs /compact directly (a skill cannot execute /compact).
It only produces the one-liner the user pastes in.
Let $SKILL be the absolute path of the directory containing this SKILL.md. Scripts live in $SKILL/scripts/.
From $ARGUMENTS:
--new-session (for a brand-new session — instructs the user to paste the whole baton), --no-ask (skip the clarifying question), --quick (skip prose, skeleton only), --copy (opt-in clipboard copy — off by default, see §6).Run bash "$SKILL/scripts/relay-collect.sh" → capture one JSON object. (facts about git/plan/session-summary/tasks/artifacts)
This JSON is the source of truth for every "fact." Do not retype it from memory — quote it verbatim.
If NEXT_TASK is empty and --no-ask was not passed, ask one AskUserQuestion:
"What's the first thing to do next?" — options pulled from plan.next_unchecked / session_summary.next_steps
/ tasks.items in the collect JSON, plus "type it myself." Tag the answer [from-user].
/compact one-linerbash "$SKILL/scripts/relay-build-focus.sh" "<NEXT_TASK>" "<files>" "<decision>"
<files> = key files relevant to the next task (space/comma separated, optional).<decision> = one line capturing a key decision to preserve (optional).bash "$SKILL/scripts/relay-write-baton.sh" "<NEXT_TASK>" <path-to-collect.json or -> "<focus line>"
-.--quick)Follow references/next-prompt-spec.md to write §2 (context needed) and §4 (repro pitfalls), plus §1's body.
[from-claude].---§4--- marker to separate §2/§4), then re-run
write-baton with the prose file as the 4th argument to splice it in.(a) absolute path of the baton
(b) preview of the next prompt — excerpt from §1 MISSION
(c) the /compact one-liner, output as a single fenced code block, verbatim
Never write (c) inline. A long inline line wraps in the terminal and becomes hard to select and copy. A code block keeps it as one selectable unit.
--copy, which sets RELAY_COPY=1 on the write-baton
call in step 4. Even then, still emit the (c) code block.--new-session, instead of (c), tell the user to paste the entire baton into the new session (path from (a))./compact directly — the skill only produces the one-liner.~).hooks/post-compact-restore.sh is wired to settings.json's SessionStart (matcher "compact"). Right after
/compact, this hook injects the pointer (the carryover left by write-baton) into the session exactly once
(consume-once).
references/next-prompt-spec.md (SSOT)scripts/relay-lib.sh, relay-collect.sh, relay-build-focus.sh, relay-write-baton.shhooks/post-compact-restore.shtests/relay.bats uses bats-core. It is not required to use the
skill — only to run the test suite locally (bats tests/relay.bats from skills/relay/). If bats isn't
installed, the scripts still work standalone; just skip the test run.