stream-chain
Stream-JSON chaining for multi-agent pipelines, data transformation, and sequential workflows
Install
mkdir -p .claude/skills/stream-chain && curl -L -o skill.zip "https://mcp.directory/api/skills/download/1995" && unzip -o skill.zip -d .claude/skills/stream-chain && rm skill.zipInstalls to .claude/skills/stream-chain
About this skill
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 optimization with profiling and implementation.
claude-flow stream-chain pipeline optimize
Workflow Steps:
- Profiling: Identify performance bottlenecks
- Strategy: Analyze and suggest optimization approaches
- 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.json:
Configuration Format
{
"streamChain": {
"pipelines": {
"security": {
"name": "Security Audit Pipeline",
"description": "Comprehensive security analysis",
"prompts": [
"Scan codebase for security vulnerabilities",
"Categorize issues by severity (critical$high$medium$low)",
"Generate fixes with priority and implementation steps",
"Create security test suite"
],
"timeout": 45
},
"documentation": {
"name": "Documentation Generation Pipeline",
"prompts": [
"Analyze code structure and identify undocumented areas",
"Generate API documentation with examples",
"Create usage guides and tutorials",
"Build architecture diagrams and flow charts"
]
}
}
}
}
Execute Custom Pipeline
claude-flow stream-chain pipeline security
claude-flow stream-chain pipeline documentation
Advanced Use Cases
Multi-Agent Coordination
Chain different agent types for complex workflows:
claude-flow stream-chain run \
"Research best practices for API design" \
"Design REST API with discovered patterns" \
"Implement API endpoints with validation" \
"Generate OpenAPI specification" \
"Create integration tests" \
"Write deployment documentation"
Data Transformation Pipeline
Process and transform data through multiple stages:
claude-flow stream-chain run \
"Extract user data from CSV files" \
"Normalize and validate data format" \
"Enrich data with external API calls" \
"Generate analytics report" \
"Create visualization code"
Code Migration Workflow
Systematic code migration with validation:
claude-flow stream-chain run \
"Analyze legacy codebase dependencies" \
"Create migration plan with risk assessment" \
"Generate modernized code for high-priority modules" \
"Create migration tests" \
"Document migration steps and rollback procedures"
Quality Assurance Chain
Comprehensive code quality workflow:
claude-flow stream-chain pipeline analysis
claude-flow stream-chain pipeline refactor
claude-flow stream-chain pipeline test
claude-flow stream-chain pipeline optimize
Best Practices
1. Clear and Specific Prompts
Good:
"Analyze authentication.js for SQL injection vulnerabilities"
Avoid:
"Check security"
2. Logical Progression
Order prompts to build on previous outputs:
1. "Identify the problem"
2. "Analyze root causes"
3. "Design solution"
4. "Implement solution"
5. "Verify implementation"
3. Appropriate Timeouts
- Simple tasks: 30 seconds (default)
- Analysis tasks: 45-60 seconds
- Implementation tasks: 60-90 seconds
- Complex workflows: 90-120 seconds
4. Verification Steps
Include validation in your chains:
claude-flow stream-chain run \
"Implement feature X" \
"Write tests for feature X" \
"Verify tests pass and cover edge cases"
5. Iterative Refinement
Use chains for iterative improvement:
claude-flow stream-chain run \
"Generate initial implementation" \
"Review and identify issues" \
"Refine based on issues found" \
"Final quality check"
Integration with Claude Flow
Combine with Swarm Coordination
# Initialize swarm for coordination
claude-flow swarm init --topology mesh
# Execute stream chain with swarm agents
claude-flow stream-chain run \
"Agent 1: Research task" \
"Agent 2: Implement solution" \
"Agent 3: Test implementation" \
"Agent 4: Review and refine"
Memory Integration
Stream chains automatically store context in memory for cross-session persistence:
# Execute chain with memory
claude-flow stream-chain run \
"Analyze requirements" \
"Design architecture" \
--verbose
# Results stored in .claude-flow$memory$stream-chain/
Neural Pattern Training
Successful chains train neural patterns for improved performance:
# Enable neural training
claude-flow stream-chain pipel
---
*Content truncated.*
More by ruvnet
View all skills by ruvnet →You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
fastapi-templates
wshobson
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
Related MCP Servers
Browse all serversBoost your productivity by managing Azure DevOps projects, pipelines, and repos in VS Code. Streamline dev workflows wit
Keboola MCP Server connects AI agents and MCP clients to the Keboola data platform for natural language SQL, Keboola int
Integrate with Buildkite CI/CD to access pipelines, builds, job logs, artifacts and user data for monitoring workflows a
Automate complex multi-step processes like code reviews with powerful workflow automation software for data processing a
Tenzir: Execute cybersecurity data workflows with OCSF-compatible pipelines to retrieve structured security events for e
Streamline DevOps workflows by managing configurations, pipelines, and metrics with Cribl Stream for optimized data proc
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.