Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问许可证需确认审计通过

prompt-pipeline提示管道

Agent Skill

用于辅助提示词、系统指令、Agent 行为约束和工作流模板的整理。它适合让 Agent 规范任务边界、统一输出格式、拆分操作步骤或优化提示词可复用性。使用时需要保留真实业务约束,不要把示例当硬规则;涉及自动执行、外部工具或高风险操作时,应在提示词中明确确认步骤、权限边界和失败处理方式。

总安装

303

周安装

13

GitHub Stars

781

下载量

106
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:prompt-pipeline(提示管道)
来源仓库:https://github.com/juliusbrussee/cavekit
仓库路径:skills/prompt-pipeline
安装命令:
npx skills add https://github.com/juliusbrussee/cavekit --skill prompt-pipeline
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/juliusbrussee/cavekit --skill prompt-pipeline

简介

构建端到端的提示处理与执行流水线。

  • 支持模块化组合不同预处理和后处理步骤。
  • 适用于批量作业与高并发请求场景。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。
  • 配置灵活但学习曲线较陡峭。prompt-pipeline 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 运维监控能力较弱,需额外搭建日志系统。

SKILL.md

Prompt Pipeline Design

The prompt pipeline is the engine of SDD. Each numbered prompt drives one phase of the Hunt lifecycle (Spec, Plan, Implement, Iterate, Monitor). Prompts are structured markdown files that instruct an AI agent to perform a specific phase, with detailed information delegated to specs, plans, and reference materials.

Core principle: Prompts should be as lightweight and systemic as possible. They define the *process*, not the *content* -- specs and plans hold the content.


1. Greenfield Pattern (3-Prompt Pipeline)

For new projects starting from reference materials (PRDs, language specs, design docs, research).

Pipeline Flow:
  refs/ ──> [001] ──> specs/ ──> [002] ──> plans/ ──> [003] ──> src/ + tests/
                                   ^                     |
                                   |                     |
                                   +── impl/ <───────────+
                                   (bidirectional flow)
Prompt FileLifecycle StageReads FromWrites ToDescription
001-generate-specs-from-refs.mdSpeccontext/refs/context/kits/Reads reference materials, decomposes into domain-specific specs with cross-references and testable acceptance criteria
002-generate-plans-from-specs.mdPlancontext/kits/ + context/impl/context/plans/Reads specs plus implementation progress, creates framework-specific plans with feature dependencies, test strategies, and acceptance criteria
003-generate-impl-from-plans.mdImplementcontext/plans/ + context/kits/src/, tests/, context/impl/Implements the highest-priority unblocked work from plans, runs tests, updates implementation tracking

Key behaviors

  • Prompt 001 runs once or a few times to stabilize specs. It reads context/refs/ and produces context/kits/.
  • Prompt 002 reads specs and any existing implementation tracking (context/impl/). It produces plans that sequence the work.
  • Prompt 003 reads plans and specs, implements code, runs validation gates, and updates context/impl/ with progress.
  • Prompts 002 and 003 modify each other's files. This bidirectional flow is expected and healthy -- it is how the system self-corrects.

Example prompt 001 structure

# 001: Generate Specs from Reference Materials

## Runtime Inputs
- Framework: {FRAMEWORK}
- Build command: {BUILD_COMMAND}
- Test command: {TEST_COMMAND}

## Context
Read all files in `context/refs/`. These are the source of truth.

## Task
Decompose the reference materials into domain-specific specifications:
1. Create `context/kits/cavekit-overview.md` as the index file
2. Create one `context/kits/spec-{domain}.md` per domain
3. Each spec must include: Scope, Requirements with Acceptance Criteria, Dependencies, Out of Scope, Cross-References

## Exit Criteria
- [ ] All domains from reference materials have corresponding spec files
- [ ] Every requirement has at least one testable acceptance criterion
- [ ] cavekit-overview.md indexes all spec files with one-line summaries
- [ ] Cross-references link related specs

## Completion Signal
<all-tasks-complete>

2. Rewrite Pattern (6-9 Prompt Pipeline)

For projects that start from existing code that must be reverse-engineered into specs before building a new implementation.

Pipeline Flow:
  old-code ──> [001] ──> reference/ ──> [002] ──> specs/ ──> [003] ──> validated specs
                                                                            |
       +────────────────────────────────────────────────────────────────────+
       |
       v
  specs/ ──> [004] ──> plans/ ──> [005] ──> src/ + tests/ ──> [006] ──> updated specs
                                                                            |
       +────────────────────────────────────────────────────────────────────+
       |
       v
  (loop back to 002 for refinement)
