model_chaining
Skill1 starsChanged 10 months agoMITView on GitHub
Inputs: - name: Chain name - description: What the chain produces - steps: List of model steps with configs Outputs: - chain_id: Unique chain identifier - model_count: Number of models in chain - estimated_cost: API cost estimate Inputs: - chain_id: Chain to execute - input_data: Initial input for first model - parameters: Override default configs Outputs: - outputs: Result from each model step - final_output: Final pipeline output - artifacts: All intermediate results Inputs: - category: image/video/content/product - complexity: simple/moderate/advanced
In this repository14 other files it gives its agents.
- docs/CLAUDE.mdCLAUDE.md
- business_operationsSkill
- content_creationSkill
- data_analysisSkill
- ecommerce_automationSkill
- email_marketingSkill
- product_designSkill
- research_analysisSkill
- seo_optimizationSkill
- social_media_marketingSkill
- task_queueSkill
- video_productionSkill
- web_automationSkill
- workflow_automationSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 11 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 4
Create sequential AI model pipelines where output from one model feeds into the next, enabling complex multi-stage content generation.
- Distinctive: line 37
Run chained model sequence with automatic data passing.
- Distinctive: line 106
Add logic gates to chains.
- Distinctive: line 165
Run multiple models simultaneously.
- Distinctive: line 233
Create design (image model)
- Distinctive: line 235
Create mockups (mockup model)
- Distinctive: line 237
Create video ad (video model)
- Distinctive: line 238
Add music (audio model)
- Distinctive: line 242
Write article (text model)
- Distinctive: line 244
Create social variants (editing model × 5)
- Distinctive: line 246
Add voiceover (speech model)
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Model Chaining Skill
Overview
Create sequential AI model pipelines where output from one model feeds into the next, enabling complex multi-stage content generation.
Capabilities
create_chain
Build multi-model execution pipelines.
Inputs:
- name: Chain name
- description: What the chain produces
- steps: List of model steps with configs
Outputs:
- chain_id: Unique chain identifier
- model_count: Number of models in chain
- estimated_cost: API cost estimate
Example:
create_chain(
name="Product Video Pipeline",
steps=[
{"model": "flux_pro", "type": "image", "prompt": "{{concept}}"},
{"model": "runway_gen3", "type": "video", "image": "{{step_1}}"},
{"model": "stable_audio", "type": "audio", "style": "upbeat"},
{"model": "video_compositor", "video": "{{step_2}}", "audio": "{{step_3}}"}
]
)execute_chain
Run chained model sequence with automatic data passing.
Inputs:
- chain_id: Chain to execute
- input_data: Initial input for first model
- parameters: Override default configs
Outputs:
- outputs: Result from each model step
- final_output: Final pipeline output
- artifacts: All intermediate results
chain_templates
Pre-built pipelines for common workflows.
Inputs:
- category: image/video/content/product
- complexity: simple/moderate/advanced
Outputs:
- templates: Available chain templates
Built-in Templates:
Image Enhancement Chain
- Image generation (FLUX Pro)
- Background removal
- Upscaling (4x)
- Style transfer
Video Production Chain
- Script generation (LLM)
- Storyboard images
- Image-to-video
- Music generation
- Video editing/composition
Product Design Chain
- Concept generation (text)
- Design creation (image)
- Multiple variations (editing)
- Mockup generation
- Product creation
Content Marketing Chain
- Topic research (web search)
- Article writing (LLM)
- Feature image generation
- Social graphics (image variants)
- Video summary creation
step_reordering
Rearrange pipeline steps.
Inputs:
- chain_id: Chain to modify
- step_id: Step to move
- new_position: Target position
Outputs:
- updated_order: New step sequence
conditional_branching
Add logic gates to chains.
Inputs:
- chain_id: Chain to modify
- after_step: Step to add condition after
- condition: Evaluation expression
- true_branch: Steps if condition true
- false_branch: Steps if condition false
Outputs:
- branch_id: Branch identifier
Example:
conditional_branching(
after_step=1,
condition="{{quality_score}} > 0.85",
true_branch=[{"model": "publish"}],
false_branch=[{"model": "regenerate"}]
)output_transformation
Format data between models.
Inputs:
- chain_id: Chain to modify
- between_steps: [source_step, target_step]
- transform: Transformation function
Outputs:
- transform_id: Transformation identifier
Transforms:
extract_url: Get URL from model responseresize_image: Resize image to specific dimensionsextract_text: Pull text content from responseformat_json: Convert to JSON structuremerge_outputs: Combine multiple step outputs
save_chain_template
Save custom chain as reusable template.
Inputs:
- chain_id: Chain to save
- template_name: Name for template
- category: Template category
- description: What it does
Outputs:
- template_id: Saved template identifier
parallel_execution
Run multiple models simultaneously.
Inputs:
- chain_id: Chain to modify
- steps: Steps to run in parallel
- merge_strategy: How to combine outputs
Outputs:
- parallel_group_id: Parallel execution group
Model Categories
Image Models
- flux_pro: Highest quality images
- flux_dev: Fast iterations
- sdxl: Stable Diffusion XL
- ideogram: Text rendering
- recraft_v3: Vector graphics
Video Models
- runway_gen3: Text/image to video
- kling_v2: High-quality video
- luma_dream_machine: Creative video
- pika: Video editing
Editing Models
- photomaker: Photo editing
- controlnet: Structured editing
- instruct_pix2pix: Instruction-based editing
Audio Models
- stable_audio: Music generation
- eleven_labs: Text-to-speech
- musicgen: Background music
3D Models
- shap_e: 3D generation
- wonder3d: Image to 3D
Text Models
- llama_70b: Text generation
- gpt4: Advanced reasoning
- mixtral: Fast text
Chain Patterns
Sequential Pipeline
Model 1 → Model 2 → Model 3 → Output
Parallel Processing
Model 1 → [Model 2A, Model 2B, Model 2C] → Merge → OutputIterative Refinement
Model 1 → Quality Check → [Pass: Next Step | Fail: Regenerate]Multi-Output Chain
Input → Model 1 → [Branch A → Output A, Branch B → Output B]Workflows
Complete Product Creation
- Generate design concept (text model)
- Create design (image model)
- Generate 3 variations (editing model)
- Create mockups (mockup model)
- Enhance quality (upscale model)
- Create video ad (video model)
- Add music (audio model)
Marketing Content Suite
- Research topic (web search)
- Write article (text model)
- Generate hero image (image model)
- Create social variants (editing model × 5)
- Generate video summary (video model)
- Add voiceover (speech model)
Dependencies
- replicate_universal: For all AI models
- execution_agent: For chain execution
- memory_agent: For chain templates
Configuration
- max_chain_length: 20
- max_parallel_models: 5
- auto_retry_failures: true
- save_intermediates: true
- chain_directory: data/model_chains/
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

