stream-chain
它能做什么
这个技能把多个 AI 步骤串联起来,每一步都基于前一步的输出。适合希望自动运行多阶段工作流的人。
适用场景
- ✓当一项任务需要多个步骤,且每一步都依赖上一步的时候。
- ✓当你希望用一条命令运行一个现成的分析流水线的时候。
- ✓当你需要让数据经过一系列 AI 处理阶段进行转换的时候。
技能链接
https://github.com/ruvnet/RuView/blob/main/.claude/skills/stream-chain/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我分析代码库结构,然后找出可以改进的地方,再撰写一份行动计划,全部在一条链中完成。”
每周 5 个新技能,1 分钟读完。
工作原理
你给该技能一组提示词,它会按顺序运行。每一步都会接收上一步的完整输出,因此最终结果反映的是整个流程。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Stream-Chain Skill
Execute sophisticated multi-step workflows where each agent's output flows into the next, enabling complex data transformations and sequential processing pipelines.
Overview
Stream-Chain provides two powerful modes for orchestrating multi-agent workflows:
- Custom Chains (
run): Execute custom prompt sequences with full control - Predefined Pipelines (
pipeline): Use battle-tested workflows for common tasks
Each step in a chain receives the complete output from the previous step, enabling sophisticated multi-agent coordination through streaming data flow.
Quick Start
Run a Custom Chain
claude-flow stream-chain run \
"Analyze codebase structure" \
"Identify improvement areas" \
"Generate action plan"
Execute a Pipeline
claude-flow stream-chain pipeline analysis
Custom Chains (run)
Execute custom stream chains with your own prompts for maximum flexibility.
Syntax
claude-flow stream-chain run <prompt1> <prompt2> [...] [options]
Requirements:
- Minimum 2 prompts required
- Each prompt becomes a step in the chain
- Output flows sequentially through all steps
Options
| Option | Description | Default |
|---|---|---|
--verbose |
Show detailed execution information | false |
--timeout <seconds> |
Timeout per step | 30 |
--debug |
Enable debug mode with full logging | false |
How Context Flows
Each step receives the previous output as context:
Step 1: "Write a sorting function"
Output: [function implementation]
Step 2 receives:
"Previous step output:
[function implementation]
Next task: Add comprehensive tests"
Step 3 receives:
"Previous steps output:
[function + tests]
Next task: Optimize performance"
Examples
Basic Development Chain
claude-flow stream-chain run \
"Write a user authentication function" \
"Add input validation and error handling" \
"Create unit tests with edge cases"
Security Audit Workflow
claude-flow stream-chain run \
"Analyze authentication system for vulnerabilities" \
"Identify and categorize security issues by severity" \
"Propose fixes with implementation priority" \
"Generate security test cases" \
--timeout 45 \
--verbose
Code Refactoring Chain
claude-flow stream-chain run \
"Identify code smells in src/ directory" \
"Create refactoring plan with specific changes" \
"Apply refactoring to top 3 priority items" \
"Verify refactored code maintains behavior" \
--debug
Data Processing Pipeline
claude-flow stream-chain run \
"Extract data from API responses" \
"Transform data into normalized format" \
"Validate data against schema" \
"Generate data quality report"
Predefined Pipelines (pipeline)
Execute battle-tested workflows optimized for common development tasks.
Syntax
claude-flow stream-chain pipeline <type> [options]
Available Pipelines
1. Analysis Pipeline
Comprehensive codebase analysis and improvement identification.
claude-flow stream-chain pipeline analysis
Workflow Steps:
- Structure Analysis: Map directory structure and identify components
- Issue Detection: Find potential improvements and problems
- Recommendations: Generate actionable improvement report
Use Cases:
- New codebase onboarding
- Technical debt assessment
- Architecture review
- Code quality audits
2. Refactor Pipeline
Systematic code refactoring with prioritization.
claude-flow stream-chain pipeline refactor
Workflow Steps:
- Candidate Identification: Find code needing refactoring
- Prioritization: Create ranked refactoring plan
- Implementation: Provide refactored code for top priorities
Use Cases:
- Technical debt reduction
- Code quality improvement
- Legacy code modernization
- Design pattern implementation
3. Test Pipeline
Comprehensive test generation with coverage analysis.
claude-flow stream-chain pipeline test
Workflow Steps:
- Coverage Analysis: Identify areas lacking tests
- Test Design: Create test cases for critical functions
- Implementation: Generate unit tests with assertions
Use Cases:
- Increasing test coverage
- TDD workflow support
- Regression test creation
- Quality assurance
4. Optimize Pipeline
Performance optimizatio
常见问题
我需要多少个步骤?
自定义链至少需要两个提示词。
我可以设置时间限制吗?
可以。该技能为每一步提供超时选项,默认为 30 秒。
有现成的流水线吗?
有。该技能包含针对常见任务(例如分析)的预定义流水线。
详情
作者的原始描述
Stream-JSON chaining for multi-agent pipelines, data transformation, and sequential workflows
repo: ruvnet/RuView
热度
- GitHub 星标
- 102k
- 排名
- #840
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
AgentDB Advanced Features
102k帮你的智能体了解 AgentDB 的高级功能,例如在多台机器之间同步数据库,以及把向量搜索与元数据过滤结合起来。
AgentDB Learning Plugins
102k让你的智能体为 AgentDB 构建并训练学习插件,使用能从过去经验中不断改进的强化学习方法。
AgentDB Memory Patterns
102k让你的智能体跨会话记住对话和上下文,并以 AgentDB 作为其持久记忆存储。
AgentDB Performance Optimization
102k帮你的智能体提升 AgentDB 的搜索速度并减少内存占用,借助压缩、快速搜索索引和缓存。