cost-per-task

cost-per-task is a command for Claude Code from alexclowe/awesome-claude-cowork-plugins. It costs 22 tokens per session (641 once invoked), scanned A, original, MIT.

A unit-economics calculator for finding the cost of an AI workflow's successful result, including retries, failures, quality checks, and shared subscription costs.

In plain words
What is it for?
Use it to define a successful task, calculate its full cost, compare workflows, test sensitivity to retries and model choices, and identify ways to reduce cost.
Why use it?
A token or request price does not show what a usable outcome costs, especially when runs fail or require human rework.

Command for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the finops-practitioner plugin — 2 skills, 5 commands shipped together

Good fit Use it to define a successful task, calculate its full cost, compare workflows, test sensitivity to retries and model choices, and identify ways to reduce cost.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/alexclowe/awesome-claude-cowork-plugins/cost-per-task
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/alexclowe/awesome-claude-cowork-plugins

Made for: Claude Code.

Or install finops-practitioner, the plugin that ships this one along with the rest of its 2 skills, 5 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cost-per-task

README.md
[![agentmods](https://agentmods.dev/badge/commands/alexclowe/awesome-claude-cowork-plugins/cost-per-task/github.svg)](https://agentmods.dev/commands/alexclowe/awesome-claude-cowork-plugins/cost-per-task)
Your own site
<a href="https://agentmods.dev/commands/alexclowe/awesome-claude-cowork-plugins/cost-per-task"><img src="https://agentmods.dev/badge/commands/alexclowe/awesome-claude-cowork-plugins/cost-per-task/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cost-per-task

Your own site · 80×15
<a href="https://agentmods.dev/commands/alexclowe/awesome-claude-cowork-plugins/cost-per-task"><img src="https://agentmods.dev/badge/commands/alexclowe/awesome-claude-cowork-plugins/cost-per-task.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 641 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00022 $0.00641
Opus 5.5 $0.00009 $0.00256
Sonnet 5.5 $0.00004 $0.00128
Haiku 4.5 $0.00002 $0.00064

Measured 22d ago against content hash 00160f9d8d74, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

cost-per-task scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 22d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

finops-practitioner/commands/cost-per-task.md · 45 lines

How it starts

The opening of the file, as written. The whole thing — 45 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a FinOps assistant helping a practitioner turn raw AI usage data into unit economics — the cost of a successful outcome, not the cost of a token.

The user will provide cost/usage data for one or more AI workflows (API bills, token counts, request logs, subscription costs) and a description of what the workflow produces. Your job is to:

  1. Pin down the unit — what one "successful task" is for this workflow (a resolved ticket, a shipped PR, a qualified lead summary). If the user hasn't defined success, propose 2–3 candidate definitions and show the math for each
  2. Build the full cost numerator — model/API costs INCLUDING retries, failed runs, guardrail/eval overhead, and the amortized share of any subscription or reserved capacity the workflow rides on
  3. Build an honest denominator — successful tasks only; tasks that needed human rework count at a discounted rate or as failures, per the user's quality bar
  4. Compute and contextualize — cost per successful task, how it moves with volume, and where the number is most sensitive (retry rate? model choice? prompt length?)
  5. Recommend the levers — the 2–3 changes that would most improve the unit economics, and explicitly flag any lever that would trade quality for cost

Output format

Unit definition

  • The success unit used (or the candidate definitions compared) and the quality bar applied

Cost per successful task

Workflow Total monthly cost Successful tasks Cost / successful task Cost / attempted task

What's inside the numerator

  • Line items included (model calls, retries, evals, subscription amortization) and anything excluded for lack of data, marked [Confirm: …]

Sensitivity

  • The one or two inputs that move the number most, with the direction and rough magnitude

Levers

  • Ranked changes worth testing, each with its expected effect and its quality risk stated plainly

Read the full file on GitHub · 45 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 22d ago First seen · 45 lines · 22 tokens per session scan A 00160f9d8d74

Subscribe to this mod's changes

cost-per-task is a command published in the GitHub repository alexclowe/awesome-claude-cowork-plugins (30 stars, last pushed 3d ago), licensed MIT. It adds 22 tokens to every session and 641 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-24.