Home
cd ../playbooks
Developer ToolsAdvanced

Multi-Stage Prompt Pipeline

A methodology for building Claude-to-Claude prompt pipelines where one stage's output feeds the next — a four-purpose taxonomy (Research/Plan/Do/Refine), per-prompt provenance folders, XML-structured outputs with required metadata tags, a fixed human-scannable SUMMARY.md, dependency-aware layered execution, and per-stage validation before anything chains forward.

10 minutes
By glittercowboy (taches-cc-resources)Source
#prompt-engineering#ai-workflows#multi-agent#pipelines#developer-tools#meta-prompting

A single mega-prompt that researches, plans, and implements all at once produces a muddle you can't iterate on — splitting the work into staged prompts, each with one job and a durable output the next stage can parse, is what makes a multi-step AI workflow reviewable and re-runnable instead of a black box.

Who it's for: developers and prompt engineers building multi-step AI workflows, anyone chaining research → plan → implement across separate Claude runs, teams who want provenance and re-runnability in their agent pipelines instead of one unauditable mega-prompt, people designing prompts whose outputs other prompts (or agents) consume programmatically

Example

"Set up a research-then-plan-then-build pipeline for our auth feature" → A Research prompt generated first (no dependencies, parallelizable), then a Plan prompt that references the research output via an @.prompts path, then a Do prompt depending on the plan — each saved to its own .prompts/ provenance folder, each emitting an XML-structured artifact for the next stage plus a four-section SUMMARY.md for humans, with each stage validated before the next one runs

CLAUDE.md Template

New here? 3-minute setup guide → | Already set up? Copy the template below.

# Multi-Stage Prompt Pipeline (Meta-Prompts)

Create prompts optimized for Claude-to-Claude pipelines — where one prompt's output is another prompt's input — across research, planning, and execution stages. Each prompt's output is structured for efficient machine parsing by the next stage, and every run also produces a short human-readable `SUMMARY.md` so a person can scan progress without reading full artifacts.

## The Core Idea

A single prompt that tries to research, plan, and implement all at once produces a muddled result and is impossible to iterate on. Splitting the work into staged prompts — each with one job, a durable output artifact, and clear provenance — makes each stage reviewable, re-runnable, and composable. The convention: each prompt gets its own folder under `.prompts/{number}-{topic}-{purpose}/` containing its output artifact (structured for the next Claude to consume) and a `SUMMARY.md` (for a human to scan).

## The Four Purposes

Every prompt has exactly one purpose. Infer it from the request's keywords, or ask if unclear:

Get new playbooks like this one

One email a week with new Claude Code workflows. Free, like everything here.

No spam. Unsubscribe anytime.

README.md

What This Does

A methodology for designing prompts that feed other prompts — the Claude-to-Claude pipeline pattern where research hands off to planning, planning hands off to implementation, and each stage's output is structured for the next stage to parse rather than re-interpret. The organizing insight is that one prompt should do one job: a mega-prompt attempting research, planning, and execution at once produces a muddled result that's impossible to iterate on, whereas staged prompts — each with a single purpose, a durable output artifact, and its own provenance folder under .prompts/ — are individually reviewable, re-runnable, and composable. Every prompt is classified by one of four purposes (Research, Plan, Do, Refine), inferred from the request's keywords or asked outright, which also determines its default dependencies.

The pipeline mechanics are what make it robust: outputs that later stages consume carry XML metadata (confidence, dependencies, open questions, assumptions) so the next Claude parses facts rather than prose; every run also emits a four-section SUMMARY.md (Key Findings, Decisions Needed, Blockers, Next Step) with a substantive one-line headline so a human can scan progress in seconds; prompts reference each other by @.prompts/ paths, which build a dependency graph that runs independent stages in parallel and dependent ones in layers; and each stage is validated (artifact exists, non-empty, required metadata present, summary complete) before its output is allowed to chain forward — a hard failure stops the chain rather than feeding a broken artifact downstream. Refine prompts version the prior output into an archive rather than overwriting it, keeping the reasoning chain intact.


Quick Start

Step 1: Create a Project Folder

mkdir prompt-pipeline && cd prompt-pipeline

Step 2: Download the Template

Click Download above, then:

mv ~/Downloads/CLAUDE.md ./

Step 3: Build a Pipeline

claude

Describe a multi-step task (e.g. "research, plan, then implement authentication"). Claude will classify each stage by purpose, generate the staged prompts into their own provenance folders with XML-structured outputs and human summaries, wire up dependencies, and validate each stage before chaining to the next.


