/payg-pricing:pricing-estimationfrom payg-pricing
Estimates monthly PAYG costs for a dltHub workspace by analyzing job schedules, run durations, and instance sizes. Outputs per-job cost tables, a price range, and an optional shareable HTML report.
Ships in payg-pricing. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Turn the customer's trial workspace into a predictable monthly bill: a per-job table, an expected-to-high range, and the cheapest ways to lower it. Output is markdown tables, inline, plus an optional one-page HTML report to share.
instance set runs on the smallest tier.You never do arithmetic. payg_estimate.py, next to this file, computes every number: runs
per month, run-time statistics, hours, costs, the what-if table and every saving. Your job is to
copy facts into a JSON file, choose which changes to propose, and paste the script's output.
Before anything else, ask: "Does your dltHub workspace run in the US or the EU?" The answer
sets the currency of every figure: US → "currency": "USD" (dollars), EU → "currency": "EUR"
(euros). Never assume it; the script refuses to run without it. Ask only the question: don't tell
the user the hourly price or that it is the same number in both regions.
Run from the project root. Jobs are the scheduled unit, not pipelines — a pipeline split into several jobs gives several rows.
uv run dlthub --non-interactive job list # jobs and their triggers
uv run dlthub --non-interactive job runs list <job> # recent runs, status and timing
uv run dlthub --non-interactive job runs info <job> <n> # one run's timing, if the list lacks it
uv run dlthub --non-interactive deploy --show-manifest # require.instance.size per job
CLI reference: https://dlthub.com/docs/hub/command-line-interface.md
Write reports/payg-estimate.json in the shape documented at the top of payg_estimate.py. Per
job, copy, don't compute:
| Field | What to copy |
|---|---|
schedule | The trigger as written: {"every": 15, "unit": "minutes"} (or "hours" / "days"), or {"cron": "0 9 * * 1-5"}. Don't convert it to runs per day |
runs | Each recent run's duration in minutes and its status ("ok" / "failed"), as listed — up to the last 20. Don't average them. A job whose runs all failed is fine: it is billed for the failed time |
size, multiplier | Size from the manifest (none set = smallest tier); multiplier from the instance-size docs |
loading | "incremental" or "full", from the customer's answer (Step 3). Leave it out when they don't know: the script treats the job as incremental and says so |
Interactive / served jobs (@run.interactive, dlthub serve — MCP servers, dashboards,
notebooks, APIs) have no runs. Ask how many hours per day they stay up and use
{"always_on_hours_per_day": <answer>} as the schedule.
Event-triggered jobs (follow-ups, triggers docs): copy the event, never the upstream's schedule. The script counts runs from the upstream's runs and failure share, so a job that runs on failure isn't counted once per upstream run.
| Trigger | schedule |
|---|---|
upstream.success | {"on_success_of": "upstream"} |
upstream.fail | {"on_failure_of": "upstream"} |
upstream.completed | {"on_completion_of": "upstream"} |
Selector, e.g. "job.fail:tag:ingest" | {"on_failure_of": [<every job the selector matches>]} |
Every upstream must be in jobs. If an upstream has no runs yet and the job follows its
failures, ask the customer how often it fails and pass "failed_share" in its assumed.
Several triggers (trigger=[...]): pass them as a list, e.g.
[{"cron": "0 8 * * *"}, {"on_success_of": "backfill"}]. Each trigger starts its own run.
Manual or tag runs (no trigger; started with dlthub job trigger): ask how often they're
run and use that as the schedule. A trigger.once job runs one time; leave it out of the
monthly estimate and mention it.
Freshness checks (freshness=[...]) skip runs while an upstream is loading or failed. The
script ignores them, so the estimate is an upper bound for those jobs; say so.
Add the currency from Step 1 as currency, the rate from Price above for that currency
as rate_per_hour, and today's date.
Ask once, for the jobs with a time schedule: "Does each of these jobs load only new data since
the last run (incremental), or reload everything on every run?" Set loading per job from the
answer. Incremental runs get shorter when they run more often; full loads don't. If the customer
doesn't know, leave loading out.
Ask the customer when a job has no successful runs, is manual-only, or nothing is
deployed yet: how long a run takes (typical and slow) and how often it should run in
production. Pass the answer as "assumed": {"avg_minutes": ..., "slow_minutes": ...} instead of
runs; the script marks it as the customer's estimate.
Never guess a duration. The only exception: the customer explicitly waves it off ("assume
something light") — then pick a value, pass it as assumed, and say so in notes.
Add cost_options: the changes that could lower the bill, not their savings. The script
prices each one. Look at every job with a time schedule or always-on uptime and consider:
{"job": "orders_sync", "schedule": {"every": 30, "unit": "minutes"}}{"job": "crm", "size": "small", "multiplier": 1}{"job": "dashboard", "always_on_hours_per_day": 4}{"label": "Incremental loading for crm", "unquantified": true}If none of these fits, don't leave the key out: pass "cost_options": [] and say why in
"no_cost_options_reason", one plain sentence the user will read in the report. Say which case it
is: nothing can change (e.g. every job is event-triggered, so it follows another job's schedule),
or a change exists but isn't worth proposing and why (e.g. every job already runs daily on the
smallest instance). The script refuses to run without cost_options, and refuses an empty list
without a reason.
Put any other context (where durations came from, caveats specific to this workspace) in
notes as plain sentences, without numbers you worked out yourself.
uv run python <this skill's folder>/payg_estimate.py summary reports/payg-estimate.json
Paste its output as it is — assumptions, per-job table, monthly range, what-if table, ways to cut cost. Don't round, re-add or restate the numbers in your own words. If a number looks wrong, fix the facts in the JSON and run it again.
Then add, in a sentence or two:
optimize-performance);
install it if absent: uv run dlthub --non-interactive ai toolkit install performance.job-resources rule of
dlthub-platform).on_success_of), failure
share (on_failure_of) or 1 (on_completion_of), followed back through chains. In the what-if
table they move with their upstream jobs.loading answer counts as incremental, and the assumptions say so.After the estimate, ask once: "Want a one-page report you can share with your team or manager?" Only on a yes:
engineering:
build_hours (once), maintenance_hours_per_month, hourly_rate and servers_per_month,
in the estimate's currency. The rate and at least one of the hours are needed; leave out any
other part they don't know, and the report shows it as "not given". If they skip it, leave
engineering out — never invent hours, rates or server costs. When it is left out, say
so when you hand over the report: the "dltHub vs. doing it yourself" section is missing
because no hours or rate were given.uv run python <this skill's folder>/payg_estimate.py report reports/payg-estimate.json --out reports/payg-cost-estimate.htmlThe report is one self-contained HTML file (no scripts, nothing downloaded). Its fixed text —
why the bill is predictable, what's included — lives in report-template.html; don't edit it
per customer. report-example.json and report-example.html show the report filled with
made-up data, as a layout preview for maintainers; never read numbers or job names from them.
A US workspace (an EU one gives the same numbers in €) with three jobs whose run times the
customer gave (no runs yet); the customer said warehouse_daily reloads everything on each run. Multipliers are
illustrative — read the docs.
{
"currency": "USD",
"rate_per_hour": 10,
"date": "2026-11-11",
"jobs": [
{"name": "orders_sync", "schedule": {"every": 15, "unit": "minutes"}, "loading": "incremental",
"size": "small", "multiplier": 1, "assumed": {"avg_minutes": 2, "slow_minutes": 3}},
{"name": "crm_hourly", "schedule": {"every": 1, "unit": "hours"}, "loading": "incremental",
"size": "medium", "multiplier": 2, "assumed": {"avg_minutes": 5, "slow_minutes": 8}},
{"name": "warehouse_daily", "schedule": {"cron": "0 2 * * *"},
"size": "small", "multiplier": 1, "loading": "full",
"assumed": {"avg_minutes": 20, "slow_minutes": 30}}
],
"cost_options": [
{"job": "orders_sync", "schedule": {"every": 30, "unit": "minutes"}},
{"job": "crm_hourly", "schedule": {"every": 2, "unit": "hours"}},
{"job": "crm_hourly", "size": "small", "multiplier": 1},
{"label": "Incremental loading for warehouse_daily", "unquantified": true}
]
}
payg_estimate.py summary prints:
Assumptions
| Job | Schedule | Runs/month | Average / slow run | Size | Hours/month | $/month |
|---|---|---|---|---|---|---|
| orders_sync | every 15 min | 2,920 | 2 / 3 min | small (1×) | 97.3 | $973.33 |
| crm_hourly | hourly | 730 | 5 / 8 min | medium (2×) | 121.7 | $1,216.67 |
| warehouse_daily | daily | 30.4 | 20 / 30 min | small (1×) | 10.1 | $101.39 |
| Total | 3,680.4 | 229.1 | $2,291.39 |
Expected about $2,291.39 per month; in a heavy month up to about $3,558.75 (if runs take as long as the slowest 10%).
What each job would cost at another schedule
| Job | Now | Every 15 min | Hourly | Every 6 h | Daily |
|---|---|---|---|---|---|
| orders_sync | $973.33 (every 15 min) | $973.33 | $827.33 | $786.78 | $780.69 |
| crm_hourly | $1,216.67 (hourly) | $1,946.67 | $1,216.67 | $1,013.89 | $983.47 |
| warehouse_daily | $101.39 (daily) | $9,733.33 | $2,433.33 | $405.56 | $101.39 |
Ways to cut cost
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub dlt-hub/dlthub-ai-harness --plugin payg-pricingOther plugins' skills for the same job