agentsclimarketplace

Worker budget

Skill esummervill/worker-budget/skills/worker-budget

Use BEFORE spawning any Agent worker for substantial work (builds, audits, releases). Deterministic budget analysis — pricing snapshot, per-worker-class token forecast from observed history, tier recommendation, and a worker contract with success thresholds + orchestrator-escalation triggers. Also use when the user asks about worker costs, budget analysis, or model-tier selection.From its SKILL.md

Install
npx -y skills add esummervill/worker-budget --skill worker-budget

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • 20 days oldThe repository was created 20 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

4.2 KB, 918 tokens by cl100k_base, as published. Nobody here has run it

Worker budget + designation system

Applies a delegation-tiering doctrine mechanically: no big model on mundane work, no small model planning, and the orchestrator woken only at mediation points. The system itself follows the deterministic-shell pattern — arithmetic is a script, and the ONLY model involvement is a small-model scout (Haiku) for the two genuinely fuzzy inputs: price verification when stale, and task-complexity classification when novel.

Flow (each time workers are about to be spawned)

  1. Run the deterministic budgeter (no model, no network):

    node ~/.claude/skills/worker-budget/scripts/budget.mjs <worker-class> [count]
    

    Worker classes: build-heavy, build-standard, cartography, research, release, verify, grind. Output: cost estimate per tier, recommended tier, staleness warning, and a filled worker-contract template.

  2. If output says PRICING STALE (snapshot older than the configured window): spawn ONE Haiku scout (model: haiku) with exactly this brief: "Fetch current Claude API per-MTok pricing for Opus, Sonnet, Haiku from docs.anthropic.com (WebSearch/WebFetch). Return ONLY a JSON object matching the schema in ~/.claude/skills/worker-budget/scripts/pricing.json — same keys, updated prices, as_of today. No prose." Then write its JSON over pricing.json and re-run the budgeter. Never let a large model do this errand; never trust remembered pricing.

  3. If the task fits no existing worker class: spawn ONE Haiku scout to classify it — input: one-paragraph task description + the class definitions from history.json; output: nearest class + a token multiplier (0.5–2.0). The deterministic budgeter consumes that multiplier. (The orchestrator may override — the scout estimates, it does not decide.)

  4. Fill the worker contract (the budgeter prints the template): success metrics the worker must hit, budget ceiling, and the escalation triggers that wake the orchestrator. Paste the contract into the worker's prompt verbatim. Adapt the success metrics to your repo's own gates (test suite, linter, typechecker, build, schema checks — whatever "green" means for you).

  5. After each worker completes: append its actual token usage to history.json via:

    node ~/.claude/skills/worker-budget/scripts/record.mjs <worker-class> <actual-tokens> <outcome>
    

    The forecast is an EWMA over observed runs — it self-corrects.

The worker contract (thresholds + escalation)

Every substantial worker prompt gets a CONTRACT block:

  • Success metrics (worker self-reports against each): tests pass count ≥ baseline+new, lint/typecheck/build clean, repo-specific gates green, zero out-of-surface files (or each one flagged with justification).
  • Budget ceiling: estimated tokens × 1.5. Worker instruction: "if you project exceeding the ceiling, STOP at the current slice boundary, commit what is green, and report — do not push through."
  • Escalation triggers — the ONLY reasons to stop and wake the orchestrator mid-run:
    1. contract ambiguity (spec contradicts code reality)
    2. a decision that crosses repo/system boundaries
    3. anything security- or tenancy-adjacent not explicitly in the spec
    4. projected budget overrun >50%
    5. a gate that fails twice for the same root cause Everything else: worker decides, documents the judgment call in its report.

Division of labor (fixed)

ActorDoesNever does
budget.mjs (script)all arithmetic, tier choice, contract template
Haiku scoutprice refresh, novel-task classificationdecide tier, plan
Worker (per doctrine tier)build to contract, self-report metricsexpand scope
Orchestratorset thresholds, mediate escalations, verify, integrategrind, arithmetic

What ships with it: 4 files

7.6 KB alongside SKILL.md, 2 of them executable

scripts/

Keep looking

Skills are one crate of 326,452. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.