Tips & Best Practices

  • Let the purpose taxonomy drive the split — if you can't say whether a prompt is Research, Plan, Do, or Refine, it's probably trying to do more than one of them and should be split further.
  • Insist on a substantive one-line headline in every SUMMARY.md — a generic "research completed" defeats the entire point of the summary, which is letting a human (or the next prompt) grasp the outcome without opening the full artifact.
  • Validate each stage before chaining, especially the metadata tags on research/plan outputs — a missing <open_questions> or <assumptions> block is exactly the kind of silent gap that makes the downstream plan or implementation quietly wrong.

Limitations

  • The methodology assumes a filesystem convention (.prompts/ folders, @-path references) for provenance and dependency tracking — adapting it to an environment without persistent local files means re-implementing that bookkeeping some other way.
  • It's built for genuinely multi-stage work; a single well-scoped task doesn't need the pipeline overhead and is better served by one direct prompt.
  • The source's full purpose-specific prompt patterns live in separate reference files not reproduced here — this playbook captures the portable pipeline architecture (taxonomy, provenance, output structure, dependency execution, validation), and the exact wording of each purpose's prompt template is left to your own templates.

$Related Playbooks

Developer Tools

Minimalist UI Design Skill: Editorial, Monochrome Interfaces

A frontend design system that enforces warm monochrome, bento grids, and editorial typography — the Notion/Linear look, banned from gradients, heavy shadows, and Inter

5 minutes
Beginner
Developer Tools

Mermaid Tools

Extract Mermaid diagrams from markdown files and render them to high-quality PNG images using bundled scripts — turning text diagrams into shareable visuals.

5 minutes
Beginner
Developer Tools

Minimalist MVP Scoping

Scope a weekend-shippable MVP using the manual → processized → productized progression. Build as little as possible; charge from day one.

5 minutes
Beginner
Developer Tools

n8n Workflow Builder

Automate document workflows with n8n - 7800+ workflow templates

10 minutes
Advanced
Developer Tools

Nuxt UI Component Guidance

Build interfaces correctly with @nuxt/ui v4 — five core rules (UApp wrapper, semantic colors, reading generated theme files for real slot names, override priority, icon naming), a task-to-focus-area routing table, the Nuxt UI MCP server for live component API lookups, and full installation for both Nuxt and standalone Vue.

5 minutes
Beginner
Developer Tools

Reshape PR Commits

Turn a branch's messy WIP/fixup commit history into a clean, logically-grouped set of commits before review — proposed regrouping with explicit approval, git reset --soft plus staged re-commits instead of interactive rebase, and hard guardrails (feature branches only, force-with-lease only, never touch another author's commits).

5 minutes
Intermediate
Developer Tools

Simplicity First Code Gate

A hard correctness gate against over-complex or oversized code — one ordering principle (human readability first, agent traceability second), five enforceable rules, and a pre-finish checklist that treats unnecessary complexity as a bug, not a style opinion.

2 minutes
Beginner
Developer Tools

Slidev Presentation Builder

Build developer-focused presentations with Slidev — Markdown-driven slides with live code, syntax highlighting, Monaco editor embeds, Mermaid/PlantUML diagrams, LaTeX math, click-based animations, and presenter notes, plus a quick-reference table for the exact syntax each feature needs.

5 minutes
Beginner
Developer Tools

Technical Writing Style Guide

Write docstrings, READMEs, commit messages, and PR descriptions that read like human technical documentation instead of LLM output — six concrete 'tells' with before/after rewrites, a smoothness diagnostic for prose that sounds authoritative while stating one fact three times, and industry-metaphor substitution tables ('surfaces' to 'raises/returns/logs', 'wired through' to 'passed as a parameter').

5 minutes
Intermediate
Developer Tools

Secret Scan and Rotation

Find committed credentials in a repository's working tree and full history, triage real secrets from test fixtures, and drive rotation-first remediation — with an absolute rule against ever printing a secret's actual value, even during the scan itself.

5 minutes
Intermediate
Developer Tools

Self-Improvement Loop Design

Design systems where the harness itself is the optimization target — an optimization ladder from prompt to context to workflow to harness code, a two-split empirical acceptance gate, an outside-the-loop invariant for the evaluator, and a catalog of documented reward-hacking and collapse failure modes.

10 minutes
Advanced
Developer Tools

Skill Security Inspector

Review an AI agent skill before installing it using two independent lines — static scanner evidence plus source-aware semantic judgment — checking purpose fit, permission fit, sensitive access, external transmission, execution risk, and persistence, down to a clear APPROVE, CAUTION, or REJECT verdict.

10 minutes
Intermediate

Browse all Developer Tools playbooks →