From outputai
Calculates and displays costs for Output SDK workflow executions, including LLM token usage and API service calls. Use for cost analysis of specific runs.
npx claudepluginhub growthxai/output --plugin outputaiThis skill is limited to using the following tools:
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.
Tracks LLM tokens, API calls (fal.ai, Brave, Firecrawl), execution time per skill; generates session cost reports. Triggers on 'cost', 'tokens', 'budget' queries.
Analyzes Output SDK workflow execution traces to debug step failures, examine inputs/outputs, understand flow/timing, and identify errors using CLI commands and Temporal UI. Use with workflow IDs.
Tracks token usage and estimates costs for AI agent sessions. Use for monitoring spend, budget limits, or generating reports.
Share bugs, ideas, or general feedback.
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.
The workflow cost command requires a workflow run ID — not the workflow name.
A run ID looks like: process_transcripts_2026-03-23-19-35-17-000Z_c2biRk_F9rYktF-wagBf5
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 costrequires the run ID.
npx output workflow cost <runId>
npx output workflow cost <runId> path/to/trace.json
npx output workflow cost <runId> --format json
npx output workflow cost <runId> --verbose
| Flag | Description | Default |
|---|---|---|
--format <type> | Output format: text or json | text |
--verbose | Show detailed per-LLM-call breakdown | false |
Workflow: process_transcripts
Duration: 12.3s
LLM Costs:
claude-sonnet-4 — 1,234 in / 567 out tokens — $0.0123
Services:
jina — 2 requests — $0.004
Total Cost: $0.0163
{
"workflowName": "process_transcripts",
"durationMs": 12300,
"llmTotalCost": 0.0123,
"totalInputTokens": 1234,
"totalOutputTokens": 567,
"services": [{ "serviceName": "jina", "totalCost": 0.004 }],
"totalCost": 0.0163
}
Get cost of the last run:
# First get the run ID
npx output workflow runs list process_transcripts --limit 1 --format 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> --format json | jq '.totalCost'
Show full per-call breakdown:
npx output workflow cost <runId> --verbose
output-workflow-runs-list — Find run IDs from execution historyoutput-workflow-start — Start a workflow and capture its run IDoutput-workflow-run — Run a workflow synchronouslyoutput-dev-scenario-file — Create or find scenario files for workflow input