output-workflow-run
Execute an Output SDK workflow synchronously and wait for the result. Use when running a workflow and needing immediate results, testing workflow execution, or getting the output directly in the terminal.
What this skill does
# Run Workflow Synchronously
## Overview
This skill executes a workflow synchronously, meaning the command waits for the workflow to complete and returns the result directly. This is ideal for testing, quick executions, and when you need immediate feedback.
## When to Use This Skill
- Testing a workflow during development
- Running a workflow and needing the result immediately
- Quick one-off workflow executions
- Debugging by re-running a workflow with different inputs
- When you don't need to monitor the workflow separately
## When to Use Async Instead
Consider using `npx output workflow start` (async) when:
- The workflow takes a long time (minutes to hours)
- You need to run multiple workflows in parallel
- You want to disconnect and check results later
- You need to monitor progress separately
## Instructions
### Basic Syntax
```bash
npx output workflow run <workflowName> --input '<json-input>'
npx output workflow run <workflowName> --input <path-to-json-file>
```
The `--input` flag is required when the workflow expects input data.
### Input Methods
#### 1. Inline JSON
Pass JSON directly on the command line:
```bash
npx output workflow run example --input '{"question": "who really is ada lovelace?"}'
```
#### 2. File Path (Recommended)
Reference a JSON file containing the input:
```bash
npx output workflow run simple --input src/simple/scenarios/question_ada_lovelace.json
```
This is the recommended approach because:
- Input is version controlled and reproducible
- Complex inputs are easier to read and edit
- Scenarios can be shared and reused
### Scenario Folder Pattern (Best Practice)
Workflows typically have a `scenarios/` folder containing test inputs:
```
src/
my_workflow/
workflow.ts
steps.ts
scenarios/
basic_test.json
edge_case_empty.json
large_payload.json
```
**Best practice workflow:**
1. Create a scenario file with your input:
```bash
# Create scenarios folder if it doesn't exist
mkdir -p src/my_workflow/scenarios
```
2. Write your input to a scenario file:
```json
// src/my_workflow/scenarios/test_user.json
{
"userId": "123",
"options": {
"verbose": true
}
}
```
3. Run the workflow referencing the scenario:
```bash
npx output workflow run my_workflow --input src/my_workflow/scenarios/test_user.json
```
### Input Examples
```bash
# Inline JSON - simple object
npx output workflow run my-workflow --input '{"userId": "123"}'
# Inline JSON - complex nested input
npx output workflow run data-pipeline --input '{"source": "api", "options": {"limit": 100}}'
# File path - reference a scenario file
npx output workflow run simple --input src/simple/scenarios/basic.json
# File path - relative to current directory
npx output workflow run batch-processor --input ./test_inputs/batch1.json
# No input (only if workflow doesn't require it)
npx output workflow run health-check
```
## Understanding the Output
The command returns the workflow result directly to stdout.
### Success Output
The workflow's return value is displayed, typically as JSON.
### Error Output
If the workflow fails, you'll see:
- Error message
- The workflow ID (for further debugging)
- Suggestion to use `npx output workflow debug` for details
## Examples
**Scenario**: Test a workflow with a scenario file
```bash
# First, look for existing scenarios
ls src/simple/scenarios/
# Run using a scenario file
npx output workflow run simple --input src/simple/scenarios/basic_sum.json
# Output:
# { "sum": 6, "count": 3 }
```
**Scenario**: Create and run a new test scenario
```bash
# Create a scenario file
cat > src/my_workflow/scenarios/test_case_1.json << 'EOF'
{
"question": "What is the capital of France?",
"context": "geography"
}
EOF
# Run the workflow
npx output workflow run my_workflow --input src/my_workflow/scenarios/test_case_1.json
```
**Scenario**: Quick inline test during development
```bash
npx output workflow run example --input '{"question": "explain quantum computing"}'
```
**Scenario**: Re-run a workflow with different input for debugging
```bash
# First attempt with scenario file
npx output workflow run process-data --input src/process_data/scenarios/user_abc.json
# Error occurs
# Create a new scenario to isolate the issue
cat > src/process_data/scenarios/debug_minimal.json << 'EOF'
{"id": "test", "debug": true}
EOF
npx output workflow run process-data --input src/process_data/scenarios/debug_minimal.json
```
**Scenario**: Capture output for further processing
```bash
# Save result to a file
npx output workflow run generate-report --input src/generate_report/scenarios/jan_2024.json > report.json
# Pipe to jq for processing
npx output workflow run get-users --input src/get_users/scenarios/active.json | jq '.users[].name'
```
## Error Handling
### Common Errors
| Error | Cause | Solution |
|-------|-------|----------|
| "Workflow not found" | Workflow name is incorrect | Check with `npx output workflow list` |
| "Invalid input" | JSON doesn't match schema | Verify input matches workflow's inputSchema |
| "Parse error" | Malformed JSON or file not found | Check JSON syntax or file path |
| "Timeout" | Workflow took too long | Use async execution for long workflows |
### Getting More Details on Failures
When a workflow fails, the output includes the workflow ID. Use it to get the full trace:
```bash
npx output workflow run my-workflow --input src/my_workflow/scenarios/test.json
# Output: Workflow failed. ID: abc123xyz
npx output workflow debug abc123xyz --format json
```
## Input Schema Tips
1. **Check the schema first**: Look at the workflow's `inputSchema` in the code
2. **Use scenario files**: Create reusable test inputs in the workflow's `scenarios/` folder
3. **Use proper types**: Strings in quotes, numbers without quotes, booleans as true/false
4. **Include required fields**: All non-optional schema fields must be provided
## Related Commands
- `npx output workflow start <name> --input` - Start asynchronously
- `npx output workflow list` - See available workflows
- `npx output workflow debug <id>` - Debug a failed run
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.