agentleFS
DshamirDshamir/slm-forge/skills/forge-estimate/SKILL.md

forge-estimate

Skill1 starsChanged 6 months agoMITView on GitHub

Computes GPU hours, instance type, hourly rate, total cost, and wall-clock projection for the planned training run. Reads manifest.plan + manifest.spec.constraints + config/pricing.json (the ca-central-1 GPU rate snapshot). Output gates the BUDGET_GATE (rolled into PLAN_GATE in v2).

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Look up the recommended instance type for plan.target_params + plan.regime

    line 16
  2. Distinctive:

    Add storage + transfer assumptions (small for the M2 size class)

    line 21
  3. Very specific:

    Write manifest.estimate.* with a confidence band + assumptions[]

    line 22
  4. Very specific:

    If manifest.estimate is already populated, exits 0.

    line 36

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

forge-estimate

When this fires

Phase position: ESTIMATE — after forge-architect, before forge-provision. The output funds the cost-cap check that forge-provision makes against spec.constraints.budget_cap_usd.

What it does

  1. Look up the recommended instance type for plan.target_params + plan.regime
  2. Estimate GPU-hours using regime-specific heuristics (lora-sft → fewer hours per token than full-sft; qlora-sft → larger model fits but throughput is lower)
  3. Multiply by the cached hourly rate from config/pricing.json
  4. Add storage + transfer assumptions (small for the M2 size class)
  5. Write manifest.estimate.* with a confidence band + assumptions[]
  6. Advance state to BUDGET_GATE (legacy) — the v2 gate is PLAN_GATE

Inputs

  • $1 = forge-id
  • manifest.plan (base_model, regime, target_params)
  • manifest.spec.constraints (budget_cap_usd, max_wall_clock_hours)
  • config/pricing.json (ca-central-1 GPU instance rate snapshot)

Outputs

  • manifest.estimate.{gpu_hours, instance_type, cost_per_hour_usd, total_cost_usd, wall_clock_hours, confidence, assumptions}
  • manifest.state.current_phase = BUDGET_GATE

Idempotency

If manifest.estimate is already populated, exits 0.

Failure modes

ExitReason
0estimate written or already-set
1config/pricing.json missing or unreadable
64no forge-id provided

External resources

  • Local disk only — config/pricing.json lookup

Cost class

free — pure arithmetic.

Depends on

  • forge-architect (populated manifest.plan)
  • forge-shape is optional but refines the token estimate when run before this; without it the estimate uses a coarse corpus-size proxy.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.