shine-pipeline
Compose skills into a sequential pipeline — skill-a → skill-b → skill-c
Example:
/shine-pipeline shine-lead-enrich shine-cold-email shine-followup-draft
→ enrich leads → draft cold emails → draft follow-ups, all in one command, all sharing context. </objective>
<execution_context> @~/.claude/shine/references/ui-brand.md </execution_context>
<context> Arguments: an ordered list of skill names (2 or more). Each must exist at `~/.claude/skills/<name>/SKILL.md`.Shared scratchpad: .planning/pipeline-<timestamp>.md in the current working directory. Each step appends its summary + any structured output to this file, and the next step reads it before starting.
No magic data transform — skills that naturally produce markdown/tables compose best. Skills that only mutate the filesystem still work (they just contribute a brief summary to the scratchpad). </context>
<execution_flow>
-
Validate arguments. Require at least 2 skill names. Check each has a
SKILL.md. If any is missing, list them and stop. -
Initialize scratchpad.
TS=$(date +%Y%m%d-%H%M%S) SCRATCH=".planning/pipeline-$TS.md" mkdir -p .planning printf "# SHINE Pipeline — %s\n\n**Steps:** %s\n\n" "$TS" "$*" > "$SCRATCH" -
Run each skill in order. For step
i(skillS_i):- Append
## Step i: S_iheader to scratchpad. - Invoke the skill via
Skill(S_i)with the scratchpad path passed as context. - After it returns, append its result summary (last structured output block) to the scratchpad under
### Output. - If the skill fails or returns empty, pause and ask the user: "Step i (
S_i) returned no output. Continue with next step, retry, or abort?"
- Append
-
Final summary. After the last step, print:
- Pipeline duration.
- List of steps with ✅ / ⚠️ per step.
- Path to the scratchpad.
-
Cleanup. Leave the scratchpad in place — it's a reviewable artifact, not a temp file. </execution_flow>
<error_handling>
- Missing skill: list all missing skills at once, exit without starting. Don't run partially.
- Step failure: pause, show last 20 lines of output, offer retry/skip/abort.
- Scratchpad unwritable: fall back to
$TMPDIR/shine-pipeline-<ts>.mdand warn. - User abort mid-pipeline: leave scratchpad with
**ABORTED at step i**marker so the run is debuggable. </error_handling>
<output_format> Final summary block:
## Pipeline complete — <TS>
| # | Skill | Status | Notes |
|---|-------|--------|-------|
| 1 | shine-lead-enrich | ✅ | 42 leads enriched |
| 2 | shine-cold-email | ✅ | 42 drafts ready |
| 3 | shine-followup-draft | ⚠️ | paused — needs review |
**Scratchpad:** .planning/pipeline-<TS>.md
**Duration:** 3m 12s
</output_format>
<structured_returns> Exit 0 if all steps completed or were user-skipped. Exit 1 if any step was aborted or failed without user resolution. </structured_returns>