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.
What this skill does
# 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-23-19-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`):
```bash
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:
```bash
npx output workflow run <workflowName> --input '{"key": "value"}'
```
Or asynchronously (use skill: `output-workflow-start`):
```bash
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):
```bash
npx output workflow cost <runId>
```
### With a local trace file:
```bash
npx output workflow cost <runId> path/to/trace.json
```
### JSON output (for programmatic use or display):
```bash
npx output workflow cost <runId> --format json
```
### Verbose — show per-call breakdown:
```bash
npx output workflow cost <runId> --verbose
```
### All flags:
| Flag | Description | Default |
|------|-------------|---------|
| `--format <type>` | Output format: `text` or `json` | `text` |
| `--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).
```
Workflow: process_transcripts
Duration: 12.3s
LLM Costs:
claude-sonnet-4-6 — 1,234 in / 567 out tokens — $0.0123
Services:
jina — 2 requests — $0.004
Total Cost: $0.0163
```
### JSON format fields:
```json
{
"workflowName": "process_transcripts",
"durationMs": 12300,
"llmTotalCost": 0.0123,
"totalInputTokens": 1234,
"totalOutputTokens": 567,
"services": [{ "serviceName": "jina", "totalCost": 0.004 }],
"totalCost": 0.0163
}
```
---
## Examples
**Get cost of the last run:**
```bash
# 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:**
```bash
npx output workflow cost <runId> --format json | jq '.totalCost'
```
**Show full per-call breakdown:**
```bash
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
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.