muapi-workflow
Build, run, and visualize multi-step AI generation workflows. The AI architect translates natural language descriptions into connected node graphs — chain image generation, video creation, enhancement, and editing into automated pipelines.
What this skill does
# AI Workflow Builder Chain any combination of muapi.ai generation steps into automated pipelines. The AI architect converts your plain-language description into a runnable node graph. ## Prerequisites Always ensure the `muapi` CLI is up-to-date before running any commands. Reinstall from source at the start of every session: ```bash pip install --upgrade /path/to/muapi-cli ``` Replace `/path/to/muapi-cli` with the actual path to the `muapi-cli` directory in the workspace (the directory containing `pyproject.toml`). ## Core Operations 1. **Generate** (`generate-workflow.sh`) — AI architect creates a workflow from a description 2. **Discover** (`discover-workflow.sh`) — Find a relevant existing workflow by natural language 3. **Edit** (`generate-workflow.sh --workflow-id`) — Modify an existing workflow with a prompt 4. **Interactive Run** (`interactive-run.sh`) — Prompt for inputs and execute a workflow 5. **Run** (`run-workflow.sh`) — Execute a workflow, poll node-by-node, collect outputs 6. **CLI** (`muapi workflow`) — Full CRUD + visualization directly from the terminal --- ## Agent Guided Discovery & Selection As an AI agent, you have the ability to read and understand the purpose of available workflows to select the best one for the user's task (e.g., "create a UGC video"). 1. **Discover**: Fetch the catalog of available workflows and their descriptions in JSON format. ```bash muapi workflow discover --output-json ``` 2. **Match (Internal Reasoning)**: Use your LLM capabilities to analyze the `name`, `category`, and `description` fields of the returned workflows. Find the best match for the user's intent. 3. **Analyze**: If you find a promising candidate, inspect its structure to ensure it has the necessary nodes and parameters. ```bash muapi workflow get <workflow_id> ``` **CRITICAL RULE**: The output of `muapi workflow get` will include an "API Inputs" table. You MUST read this table to understand what inputs are required. 4. **Choose & Confirm & Prompt User**: - If one workflow is a perfect match, you MUST ask the user to provide the exact values for the required API inputs before executing it. **Never invent or guess input values (like prompts, URLs, etc.) on your own.** - If multiple workflows are highly relevant, present the options to the user with their descriptions and ask them to confirm which one to use, and also ask for the required inputs. - If no workflow matches the user's complex request, offer to **architect** a new one using `muapi workflow create`. ### Example Agent Reasoning > "The user wants a product promo video. I fetched the catalog using `discover`. I see two potential workflows: > 1. `wf_123`: 'Product promo with background music' > 2. `wf_456`: 'Simple video gen' > I will analyze `wf_123` with `get`. It has the required nodes. I will suggest `wf_123` or just run it if the match is precise." --- ## Protocol: Building a Workflow ### Step 1 — Describe your pipeline ```bash muapi workflow create "take a text prompt, generate an image with flux-dev, then upscale it to 4K" ``` The architect returns a workflow with a unique ID and a node graph. Save the ID. ### Step 2 — Inspect and visualize ```bash # Rich ASCII node graph in the terminal muapi workflow get <workflow_id> # Or raw JSON muapi workflow get <workflow_id> --output-json ``` ### Step 3 — Run it ```bash # Run with specific inputs muapi workflow execute <workflow_id> \ --input "node1.prompt=a glowing crystal cave at midnight" # Use --download to pull results locally muapi workflow execute <workflow_id> \ --input "node1.prompt=a sunset" \ --download ./outputs ``` ### Step 4 — Discovery (Optional) If you want to reuse an existing workflow instead of creating a new one: ```bash # Search by keywords muapi workflow discover "ugc video" ``` ### Step 5 — Interactive Execution Run a workflow and have the CLI prompt you for each required input: ```bash muapi workflow run-interactive <workflow_id> ``` --- ## Workflow Examples ### Image Pipelines ```bash # Text → Image → Upscale muapi workflow create "take a text prompt, generate with flux-dev, upscale the result" # Text → Image → Background removal → Product shot muapi workflow create "generate a product image with hidream, remove background, create professional product shot" ``` ### Video Pipelines ```bash # Text → Video muapi workflow create "generate a 10-second cinematic video from a text prompt using kling-master" # Image → Video → Lipsync muapi workflow create "animate an input image with seedance, then apply lipsync from an audio file" ``` --- ## Editing an Existing Workflow ```bash # Add a step muapi workflow edit <id> --prompt "add a face-swap step after the image generation" # Swap a model muapi workflow edit <id> --prompt "change the video model from kling to veo3" ``` --- ## CLI Reference ```bash # List all your workflows muapi workflow list # Browse templates muapi workflow templates # Generate new workflow muapi workflow create "text → flux image → upscale → face swap" # Visualize a workflow muapi workflow get <id> # Execute with inputs muapi workflow execute <id> --input "node1.prompt=a sunset" # Monitor a run muapi workflow status <run_id> # Get outputs muapi workflow outputs <run_id> --download ./results # Edit with AI muapi workflow edit <id> --prompt "add lipsync at the end" # Rename / delete muapi workflow rename <id> --name "Product Pipeline v2" muapi workflow delete <id> ``` --- ## MCP Tools (for AI agents) | Tool | Description | |------|-------------| | `muapi_workflow_list` | List user's workflows | | `muapi_workflow_create` | AI architect: prompt → workflow | | `muapi_workflow_get` | Get workflow definition + node graph | | `muapi_workflow_execute` | Run with specific inputs | | `muapi_workflow_status` | Node-by-node run status | | `muapi_workflow_outputs` | Final output URLs | --- ## Constraints - Workflows can contain any combination of muapi.ai nodes (image, video, audio, enhance, edit) - Node outputs are automatically wired as inputs to downstream nodes - `--sync` mode waits up to 120s for generation; use `--async` for complex workflows and poll separately - Run timeouts: 10 minutes maximum per workflow execution
Related in Image & Video
watch
IncludedWatch a video (URL or local path). Downloads with yt-dlp, extracts auto-scaled frames with ffmpeg, pulls the transcript from captions (or Whisper API fallback), and hands the result to Claude so it can answer questions about what's in the video.
physical-ai-defect-image-generation
IncludedUse when the user wants to orchestrate defect image generation, run associated setup, or handle outputs on OSMO. The Day 0 path handles cold-start with USD-to-ROI, image-edit augmentation, and AnomalyGen to create initial PCBA datasets. The Day 1 path performs inference and labeling on real images. This skill helps with first-time asset setup, creation of finetuning checkpoints, and configuring deployment. Trigger keywords: defect image generation, dig workflow, dig pipeline, defect image detection workflow, aoi pipeline, aoi anomalygen, usd2roi anomalygen, day 0 pcba, day 1 pcba, day 1 real-photo alignment, day 1 manual roi, metal surface anomaly, glass defect, anomalygen finetune, setup_pcb, setup_metal, setup_glass, setup_pretrained, dig setup, dig datasets, dig pretrained checkpoint, dig image-edit endpoint.
accelint-react-best-practices
IncludedReact performance optimization and best practices. ALWAYS use this skill when working with any React code - writing components, hooks, JSX; refactoring; optimizing re-renders, memoization, state management; reviewing for performance; fixing hydration mismatches; debugging infinite re-renders, stale closures, input focus loss, animations restarting; preventing remounting; implementing transitions, lazy initialization, effect dependencies. Even simple React tasks benefit from these patterns. Covers React 19+ (useEffectEvent, Activity, ref props). Triggers - useEffect, useState, useMemo, useCallback, memo, inline components, nested components, components inside components, re-render, performance, hydration, SSR, Next.js, useDeferredValue, combined hooks.
elevenlabs-agents
IncludedBuild conversational AI voice agents with ElevenLabs Platform using React, JavaScript, React Native, or Swift SDKs. Configure agents, tools (client/server/MCP), RAG knowledge bases, multi-voice, and Scribe real-time STT. Use when: building voice chat interfaces, implementing AI phone agents with Twilio, configuring agent workflows or tools, adding RAG knowledge bases, testing with CLI "agents as code", or troubleshooting deprecated @11labs packages, Android audio cutoff, CSP violations, dynamic variables, or WebRTC config. Keywords: ElevenLabs Agents, ElevenLabs voice agents, AI voice agents, conversational AI, @elevenlabs/react, @elevenlabs/client, @elevenlabs/react-native, @elevenlabs/elevenlabs-js, @elevenlabs/agents-cli, elevenlabs SDK, voice AI, TTS, text-to-speech, ASR, speech recognition, turn-taking model, WebRTC voice, WebSocket voice, ElevenLabs conversation, agent system prompt, agent tools, agent knowledge base, RAG voice agents, multi-voice agents, pronunciation dictionary, voice speed control, elevenlabs scribe, @11labs deprecated, Android audio cutoff, CSP violation elevenlabs, dynamic variables elevenlabs, case-sensitive tool names, webhook authentication
humanizer
IncludedHumanize AI-generated text by detecting and removing patterns typical of LLM output. Rewrites text to sound natural, specific, and human. Uses 28 pattern detectors, 560+ AI vocabulary terms across 3 tiers, and statistical analysis (burstiness, type-token ratio, readability) for comprehensive detection. Use when asked to humanize text, de-AI writing, make content sound more natural/human, review writing for AI patterns, score text for AI detection, or improve AI-generated drafts. Covers content, language, style, communication, and filler categories.
generating-mermaid-diagrams
IncludedSalesforce architecture diagrams using Mermaid with ASCII fallback. Use this skill when generating text-based diagrams for Salesforce architecture, OAuth flows, ERDs, integration sequences, or Agentforce structure. TRIGGER when: user says "diagram", "visualize", "ERD", or asks for sequence diagrams, flowcharts, class diagrams, or architecture visualizations in Mermaid. DO NOT TRIGGER when: user wants PNG/SVG image output (use generating-visual-diagrams), or asks about non-Salesforce systems.