Prompt FileLifecycle StageReads FromWrites To
001-generate-refs-from-code.mdPre-SpecOld application sourceshared-context/reference/ (API docs, data models, UI components)
002-generate-specs.mdSpecFeature scope + reference materialsshared-context/kits/ (implementation-agnostic specs)
003-validate-specs.mdSpec QAReference + specsValidation report (specs match old behavior)
004-create-plans.mdPlanSpecs + framework researchcontext/plans/ (framework-specific plans)
005-implement.mdImplementPlans + specssrc/ + tests/ + context/impl/
006-backpropagate.mdIterateWorking prototypeUpdated specs (back-propagates to 002)

Rewrite-specific considerations

  • Prompt 001 only runs once -- it extracts reference documentation from the old codebase.
  • Prompt 003 is a validation pass -- it does not produce code, only a report on spec accuracy.
  • Prompt 006 creates a feedback loop: prototype learnings flow back into specs, which then flow forward through 004 and 005 again.
  • The rewrite pipeline supports multi-repo strategies: shared specs can drive implementations in multiple frameworks simultaneously (e.g., evaluating framework A vs framework B using the same specs).

3. Shared Principles Across All Pipelines

These principles apply regardless of whether the pipeline is greenfield, rewrite, or hybrid.

PrincipleDetail
One prompt per Hunt phaseEach prompt maps to exactly one phase. Do not combine phases.
Explicit input/output directoriesEvery prompt declares what it reads and what it writes. No implicit side effects.
Git-based continuityAgents read git history (git log, git diff, git status) between iterations to understand what was done before.
Explicit done-conditions with termination markersEvery prompt concludes with a verifiable checklist of conditions and a distinct output token that the iteration loop uses to detect completion.
Bidirectional spec/plan updatesPlan prompts read impl tracking; implement prompts update plans. This cross-pollination is healthy.
Test generation on changed filesAfter modifying source files, run test generation to maintain coverage.
Phase gates between promptsBefore moving to the next prompt, verify: build passes, tests pass, acceptance criteria met.

The bidirectional flow in detail

Prompt 002 (Plans):
  READS:  context/kits/     (what to build)
  READS:  context/impl/      (what has been built, what failed)
  WRITES: context/plans/     (how to build it)

Prompt 003 (Implement):
  READS:  context/plans/     (how to build it)
  READS:  context/kits/     (acceptance criteria)
  WRITES: src/, tests/       (the code)
  WRITES: context/impl/      (progress tracking)
  WRITES: context/plans/     (updates to plans based on implementation reality)

This means running prompt 002 again after prompt 003 will incorporate implementation learnings into plans. Running prompt 003 again after prompt 002 will implement updated plans. This is exactly the convergence loop at work.


4. Prompt Engineering Best Practices

4.1 Runtime Inputs

Use runtime variables so prompts work across any project without modification:

## Runtime Inputs
- Framework: {FRAMEWORK}           # e.g., "React + Vite", "Tauri + Svelte"
- Build command: {BUILD_COMMAND}   # e.g., "npm run build", "cargo build"
- Test command: {TEST_COMMAND}     # e.g., "npm test", "pytest"
- Lint command: {LINT_COMMAND}     # e.g., "npm run lint", "cargo clippy"
- Source dir: {SRC_DIR}            # e.g., "src/", "lib/"
- Test dir: {TEST_DIR}            # e.g., "tests/", "__tests__/"

4.2 Agent Team Structure (ASCII Trees)

When prompts use agent teams, define the hierarchy explicitly as an ASCII tree:

