/output-workflow-trace
Analyze Output SDK workflow execution traces. Use when debugging a specific workflow, examining step failures, analyzing input/output data, understanding execution flow, or when you have a workflow ID to investigate.
$ npx -y skills add growthxai/output --skill output-workflow-trace --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/output-workflow-trace
Context preview
The summary Claude sees to decide when to auto-load this skill.
Analyze Output SDK workflow execution traces. Use when debugging a specific workflow, examining step failures, analyzing input/output data, understanding execution flow, or when you have a workflow ID to investigate.
SKILL.md
output-workflow-trace.SKILL.mdname: output-workflow-trace
description: Analyze Output SDK workflow execution traces. Use when debugging a specific workflow, examining step failures, analyzing input/output data, understanding execution flow, or when you have a workflow ID to investigate.
allowed-tools: [Bash, Read]
Workflow Trace Analysis
Overview
This skill provides guidance on retrieving and analyzing workflow execution traces using the Output CLI. Traces show the complete execution history including step inputs, outputs, errors, and timing information.
When to Use This Skill
- You have a workflow ID and need to understand what happened
- A workflow failed and you need to identify which step failed
- You need to examine the input/output data at each step
- You want to understand the execution flow and timing
- You need to find error messages and stack traces
- Debugging retry behavior or unexpected results
Instructions
Step 1: Retrieve the Execution Trace
**Basic trace (text format, may be truncated):**
npx output workflow debug <workflowId>
**Full trace (JSON format, recommended for detailed analysis):**
npx output workflow debug <workflowId> --json
**Tip**: Always use `--json` when you need complete trace data. The text format truncates long values which can hide important debugging information.
Step 2: Analyze the Trace
Follow this checklist when examining a trace:
1. **Identify the failed step**: Look for steps with error status or failure indicators 2. **Examine error messages**: Find the exact error message and stack trace 3. **Check step inputs**: Verify the data passed to the failing step was correct 4. **Check step outputs**: Look at outputs from preceding steps 5. **Review retry attempts**: Note how many retries occurred and their outcomes 6. **Check timing**: Look for unusual delays that might indicate timeouts
Step 3: Use the Temporal UI for Visual Analysis
Open **http://localhost:8080** in your browser for a visual workflow inspection:
1. Search for your workflow by ID 2. View the event history timeline 3. Click on individual events to see details 4. Inspect step inputs and outputs 5. See retry attempts and timing information 6. Export trace data if needed
What to Look For in Traces
Error Patterns
| Error Message | Likely Cause | |---------------|--------------| | "incompatible schema" | Zod import issue - using `zod` instead of `@outputai/core` | | "non-deterministic" | Using Math.random(), Date.now(), etc. in workflow code | | "FatalError" with retry context | Try-catch wrapping step calls | | "undefined is not a function" | Missing schema definitions | | "workflow must be deterministic" | Direct I/O in workflow function | | "ECONNREFUSED" or timeout | Services not running or network issues |
Step Status Values
- **COMPLETED**: Step finished successfully
- **FAILED**: Step threw an error (may retry)
- **RETRYING**: Step is being retried after a failure
- **TIMED_OUT**: Step exceeded its timeout
- **CANCELLED**: Workflow was stopped before step completed
Key Trace Fields
When examining JSON traces, focus on these fields:
- `steps[].name`: Step identifier
- `steps[].status`: Execution result
- `steps[].input`: Data passed to the step
- `steps[].output`: Data returned from the step
- `steps[].error`: Error details if failed
- `steps[].attempts`: Number of execution attempts
- `steps[].duration`: How long the step took
Examples
**Scenario**: Debug a failed workflow
# Get the workflow ID from runs list
npx output workflow runs list --limit 5 --json
# Get detailed trace
npx output workflow debug abc123xyz --json
# Look for the failing step in the output
# Example output structure:
# {
# "workflowId": "abc123xyz",
# "status": "FAILED",
# "steps": [
# { "name": "fetchData", "status": "COMPLETED", ... },
# { "name": "processData", "status": "FAILED", "error": "..." }
# ]
# }**Scenario**: Investigate retry behavior
npx output workflow debug abc123xyz --json | jq '.steps[] | select(.attempts > 1)'
**Scenario**: Check inputs to a specific step
npx output workflow debug abc123xyz --json | jq '.steps[] | select(.name == "processData") | .input'
Next Steps After Analysis
1. Match the error to common patterns (see error skills) 2. Consult the `workflow-quality` subagent for best practices 3. Make code fixes based on identified issues 4. Re-run the workflow: `npx output workflow run <workflowName> --input '<input>'` 5. Verify the fix with a new trace
Read more
name: output-workflow-trace description: Analyze Output SDK workflow execution traces. Use when debugging a specific workflow, examining step failures, analyzing input/output data, understanding execution flow, or when you have a workflow ID to investigate. allowed-tools: [Bash, Read]
Workflow Trace Analysis
Overview
This skill provides guidance on retrieving and analyzing workflow execution traces using the Output CLI. Traces show the complete execution history including step inputs, outputs, errors, and timing information.
When to Use This Skill
- You have a workflow ID and need to understand what happened
- A workflow failed and you need to identify which step failed
- You need to examine the input/output data at each step
- You want to understand the execution flow and timing
- You need to find error messages and stack traces
- Debugging retry behavior or unexpected results
Instructions
Step 1: Retrieve the Execution Trace
**Basic trace (text format, may be truncated):**
npx output workflow debug <workflowId>
**Full trace (JSON format, recommended for detailed analysis):**
npx output workflow debug <workflowId> --json
**Tip**: Always use `--json` when you need complete trace data. The text format truncates long values which can hide important debugging information.
Step 2: Analyze the Trace
Follow this checklist when examining a trace:
1. **Identify the failed step**: Look for steps with error status or failure indicators 2. **Examine error messages**: Find the exact error message and stack trace 3. **Check step inputs**: Verify the data passed to the failing step was correct 4. **Check step outputs**: Look at outputs from preceding steps 5. **Review retry attempts**: Note how many retries occurred and their outcomes 6. **Check timing**: Look for unusual delays that might indicate timeouts
Step 3: Use the Temporal UI for Visual Analysis
Open **http://localhost:8080** in your browser for a visual workflow inspection:
1. Search for your workflow by ID 2. View the event history timeline 3. Click on individual events to see details 4. Inspect step inputs and outputs 5. See retry attempts and timing information 6. Export trace data if needed
What to Look For in Traces
Error Patterns
| Error Message | Likely Cause | |---------------|--------------| | "incompatible schema" | Zod import issue - using `zod` instead of `@outputai/core` | | "non-deterministic" | Using Math.random(), Date.now(), etc. in workflow code | | "FatalError" with retry context | Try-catch wrapping step calls | | "undefined is not a function" | Missing schema definitions | | "workflow must be deterministic" | Direct I/O in workflow function | | "ECONNREFUSED" or timeout | Services not running or network issues |
Step Status Values
- **COMPLETED**: Step finished successfully
- **FAILED**: Step threw an error (may retry)
- **RETRYING**: Step is being retried after a failure
- **TIMED_OUT**: Step exceeded its timeout
- **CANCELLED**: Workflow was stopped before step completed
Key Trace Fields
When examining JSON traces, focus on these fields:
- `steps[].name`: Step identifier
- `steps[].status`: Execution result
- `steps[].input`: Data passed to the step
- `steps[].output`: Data returned from the step
- `steps[].error`: Error details if failed
- `steps[].attempts`: Number of execution attempts
- `steps[].duration`: How long the step took
Examples
**Scenario**: Debug a failed workflow
# Get the workflow ID from runs list
npx output workflow runs list --limit 5 --json
# Get detailed trace
npx output workflow debug abc123xyz --json
# Look for the failing step in the output
# Example output structure:
# {
# "workflowId": "abc123xyz",
# "status": "FAILED",
# "steps": [
# { "name": "fetchData", "status": "COMPLETED", ... },
# { "name": "processData", "status": "FAILED", "error": "..." }
# ]
# }**Scenario**: Investigate retry behavior
npx output workflow debug abc123xyz --json | jq '.steps[] | select(.attempts > 1)'
**Scenario**: Check inputs to a specific step
npx output workflow debug abc123xyz --json | jq '.steps[] | select(.name == "processData") | .input'
Next Steps After Analysis
1. Match the error to common patterns (see error skills) 2. Consult the `workflow-quality` subagent for best practices 3. Make code fixes based on identified issues 4. Re-run the workflow: `npx output workflow run <workflowName> --input '<input>'` 5. Verify the fix with a new trace
The open-source TypeScript framework for building AI workflows and agents. Designed for Claude Code — describe what you want, Claude builds it, with all the best practices already in place. One framework.
Repo: growthxai/output
Other skills on output.
- /llm-output-schema-constraints
Zod schema constraints that Anthropic rejects or silently ignores when sent as structured-output tool definitions via Output.object(). Use when writing or reviewing Zod schemas passed to Output.object(), or debugging structured-output validation errors.
Open skill - /prompt-file-provider-options
Guide to the providerOptions structure in .prompt files — decision tree for where an option goes, common mistakes, per-provider quick reference, and Anthropic prompt caching. Use when writing or reviewing .prompt file frontmatter (provider, model, providerOptions,
Open skill - /validate
Run lint, build, and tests to validate changes are correct
Open skill - /output-build-workflow
Implement an Output SDK workflow from a plan document. Use when the user asks to build, implement, or code a workflow from an existing plan, or after output-plan-workflow has produced a plan and the user is ready to build.
Open skill - /output-credentials-edit
View and edit encrypted credentials in an Output.ai project. Use when adding secrets, updating API keys, verifying credential values, or retrieving a specific credential.
Open skill - /output-credentials-env-vars
Wire encrypted credentials to environment variables using the credential: convention. Use when setting up LLM provider keys (ANTHROPIC_API_KEY, OPENAI_API_KEY) or any env var that should come from encrypted credentials.
Open skill

