paygo-ptu-cost-analyzer

paygo-ptu-cost-analyzer is a skill for Claude Code, Codex from aiappsgbb/awesome-gbb. It costs 199 tokens per session (3,582 once invoked), scanned A, original, MIT.

A command-line cost analysis tool for comparing Azure OpenAI pay-as-you-go pricing with provisioned throughput units, or PTUs, which reserve model capacity. It accepts token-usage data and produces Markdown, JSON, and chart reports.

In plain words
What is it for?
Use it with CSV exports or Azure monitoring queries to estimate costs at different usage percentiles and prepare capacity-planning reports.
Why use it?
Choosing between flexible usage pricing and reserved capacity requires understanding demand peaks, capacity needs, and spillover costs. This tool turns usage history into a sizing and pricing comparison.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is **Continuous monitoring companion.** [`foundry-cost-monitoring`](../foundry-cost-monitoring/SKILL.md).

Good fit Use it with CSV exports or Azure monitoring queries to estimate costs at different usage percentiles and prepare capacity-planning reports.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/aiappsgbb/awesome-gbb
agentmods
npx agentmods add skills/aiappsgbb/awesome-gbb/paygo-ptu-cost-analyzer

Made for: Claude Code, Codex.

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 paygo-ptu-cost-analyzer

README.md
[![agentmods](https://agentmods.dev/badge/skills/aiappsgbb/awesome-gbb/paygo-ptu-cost-analyzer/github.svg)](https://agentmods.dev/skills/aiappsgbb/awesome-gbb/paygo-ptu-cost-analyzer)
Your own site
<a href="https://agentmods.dev/skills/aiappsgbb/awesome-gbb/paygo-ptu-cost-analyzer"><img src="https://agentmods.dev/badge/skills/aiappsgbb/awesome-gbb/paygo-ptu-cost-analyzer/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 paygo-ptu-cost-analyzer

Your own site · 80×15
<a href="https://agentmods.dev/skills/aiappsgbb/awesome-gbb/paygo-ptu-cost-analyzer"><img src="https://agentmods.dev/badge/skills/aiappsgbb/awesome-gbb/paygo-ptu-cost-analyzer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 199 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,582 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Excessive Agency · line 104
    Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.
    Fix: Remove the model/provider override or disclose it prominently and require explicit operator approval before invoking an external coding CLI or billed model.
How audits are shown
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.00199 $0.03582
Opus 5 $0.00100 $0.01791
Sonnet 5 $0.00040 $0.00716
Haiku 4.5 $0.00020 $0.00358

Measured 11d ago against content hash 7690961037d0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

paygo-ptu-cost-analyzer 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 11d ago.

The scan reads SKILL.md. This mod also ships 6 executable files (references/analyzer/__init__.py, references/analyzer/analysis.py, references/analyzer/data.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/paygo-ptu-cost-analyzer/SKILL.md · 277 lines

How it starts

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

PAYGO vs PTU Cost Analyzer

Headless cost-analysis skill for Azure OpenAI. Given a window of per-minute token usage, it computes the percentile TPM envelope, prices both PAYGO and PTU scenarios per percentile, estimates spillover costs, and emits a markdown + JSON + PNG report.

This is the analysis core of aiappsgbb/ptu-paygo-mix wrapped in a CLI; the upstream Streamlit UI is excluded by design (this skill runs in a terminal, in CI, or inside an agent — never as a web app).

Sister capability. If you actually want the interactive UI, use the upstream repo directly (uv run streamlit run app/streamlit_app.py). This skill is for the cases where the seller / analyst / agent needs a report file — over chat, in a PR, or as part of an automated capacity-planning rollup.

Continuous monitoring companion. foundry-cost-monitoring consumes live OTel gen_ai.usage.* spans for per-agent / per-project cost projection — use it when the FinOps question is "what's my spend right now?" rather than "how should I size PTU?"


Two data paths

Path When to use Auth needed
--csv <path> Customer already exported their token usage (e.g. via the upstream docs/sample_kql_queries.md, Excel, Cost Mgmt export). None.
--workspace <id> You have direct read access on the Log Analytics workspace ingesting Cognitive Services metrics. DefaultAzureCredential (az login / managed identity / env vars / VS Code) with Log Analytics Reader on the workspace.
--synthetic Offline demo, regression test, or you need to show the report shape before real data lands. None.

All three paths converge on the same run_analysis() and render_report() so the output contract is identical.

Required CSV schema

Column Type Notes
minute_bin datetime (parseable) Per-minute bucket.
input_tokens_sum int Total input tokens in the bucket (includes cached).
cached_tokens_sum int Subset of input_tokens_sum that hit the prompt cache.
output_tokens_sum int Generated tokens.

Read the full file on GitHub · 277 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. 11d ago First seen · 277 lines · 199 tokens per session scan A 7690961037d0

Subscribe to this mod's changes

paygo-ptu-cost-analyzer is a skill published in the GitHub repository aiappsgbb/awesome-gbb (5 stars, last pushed 4d ago), licensed MIT. It adds 199 tokens to every session and 3,582 once invoked, about $0.0010 per session on Opus 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-08-31.

Related

Other skills, from other repositories

sector-rotation

An analysis framework for comparing industries in the Chinese A-share stock market, using business conditions, price momentum, valuation, and money flows. It produces rankings and higher- or lower-allocation suggestions.

HKUDS/Vibe-Trading · 39 tokens

strategy-pivot-designer

Detect backtest iteration stagnation and generate structurally different strategy pivot proposals when parameter tuning reaches a local optimum.

tradermonty/claude-trading-skills · 28 tokens

twitter-reader

Read Twitter/X for financial research using opencli (read-only). Use this skill whenever the user wants to read their Twitter feed, search for financial tweets, view bookmarks, look up user profiles, or gather market sentiment from Twitter/X. Triggers include: "check my feed", "search Twitter for", "show my…

himself65/finance-skills · 161 tokens

chenhao-limit-up

A framework for judging Chinese A-share stocks that have reached the daily price-rise limit, using market mood, sector leadership, and trading momentum.

questflowai/investorskills · 44 tokens

trading-risk-gate

Unified pre-trade safety gate: Ruin check (Law #1), ergodicity audit, and win-rate dominance validation. Absorbs: ergodicity-check, law-of-ruin, win-rate-dominance.

winstonkoh87/Athena-Public · 53 tokens

furusato

A Japanese hometown-tax donation manager for furusato nozei, a system where donations to municipalities can qualify for an income-tax or local-tax deduction. It reads donation receipts, stores donation records, and calculates deduction limits.

kazukinagata/shinkoku · 102 tokens