Agent Team Structure:
  Lead (delegate mode -- never writes code directly)
  +-- Teammate A: domain-auth
  |   Owns: src/auth/*, context/impl/impl-auth.md
  |   Dispatch: Agent tool
  +-- Teammate B: domain-data
  |   Owns: src/data/*, context/impl/impl-data.md
  |   Dispatch: Agent tool
  +-- Teammate C: domain-ui
      Owns: src/ui/*, context/impl/impl-ui.md
      Dispatch: Agent tool

Why: Agents need to understand their role and what they own. Dispatch subagents via the Agent tool. After merging a subagent's branch, the caller must clean up: git branch -D <branch>.

4.3 Batching Rules

  • Max 3 concurrent teammates per batch. Prevents resource exhaustion and race conditions.
  • Batch phases: Spawn batch 1 (3 teammates) -> wait for completion -> shutdown -> spawn batch 2.
  • Max 3 sub-agents per teammate. Sub-agents handle discrete subtasks (reading docs, running tests) to preserve the teammate's context window.
Execution Timeline:
  Batch 1: [Teammate A] [Teammate B] [Teammate C]
           ─────────────────────────────────────────> complete, shutdown
  Batch 2: [Teammate D] [Teammate E] [Teammate F]
           ─────────────────────────────────────────> complete, shutdown

4.4 File Ownership Tables

Assign each shared file to exactly one teammate to eliminate merge conflicts:

## File Ownership
| File/Pattern | Owner |
|-------------|-------|
| `src/auth/**` | domain-auth |
| `src/data/**` | domain-data |
| `src/ui/**` | domain-ui |
| `src/shared/types.ts` | domain-data |
| `context/impl/impl-auth.md` | domain-auth |

Rule: If two teammates need to modify the same file, assign ownership to one and have the other request changes through the lead.

4.5 Exit Criteria and Completion Signals

Every prompt must end with explicit exit criteria and a completion signal:

## Exit Criteria
- [ ] All T- tasks are DONE or documented as BLOCKED
- [ ] {BUILD_COMMAND} passes with zero errors
- [ ] {TEST_COMMAND} passes with zero failures
- [ ] All modified source files have corresponding test coverage
- [ ] context/impl/ updated with current status

## Completion Signal
When ALL exit criteria are met, output exactly:
<all-tasks-complete>

This signal is used by the iteration loop to detect when to stop.

4.6 Spawn Templates

Teammates are fresh processes with no inherited history. Every spawn must include full context:

## Spawn Template for Teammate

You are implementing {DOMAIN} for the {PROJECT_NAME} project.

### Your Role
- You own: {FILE_PATTERNS}
- Dispatched via the Agent tool
- Your impl tracking: context/impl/impl-{DOMAIN}.md

### Context to Read First
1. context/kits/spec-{DOMAIN}.md (WHAT to build)
2. context/plans/plan-{DOMAIN}.md (HOW to build it)
3. context/impl/impl-{DOMAIN}.md (what has been done)
4. git log --oneline -20 (recent history)

### Task
{TASK_DESCRIPTION}

### Exit Criteria
- [ ] {CRITERIA}

### Halting Conditions
- Do NOT push to remote unless explicitly asked
- Do NOT modify files outside your ownership
- If blocked for more than 20 minutes, document the blocker and stop

4.7 Halting Conditions

Explicit halting conditions prevent irreversible or wasteful actions:

## Halting Conditions
- Do NOT push to remote unless explicitly asked
- Do NOT modify files outside your file ownership table
- Do NOT delete test files or skip failing tests
- If a task takes more than 20 minutes, document findings and move on
- If you encounter a circular dependency, document it and stop
- Commit frequently to preserve progress

4.8 Sub-Agent Delegation

Teammates should delegate discrete subtasks to sub-agents to preserve their own context window:

## When to Use Sub-Agents
- Reading large documentation files
- Running and parsing test output
- Generating boilerplate code
- Researching framework APIs
- Performing file-by-file migrations

## Sub-Agent Rules
- Max 3 concurrent sub-agents per teammate
- Each sub-agent gets a focused, self-contained task
- Sub-agent results are summarized back to the teammate
- Sub-agents do NOT inherit the teammate's conversation history

5. Task Template Standardization

Use standardized task templates for consistent tracking across prompts:

Task ID format

### T-{DOMAIN}-{NUMBER}: {Task Title}
- **Status:** TODO | IN_PROGRESS | DONE | BLOCKED
- **blockedBy:** T-{OTHER_DOMAIN}-{NUMBER} (if applicable)
- **Files:** {list of files to create or modify}
- **Acceptance criteria:**
  - [ ] {criterion 1}
  - [ ] {criterion 2}

Dependency tracking with blockedBy

### T-AUTH-001: Implement login flow
- **Status:** TODO
- **blockedBy:** T-DATA-001 (needs user model)

### T-DATA-001: Create user data model
- **Status:** IN_PROGRESS
- **blockedBy:** none

Conditional and dynamic tasks

### T-UI-005: Implement dark mode [CONDITIONAL]
- **Skip if:** {FRAMEWORK} does not support CSS variables
- **Status:** TODO

### T-PERF-001: Optimize hot paths [DYNAMIC]
- **Created when:** Performance gate identifies bottlenecks
- **Status:** not yet created

[CONDITIONAL] tasks include a skip condition -- if the condition is met, the task is skipped without failure.

[DYNAMIC] tasks are placeholders created at runtime when a specific trigger occurs. They do not exist in the initial plan.


6. Time Guards

Per-task time budgets prevent agents from spending too long on any single task:

CategoryBudgetExamples
Mechanical10 minutesFile creation, boilerplate, simple refactors
Investigation20 minutesDebugging, researching APIs, understanding existing code
Category budget20 minutesTotal time for all tasks in one category before escalating

Time guard rules

  1. Set expectations in the prompt: ## Time Guards - Mechanical tasks (file creation, boilerplate): 10 min max - Investigation tasks (debugging, research): 20 min max - If you hit a time guard, document your findings and move to the next task - Do NOT silently retry -- document the blocker
  2. Hard stops: When a time guard is hit, the agent must:

- Document what was attempted - Document what was learned - Document the blocker or open question - Move to the next unblocked task

  1. Escalation: If an agent hits time guards on multiple related tasks, this signals a systemic issue (fuzzy spec, missing dependency, architectural problem). Document it as a pattern, not individual failures.

7. Prompt File Naming Convention

context/prompts/
+-- 000-generate-specs-from-code.md    # Brownfield only (bootstrap, runs once)
+-- 001-generate-specs-from-refs.md    # Greenfield spec generation
+-- 002-generate-plans-from-specs.md   # Plan generation
+-- 003-generate-impl-from-plans.md    # Implementation
+-- 004-validate-specs.md              # Spec validation (rewrite pipelines)
+-- 005-backpropagate.md               # Back-propagation (rewrite pipelines)

Naming rules

  • Three-digit prefix for ordering (000, 001, 002...)
  • Verb-noun format describing the transformation (generate-specs-from-refs)
  • Lower prompt numbers are upstream (closer to specs)
  • Higher prompt numbers are downstream (closer to code)
  • 000 is reserved for brownfield bootstrap (runs once, not in the main loop)

8. Designing Your Pipeline

Step-by-step process

  1. Identify your project type: Greenfield (start from refs) or Rewrite (start from old code)?
  2. Start with the minimum pipeline: Greenfield = 3 prompts. Rewrite = 6 prompts.
  3. Write prompt 001 first: This is always the spec generation step.
  4. Define your runtime variables: What framework, build command, test command?
  5. Set exit criteria for each prompt: What must be true before moving to the next phase?
  6. Add agent teams if needed: For large projects, add team structure and file ownership.
  7. Run the pipeline with the iteration loop: Start with a small number of iterations (3-5) and increase as needed.
  8. Watch for convergence: Exponentially decreasing changes = convergence. Flat or oscillating changes = fix your specs.

When to add more prompts

  • If a single prompt is trying to do too much (reading AND writing specs, for example), split it.
  • If you see a phase producing inconsistent results, add a validation prompt between phases.
  • If back-propagation is frequent, add an explicit back-propagation prompt (006 in the rewrite pattern).

9. Iteration Loop Integration

Prompts are designed to run inside an iteration loop that repeats them until convergence:

# Greenfield: Run implementation prompt with iteration loop
# -n 10: max 10 iterations
# -t 1h: 1 hour timeout per iteration
iteration-loop context/prompts/003-generate-impl-from-plans.md -n 10 -t 1h

# Leader-follower pattern: staggered pipeline
# Terminal 1: Specs (leader)
iteration-loop context/prompts/001-generate-specs-from-refs.md -n 5 -t 2h

# Terminal 2: Plans (follower, 1h delay)
iteration-loop context/prompts/002-generate-plans-from-specs.md -n 5 -t 2h -d 1h

# Terminal 3: Implementation (follower, 2h delay)
iteration-loop context/prompts/003-generate-impl-from-plans.md -n 10 -t 1h -d 2h

The iteration loop handles: iteration counting, timeouts, nudging idle agents, detecting completion signals, and graceful stop on convergence.


Cross-References

  • Prompt engineering details: See references/prompt-engineering.md for the complete reference on runtime inputs, spawn templates, task templates, time guards, and file ownership.
  • Agent team patterns: See references/agent-team-patterns.md for coordination patterns, batching, agent isolation, and merge protocol.
  • Convergence monitoring: See ck:convergence-monitoring skill for detecting when the iteration loop should stop.
  • Revision: See ck:revision skill for how prompt 006 traces bugs back to specs.
  • Context architecture: See ck:context-architecture skill for the directory structure that prompts read from and write to.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.9%
按下载量换算39

Claude

27.53%
按下载量换算29

Cursor

17.64%
按下载量换算19

Gemini CLI

9.03%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/juliusbrussee/cavekit --skill prompt-pipeline 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills