Workflow CLI Reference¶
Complete reference for the skillmeat workflow command group. All workflow management, execution, and monitoring operations are accessed through these subcommands.
Overview¶
The skillmeat workflow group manages multi-stage, agent-driven pipelines defined in YAML. Commands enable creation, validation, execution planning, runtime management, and execution history inspection.
Feature Flag¶
Workflow commands are gated behind the SKILLMEAT_WORKFLOW_ENGINE_ENABLED environment variable (default: true). Disable with:
When disabled, the workflow group remains discoverable via --help but subcommands exit gracefully with a feature flag message.
Global Options¶
All workflow subcommands support:
--debug(hidden flag) Enable debug output for troubleshooting. Shows additional metadata (DB IDs, parsing details, etc.).
Commands¶
skillmeat workflow create¶
Import a workflow YAML file into the collection.
Usage:
Arguments:
PATH(required) File path to the workflow YAML file. Must exist and be readable.
Options:
-
--name NAMEOverride the workflow name extracted from the YAMLworkflow.namefield. Useful for renaming on import. -
--force/-fOverwrite an existing workflow with the same name. Both filesystem and database entries are replaced.
What it does:
- Reads and validates the YAML file
- Stores the YAML in the collection directory (
~/.skillmeat/collection/workflows/<name>/) - Updates the collection manifest
- Persists the workflow definition to the database
Exit codes:
0— Success1— Parse error, validation failure, or file I/O error
Examples:
# Import a workflow from a YAML file
skillmeat workflow create ./deployment-pipeline.yaml
# Import with a custom name
skillmeat workflow create ./my-workflow.yaml --name "custom-pipeline"
# Force overwrite an existing workflow
skillmeat workflow create ./my-workflow.yaml --force
Output:
On success, displays a table with: - Workflow name, version, and stage count - Database ID - Collection location - Tags and description (if present)
skillmeat workflow list¶
List all workflows in the collection with optional filtering.
Usage:
Options:
-
--status STATUSFilter by workflow status. Supported values:draft,active,archived. -
--tag TAGFilter by tag name. Only workflows with the specified tag are shown. -
--format FORMATOutput format:table(default, Rich table) orjson(JSON array). Default:table
Exit codes:
0— Success (even if no results match filters)1— Query error
Examples:
# List all workflows
skillmeat workflow list
# List only active workflows
skillmeat workflow list --status active
# Filter by tag
skillmeat workflow list --tag ci
# List all archived workflows in JSON
skillmeat workflow list --status archived --format json
# Combine filters
skillmeat workflow list --tag ci --status active
Output (table mode):
Rich table with columns:
- Name — Workflow name (bold)
- Version — Semantic version
- Stages — Count of stages in the workflow
- Status — Status (green for active, yellow for draft, dim for archived)
- Tags — Comma-separated tags, or - if none
- Updated — Last modification timestamp (YYYY-MM-DD HH:MM)
Output (JSON mode):
Array of objects with fields:
[
{
"id": "uuid",
"name": "string",
"version": "semver",
"stages": 5,
"status": "active|draft|archived",
"tags": ["tag1", "tag2"],
"description": "string or null",
"project_id": "string",
"created_at": "ISO8601",
"updated_at": "ISO8601"
}
]
skillmeat workflow show¶
Display detailed information about a specific workflow.
Usage:
Arguments:
NAME(required) Workflow name (case-sensitive).
Exit codes:
0— Success1— Workflow not found or query error
Examples:
# Show a workflow's definition
skillmeat workflow show my-workflow
# Show a code review pipeline
skillmeat workflow show code-review-pipeline
Output:
Displays three Rich panels:
- Workflow Definition Table with metadata:
- Name, version, status (colored)
- Stage count, description, tags
- Created and updated timestamps
-
DB ID (shown only with
--debug) -
Stages Table with columns:
#— Stage index (1-based)- Stage Name — Stage identifier
- Type —
agent,gate, orfan_out(colored) - Depends On — Comma-separated list of dependencies, or
-if independent -
Timeout — Timeout duration in seconds, or
-if not set -
Last Execution (informational) Table with:
- Run ID, status (colored), start time
- Duration (if completed), or "in progress" (if running)
- Shows "-" if no executions recorded
skillmeat workflow validate¶
Validate a workflow YAML file without importing it.
Usage:
Arguments:
PATH(required) File path to the workflow YAML file.
Options:
--strictTreat warnings as errors. Exit with code 1 if any warnings are present (in addition to errors).
What it does:
Runs all static analysis passes: - YAML parsing - Schema validation - Expression syntax checking - DAG cycle detection - Artifact format validation
The collection is never modified.
Exit codes:
0— Valid (no errors, or only warnings if--strictis not used)1— Parse error, validation error, or warnings with--strict
Examples:
# Validate a workflow file
skillmeat workflow validate ./my-workflow.yaml
# Strict validation (warnings = errors)
skillmeat workflow validate ./my-workflow.yaml --strict
Output:
Displays:
- Validation errors (red, prefixed [red]Error:[/red])
- Validation warnings (yellow, prefixed [yellow]Warning:[/yellow])
- For each issue: category, stage ID (if relevant), field name, and message
On success with no issues:
skillmeat workflow plan¶
Preview the execution plan for a workflow without running it.
Usage:
Arguments:
NAME(required) Workflow name.
Options:
--param KEY=VALUE(repeatable) Override a workflow parameter. Repeat to pass multiple parameters. Format:--param key1=value1 --param key2=value2
What it does:
- Resolves workflow parameters (from YAML defaults + CLI overrides)
- Computes parallel execution batches via topological sort
- Displays the execution plan as a Rich tree (no execution occurs)
Exit codes:
0— Success1— Validation error, workflow not found, or plan generation failure
Examples:
# View execution plan
skillmeat workflow plan my-workflow
# Override a parameter
skillmeat workflow plan my-workflow --param environment=production
# Multiple parameter overrides
skillmeat workflow plan my-workflow --param feature=auth-v2 --param env=prod
Output:
- Execution Plan Header Panel with:
- Workflow name and version
- Number of batches and total stages
-
Parameter overrides (if any)
-
Batch Trees For each batch, a Rich tree showing:
- Batch index and label (e.g., "Batch 1 dim[/dim]")
- Stages within the batch:
- Stage name, type (colored:
agent/gate/fan_out), and status (pending) - Stage ID, dependencies, and configuration
- Stage name, type (colored:
For agent stages, additional details: - Primary artifact and model - Tools, inputs (with sources), and outputs - Context modules, conditions, and timeout
For gate stages, additional details: - Approvers list - Timeout duration
- Footer Estimated total execution time (based on timeouts and sequential dependencies)
skillmeat workflow run¶
Execute a workflow with Rich live progress display.
Usage:
Arguments:
NAME(required) Workflow name.
Options:
-
--param KEY=VALUE(repeatable) Override a workflow parameter. -
--dry-runShow the execution plan without running it. Equivalent toskillmeat workflow plan NAME --param ....
What it does:
- Resolves parameters and generates the execution plan
- If
--dry-run: displays the plan and exits - Otherwise: executes the workflow with real-time progress tracking
During execution: - Batches run sequentially - Stages within a batch run in parallel - Gate stages pause for approvals - Progress table updates with stage status, start times, and output summaries
Exit codes:
0— Execution completed successfully1— Validation error, execution failure, or user cancellation
Examples:
# Execute a workflow
skillmeat workflow run my-workflow
# Preview the execution plan without running
skillmeat workflow run my-workflow --dry-run
# Run with parameter overrides
skillmeat workflow run my-workflow --param env=staging --param feature=v2
# Execute and monitor progress
skillmeat workflow run deploy-pipeline
Output (execution):
Live-updating Rich progress table:
- Batch — Batch index
- Stage — Stage name
- Type — Stage type (agent/gate/fan_out)
- Status — Current status with color coding:
- pending (yellow)
- running (cyan)
- waiting_for_approval (magenta) [gates only]
- completed (green)
- failed (red)
- skipped (dim)
- cancelled (dim)
- Start Time — When the stage began
- Summary — Brief output or error message
Output (on completion):
Summary table with:
- Total execution time
- Success/failure summary
- Stage-by-stage results
- Any error messages or logs (with --logs flag in runs command)
skillmeat workflow runs¶
List or inspect workflow executions.
Usage (list mode):
Usage (detail mode):
Arguments:
RUN_ID(optional) Execution UUID. When provided, shows detailed metadata for that execution. When omitted, lists recent executions.
Options:
-
--workflow NAMEFilter by workflow name (list mode only). -
--status STATUSFilter by execution status (list mode only). Supported values:pending,running,completed,failed,cancelled. -
--logsInclude error messages and output summaries for each stage (detail mode only). -
--limit NMaximum number of executions to show in list mode. Default:20
Exit codes:
0— Success1— Execution in failed/cancelled state (detail mode), or no results found
Examples:
# List recent executions
skillmeat workflow runs
# List executions for a specific workflow
skillmeat workflow runs --workflow my-workflow
# Filter by status
skillmeat workflow runs --status failed
# Show detailed information for an execution
skillmeat workflow runs abc123def456
# Show execution details with stage output
skillmeat workflow runs abc123def456 --logs
# Combine filters
skillmeat workflow runs --workflow deploy-pipeline --status completed --limit 10
Output (list mode):
Rich table with columns: - Run ID — Execution UUID (first 12 characters) - Workflow ID — Workflow UUID (first 12 characters) - Status — Execution status (colored) - Started — Start timestamp (YYYY-MM-DD HH:MM) - Duration — Elapsed time (e.g., "5m 23s") or "-" if still running
Footer shows count and message to use run ID for details.
Output (detail mode):
- Execution Metadata Panel Table with:
- Run ID, workflow ID
- Status (colored)
- Started and completed timestamps
- Total duration
- Error message (if failed)
-
Parameters (JSON, if any)
-
Per-Stage Table Columns:
- Stage — Stage name
- Type — Stage type (agent/gate/fan_out)
- Status — Stage status (colored)
- Duration — Elapsed time for stage (e.g., "30s")
- Error / Output — Error message or JSON output (only with
--logs)
skillmeat workflow approve¶
Approve a gate stage that is waiting for approval.
Usage:
Arguments:
RUN_ID(required) Execution UUID.
Options:
--yes/-ySkip confirmation prompt and approve immediately.
What it does:
- Fetches the execution metadata
- Locates the gate stage in
waiting_for_approvalstate - Prompts for confirmation (unless
--yes) - Marks the stage as approved so execution can continue
Exit codes:
0— Approval successful1— Execution not found, no gate awaiting approval, or user aborted confirmation
Examples:
# Approve a gate stage (with confirmation prompt)
skillmeat workflow approve abc123def456
# Approve without confirmation
skillmeat workflow approve abc123def456 --yes
# Approve with shorthand flag
skillmeat workflow approve abc123def456 -y
Output:
Confirmation panel showing: - Run ID (first 12 characters) - Current execution status - Number of stages in the execution
After approval:
skillmeat workflow cancel¶
Cancel a running or pending workflow execution.
Usage:
Arguments:
RUN_ID(required) Execution UUID.
Options:
--yes/-ySkip confirmation prompt and cancel immediately.
What it does:
- Fetches the execution metadata
- Confirms with the user (unless
--yes) - Marks all active stages as
cancelled - Sets the execution status to
cancelled
If the execution is already in a terminal state (completed, failed, cancelled), the command exits with a message and no changes are made.
Exit codes:
0— Cancellation successful, or execution already in terminal state1— Execution not found or error during cancellation
Examples:
# Cancel an execution (with confirmation)
skillmeat workflow cancel abc123def456
# Cancel without confirmation
skillmeat workflow cancel abc123def456 --yes
# Cancel with shorthand flag
skillmeat workflow cancel abc123def456 -y
Output:
Confirmation panel showing: - Run ID - Current status - Number of stages
After cancellation:
Command Workflow Examples¶
Example 1: Create, Validate, Plan, and Run¶
# Validate the YAML first (optional but recommended)
skillmeat workflow validate ./my-deployment.yaml
# Create the workflow in the collection
skillmeat workflow create ./my-deployment.yaml --name "deployment-v2"
# Preview the execution plan
skillmeat workflow plan deployment-v2
# Run the workflow
skillmeat workflow run deployment-v2
# Check execution status
skillmeat workflow runs deployment-v2
Example 2: Run with Parameters¶
# List workflows to find the right one
skillmeat workflow list --tag ci
# Show the workflow to understand parameters
skillmeat workflow show ci-pipeline
# Plan with production environment override
skillmeat workflow plan ci-pipeline --param env=production
# Run with parameters
skillmeat workflow run ci-pipeline --param env=production --param skip_tests=false
Example 3: Monitor and Manage Execution¶
# Start an execution
skillmeat workflow run my-workflow
# In another terminal, watch recent executions
skillmeat workflow runs
# When a gate is waiting, approve it
skillmeat workflow approve abc123def456
# If something goes wrong, cancel
skillmeat workflow cancel abc123def456 --yes
# View detailed execution history with logs
skillmeat workflow runs abc123def456 --logs
Example 4: Batch Operations¶
# List all active workflows
skillmeat workflow list --status active
# Update a workflow definition
skillmeat workflow create ./updated.yaml --force
# Check recent executions across all workflows
skillmeat workflow runs --limit 50
# Find failed executions
skillmeat workflow runs --status failed
Error Handling¶
Common Errors¶
Workflow engine is coming soon.
The workflow feature flag is disabled.
Fix: Set SKILLMEAT_WORKFLOW_ENGINE_ENABLED=true in your environment.
Workflow '[name]' not found.
The specified workflow name doesn't exist.
Fix: Use skillmeat workflow list to see available workflows, or check the spelling.
[red]Workflow validation failed:[/red]
The YAML file has syntax or schema errors.
Fix: Review the error messages and correct the YAML, then use skillmeat workflow validate to test.
Error: Cannot read file: [error]
The specified file path doesn't exist or is unreadable.
Fix: Verify the file path and permissions.
Error: Failed to generate plan
The plan generation failed due to invalid parameters or DAG issues.
Fix: Check parameter values and workflow dependencies with skillmeat workflow show.
Debug Output¶
For more detailed troubleshooting information, use the --debug flag:
Debug output includes:
- File paths (for create, validate)
- DB IDs (for show)
- Full tracebacks (for errors)
- Parsing and validation details
Integration with Other Commands¶
The workflow CLI integrates with other SkillMeat features:
- Syncing workflows: Use
skillmeat syncto synchronize workflow artifacts between projects and upstream sources - Bundling workflows: Include workflows in artifact bundles with
skillmeat bundle - Listing artifacts: Find workflows alongside other artifacts with
skillmeat list - Searching: Search workflows by name or tag with
skillmeat search
See Also¶
- Workflow Authoring Guide — Learn how to write YAML workflow definitions
- Workflow Web UI Guide — Using the web interface for workflow management
- Workflow Execution API — Programmatic workflow control via REST API