/output-dev-workflow-cost
Calculate and display the cost of an Output SDK workflow execution run. Use when checking LLM token costs, API service costs, or total spend for a specific workflow run.
$ npx -y skills add growthxai/output --skill output-dev-workflow-cost --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-dev-workflow-cost
Context preview
The summary Claude sees to decide when to auto-load this skill.
Calculate and display the cost of an Output SDK workflow execution run. Use when checking LLM token costs, API service costs, or total spend for a specific workflow run.
SKILL.md
output-dev-workflow-cost.SKILL.mdname: output-dev-workflow-cost
description: Calculate and display the cost of an Output SDK workflow execution run. Use when checking LLM token costs, API service costs, or total spend for a specific workflow run.
allowed-tools: [Bash]
Workflow Run Cost
Overview
This skill helps you calculate the cost of a completed workflow execution using the Output CLI. It breaks down costs by LLM model (token usage) and external API service calls.
When to Use This Skill
- Checking how much a workflow run cost in LLM tokens
- Analyzing API service spend per workflow execution
- Comparing costs between workflow runs
- Presenting cost data during a demo or review
---
Step 1: Get a Workflow Run ID
The `workflow cost` command requires a **workflow run ID** — not the workflow name.
A run ID looks like: `process_transcripts_2026-03-23T19:35:17.000Z_c2biRk_F9rYktF-wagBf5`
If you already have a run ID, skip to Step 2.
If you don't have a run ID:
**Option A — List recent runs** (use skill: `output-workflow-runs-list`):
npx output workflow runs list <workflowName> --limit 5
Copy the run ID from the most recent completed run.
**Option B — Run the workflow now and capture the ID:**
If you know the input, run it synchronously and the run ID will be in the output:
npx output workflow run <workflowName> --input '{"key": "value"}'Or asynchronously (use skill: `output-workflow-start`):
npx output workflow start <workflowName> --input '{"key": "value"}'
# Returns: Workflow ID: <runId>If you don't know the input, check for a scenario file (use skill: `output-dev-scenario-file`) or the workflow's `inputSchema` in its `types.ts`.
> **Note:** The workflow **name** (e.g. `process_transcripts`) identifies the workflow type. The workflow **run ID** (e.g. `process_transcripts_2026-03-23T19:35:17.000Z_abc123`) identifies a specific execution. `workflow cost` requires the run ID.
---
Step 2: Calculate the Cost
Basic usage (text output):
npx output workflow cost <runId>
With a local trace file:
npx output workflow cost <runId> path/to/trace.json
JSON output (for programmatic use or display):
npx output workflow cost <runId> --json
Verbose — show per-call breakdown:
npx output workflow cost <runId> --verbose
All flags:
| Flag | Description | Default | |------|-------------|---------| | `--json` | Output machine-readable JSON instead of the text report | `false` | | `--verbose` | Show detailed per-LLM-call breakdown | `false` |
---
Understanding the Output
Text format example:
> Pricing values are illustrative — the model and per-token rates shown below were current as of 2026-05-04. Live pricing comes from [models.dev](https://models.dev). For current model IDs, see [`output-dev-model-selection`](../output-dev-model-selection/SKILL.md).
Costs come in two figures per row: **Original** is the as-charged cost recorded in the trace events (`llm:usage` / `http:request:cost`), and **Adjusted** is the cost after applying any `costs.yml` override (equal to Original when no override applies). The bottom line and JSON `totalCost` are the Adjusted total.
Workflow: process_transcripts
Duration: 12.3s
LLM Costs:
Model | Calls | Original | Adjusted
claude-sonnet-4-6 | 3 | $0.0123 | $0.0123
Subtotal | 3 | $0.0123 | $0.0123
API Costs:
Host | Calls | Original | Adjusted
r.jina.ai | 2 | $0.0040 | $0.0040
Subtotal | 2 | $0.0040 | $0.0040
TOTAL ESTIMATED COST (adjusted) $0.0163
As-charged (from trace) $0.0163
JSON format fields:
{
"workflowName": "process_transcripts",
"durationMs": 12300,
"llmOriginalCost": 0.0123,
"llmAdjustedCost": 0.0123,
"totalInputTokens": 1234,
"totalOutputTokens": 567,
"httpCosts": [{ "host": "r.jina.ai", "originalTotalCost": 0.004, "adjustedTotalCost": 0.004 }],
"httpOriginalCost": 0.004,
"httpAdjustedCost": 0.004,
"originalTotalCost": 0.0163,
"totalCost": 0.0163
}Per-call entries in `llmCalls` and `httpCosts[].calls` carry `originalCost` and `adjustedCost`. (Older releases exposed `llmTotalCost`, `services[]`, `serviceTotalCost`, and `unknownModels` — replaced by the fields above.)
---
Examples
**Get cost of the last run:**
# First get the run ID
npx output workflow runs list process_transcripts --limit 1 --json
# Then get the cost
npx output workflow cost process_transcripts_2026-03-23T19:35:17.000Z_abc123
**Get cost as JSON and extract total:**
npx output workflow cost <runId> --json | jq '.totalCost'
**Show full per-call breakdown:**
npx output workflow cost <runId> --verbose
---
Related Skills
- `output-workflow-runs-list` — Find run IDs from execution history
- `output-workflow-start` — Start a workflow and capture its run ID
- `output-workflow-run` — Run a workflow synchronously
- `output-dev-scenario-file` — Create or find scenario files for workflow input
Read more
name: output-dev-workflow-cost description: Calculate and display the cost of an Output SDK workflow execution run. Use when checking LLM token costs, API service costs, or total spend for a specific workflow run. allowed-tools: [Bash]
Workflow Run Cost
Overview
This skill helps you calculate the cost of a completed workflow execution using the Output CLI. It breaks down costs by LLM model (token usage) and external API service calls.
When to Use This Skill
- Checking how much a workflow run cost in LLM tokens
- Analyzing API service spend per workflow execution
- Comparing costs between workflow runs
- Presenting cost data during a demo or review
---
Step 1: Get a Workflow Run ID
The `workflow cost` command requires a **workflow run ID** — not the workflow name.
A run ID looks like: `process_transcripts_2026-03-23T19:35:17.000Z_c2biRk_F9rYktF-wagBf5`
If you already have a run ID, skip to Step 2.
If you don't have a run ID:
**Option A — List recent runs** (use skill: `output-workflow-runs-list`):
npx output workflow runs list <workflowName> --limit 5
Copy the run ID from the most recent completed run.
**Option B — Run the workflow now and capture the ID:**
If you know the input, run it synchronously and the run ID will be in the output:
npx output workflow run <workflowName> --input '{"key": "value"}'Or asynchronously (use skill: `output-workflow-start`):
npx output workflow start <workflowName> --input '{"key": "value"}'
# Returns: Workflow ID: <runId>If you don't know the input, check for a scenario file (use skill: `output-dev-scenario-file`) or the workflow's `inputSchema` in its `types.ts`.
> **Note:** The workflow **name** (e.g. `process_transcripts`) identifies the workflow type. The workflow **run ID** (e.g. `process_transcripts_2026-03-23T19:35:17.000Z_abc123`) identifies a specific execution. `workflow cost` requires the run ID.
---
Step 2: Calculate the Cost
Basic usage (text output):
npx output workflow cost <runId>
With a local trace file:
npx output workflow cost <runId> path/to/trace.json
JSON output (for programmatic use or display):
npx output workflow cost <runId> --json
Verbose — show per-call breakdown:
npx output workflow cost <runId> --verbose
All flags:
| Flag | Description | Default | |------|-------------|---------| | `--json` | Output machine-readable JSON instead of the text report | `false` | | `--verbose` | Show detailed per-LLM-call breakdown | `false` |
---
Understanding the Output
Text format example:
> Pricing values are illustrative — the model and per-token rates shown below were current as of 2026-05-04. Live pricing comes from [models.dev](https://models.dev). For current model IDs, see [`output-dev-model-selection`](../output-dev-model-selection/SKILL.md).
Costs come in two figures per row: **Original** is the as-charged cost recorded in the trace events (`llm:usage` / `http:request:cost`), and **Adjusted** is the cost after applying any `costs.yml` override (equal to Original when no override applies). The bottom line and JSON `totalCost` are the Adjusted total.
Workflow: process_transcripts Duration: 12.3s LLM Costs: Model | Calls | Original | Adjusted claude-sonnet-4-6 | 3 | $0.0123 | $0.0123 Subtotal | 3 | $0.0123 | $0.0123 API Costs: Host | Calls | Original | Adjusted r.jina.ai | 2 | $0.0040 | $0.0040 Subtotal | 2 | $0.0040 | $0.0040 TOTAL ESTIMATED COST (adjusted) $0.0163 As-charged (from trace) $0.0163
JSON format fields:
{
"workflowName": "process_transcripts",
"durationMs": 12300,
"llmOriginalCost": 0.0123,
"llmAdjustedCost": 0.0123,
"totalInputTokens": 1234,
"totalOutputTokens": 567,
"httpCosts": [{ "host": "r.jina.ai", "originalTotalCost": 0.004, "adjustedTotalCost": 0.004 }],
"httpOriginalCost": 0.004,
"httpAdjustedCost": 0.004,
"originalTotalCost": 0.0163,
"totalCost": 0.0163
}Per-call entries in `llmCalls` and `httpCosts[].calls` carry `originalCost` and `adjustedCost`. (Older releases exposed `llmTotalCost`, `services[]`, `serviceTotalCost`, and `unknownModels` — replaced by the fields above.)
---
Examples
**Get cost of the last run:**
# First get the run ID npx output workflow runs list process_transcripts --limit 1 --json # Then get the cost npx output workflow cost process_transcripts_2026-03-23T19:35:17.000Z_abc123
**Get cost as JSON and extract total:**
npx output workflow cost <runId> --json | jq '.totalCost'
**Show full per-call breakdown:**
npx output workflow cost <runId> --verbose
---
Related Skills
- `output-workflow-runs-list` — Find run IDs from execution history
- `output-workflow-start` — Start a workflow and capture its run ID
- `output-workflow-run` — Run a workflow synchronously
- `output-dev-scenario-file` — Create or find scenario files for workflow input
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

