/stream-chain
Stream-JSON chaining for multi-agent pipelines, data transformation, and sequential workflows
$ npx -y skills add ruvnet/ruflo --skill stream-chain --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/stream-chain
Context preview
The summary Claude sees to decide when to auto-load this skill.
Stream-JSON chaining for multi-agent pipelines, data transformation, and sequential workflows
SKILL.md
stream-chain.SKILL.mdname: stream-chain
description: Stream-JSON chaining for multi-agent pipelines, data transformation, and sequential workflows
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:
1. **Custom Chains** (`run`): Execute custom prompt sequences with full control 2. **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:** 1. **Structure Analysis**: Map directory structure and identify components 2. **Issue Detection**: Find potential improvements and problems 3. **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:** 1. **Candidate Identification**: Find code needing refactoring 2. **Prioritization**: Create ranked refactoring plan 3. **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:** 1. **Coverage Analysis**: Identify areas lacking tests 2. **Test Design**: Create test cases for critical functions 3. **Implementation**: Generate unit tests with assertions
**Use Cases:**
- Increasing test coverage
- TDD workflow support
- Regression test creation
- Quality assurance
4. Optimize Pipeline
Performance optimization with profiling and implementation.
claude-flow stream-chain pipeline optimize
**Workflow Steps:** 1. **Profiling**: Identify performance bottlenecks 2. **Strategy**: Analyze and suggest optimization approaches 3. **Implementation**: Provide optimized code
**Use Cases:**
- Performance improvement
- Resource optimization
- Scalability enhancement
- Latency reduction
Pipeline Options
| Option | Description | Default | |--------|-------------|---------| | `--verbose` | Show detailed execution | `false` | | `--timeout <seconds>` | Timeout per step | `30` | | `--debug` | Enable debug mode | `false` |
Pipeline Examples
Quick Analysis
claude-flow stream-chain pipeline analysis
Extended Refactoring
claude-flow stream-chain pipeline refactor --timeout 60 --verbose
Debug Test Generation
claude-flow stream-chain pipeline test --debug
Comprehensive Optimization
claude-flow stream-chain pipeline optimize --timeout 90 --verbose
Pipeline Output
Each pipeline execution provides:
- **Progress**: Step-by-step execution status
- **Results**: Success/failure per step
- **Timing**: Total and per-step execution time
- **Summary**: Consolidated results and recommendations
---
Custom Pipeline Definitions
Define reusable pipelines in `.claude-flow/config
Read more
name: stream-chain description: Stream-JSON chaining for multi-agent pipelines, data transformation, and sequential workflows
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:
1. **Custom Chains** (`run`): Execute custom prompt sequences with full control 2. **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:** 1. **Structure Analysis**: Map directory structure and identify components 2. **Issue Detection**: Find potential improvements and problems 3. **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:** 1. **Candidate Identification**: Find code needing refactoring 2. **Prioritization**: Create ranked refactoring plan 3. **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:** 1. **Coverage Analysis**: Identify areas lacking tests 2. **Test Design**: Create test cases for critical functions 3. **Implementation**: Generate unit tests with assertions
**Use Cases:**
- Increasing test coverage
- TDD workflow support
- Regression test creation
- Quality assurance
4. Optimize Pipeline
Performance optimization with profiling and implementation.
claude-flow stream-chain pipeline optimize
**Workflow Steps:** 1. **Profiling**: Identify performance bottlenecks 2. **Strategy**: Analyze and suggest optimization approaches 3. **Implementation**: Provide optimized code
**Use Cases:**
- Performance improvement
- Resource optimization
- Scalability enhancement
- Latency reduction
Pipeline Options
| Option | Description | Default | |--------|-------------|---------| | `--verbose` | Show detailed execution | `false` | | `--timeout <seconds>` | Timeout per step | `30` | | `--debug` | Enable debug mode | `false` |
Pipeline Examples
Quick Analysis
claude-flow stream-chain pipeline analysis
Extended Refactoring
claude-flow stream-chain pipeline refactor --timeout 60 --verbose
Debug Test Generation
claude-flow stream-chain pipeline test --debug
Comprehensive Optimization
claude-flow stream-chain pipeline optimize --timeout 90 --verbose
Pipeline Output
Each pipeline execution provides:
- **Progress**: Step-by-step execution status
- **Results**: Success/failure per step
- **Timing**: Total and per-step execution time
- **Summary**: Consolidated results and recommendations
---
Custom Pipeline Definitions
Define reusable pipelines in `.claude-flow/config
An agent meta-harness for Claude Code and Codex. Agent = Model + Harness. The model writes; the harness gives it tools, memory, loops, sandboxes, and controls so it can actually work.
Repo: ruvnet/ruflo
Other skills on claude-flow.
- /agentdb-advanced
Master advanced AgentDB features including QUIC synchronization, multi-database management, custom distance metrics, hybrid search, and distributed systems integration. Use when building distributed AI systems, multi-agent coordination, or advanced vector search applications.
Open skill - /agentdb-learning
Create and train AI learning plugins with AgentDB's 9 reinforcement learning algorithms. Includes Decision Transformer, Q-Learning, SARSA, Actor-Critic, and more. Use when building self-learning agents, implementing RL, or optimizing agent behavior through experience.
Open skill - /agentdb-memory-patterns
Implement persistent memory patterns for AI agents using AgentDB. Includes session memory, long-term storage, pattern learning, and context management. Use when building stateful agents, chat systems, or intelligent assistants.
Open skill - /agentdb-optimization
Optimize AgentDB performance with quantization (4-32x memory reduction), HNSW indexing (150x faster search), caching, and batch operations. Use when optimizing memory usage, improving search speed, or scaling to millions of vectors.
Open skill - /agentdb-vector-search
Implement semantic vector search with AgentDB for intelligent document retrieval, similarity matching, and context-aware querying. Use when building RAG systems, semantic search engines, or intelligent knowledge bases.
Open skill - /agentic-jujutsu
Quantum-resistant, self-learning version control for AI agents with ReasoningBank intelligence and multi-agent coordination
Open skill

