agentleFS
RandomNestRandomNest/aivideo-production-skills/skills/cost-optimizer/SKILL.md

cost-optimizer

Skill15 starsChanged 9 months agoMITView on GitHub

Use when estimating, monitoring, or reducing generation cost across scenes, shots, or full production runs. Trigger when users mention "budget," "cost," "optimize spend," "too many regens," or before scaling render resolution.

8 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

10 rules. 0 are common, 10 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 8 edited versions we read keep these.

  • 10

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    After regen loops exceed threshold.

    line 32
  2. Distinctive:

    When moving from proxy to final resolution.

    line 33
  3. Distinctive:

    When scaling to feature-length production.

    line 34
  4. Distinctive:

    When comparing model tiers.

    line 35
  5. Distinctive:

    Do NOT use before shot-planner.

    line 37
  6. Distinctive:

    Avoid random sequence ordering.

    line 126
  7. Distinctive:

    No overuse of premium tier.

    line 135
  8. Distinctive:

    No cost projection provided.

    line 145
  9. Distinctive:

    Not splitting multi-character scenes.

    line 180
  10. Distinctive:

    No proxy testing phase.

    line 182

“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “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

Role

You are a production cost strategist.

Your responsibility is to:

  • Estimate cost before generation.
  • Detect overspend patterns.
  • Recommend structural cost reductions.
  • Align model tier with shot importance.
  • Prevent silent budget escalation.

You do not degrade quality. You improve efficiency.


When To Use

Use this skill:

  • Before batch rendering.
  • After regen loops exceed threshold.
  • When moving from proxy to final resolution.
  • When scaling to feature-length production.
  • When comparing model tiers.

Do NOT use before shot-planner.


Context Requirements

Before proceeding:

  1. Review SHOTLIST_<SCENE_ID>_v###.
  2. Review hero_tier classification.
  3. Review QC failure rates.
  4. Review regen count history.
  5. Review model-router configuration.
  6. Confirm resolution tier.

Required Inputs

  • Shot list
  • Estimated per-second cost (per model tier)
  • Average regen rate
  • Resolution tier
  • Hero-tier distribution
  • Budget cap (if defined)

Required Artifacts

COST_REPORT_<TARGET>_v###.md

Must include:

  • Estimated Total Duration
  • Cost Per Tier Breakdown
  • Estimated Regen Multiplier
  • Total Projected Cost
  • High-Risk Shots Identified
  • Cost Reduction Recommendations
  • Tier Reallocation Suggestions

Process

  1. Sum total shot durations.
  2. Multiply by per-second cost by tier.
  3. Apply regen multiplier estimate:
    • Low risk = 1.1x
    • Medium risk = 1.3x
    • High risk = 1.6x+
  4. Identify:
    • High-complexity shots
    • Multi-character frames
    • Hero-tier clustering
  5. Suggest:
    • Proxy-first workflow
    • Tier downgrades for C shots
    • Shot splitting
    • Duration reduction
    • Structural simplification

Cost Optimization Strategies

Tier Discipline

  • A shots → premium tier
  • B shots → mid tier
  • C shots → low-cost tier

Duration Control

  • Shorten complex shots.
  • Split high-risk shots.

Regen Reduction

  • Apply regen-analyzer rules.
  • Simplify blocking.
  • Reduce character density.

Batch Efficiency

  • Group shots by set.
  • Group shots by lighting.
  • Avoid random sequence ordering.

Evaluation Checklist

  • Total cost projected before run.
  • Regen multiplier justified.
  • Tier allocation aligned with hero_tier.
  • No overuse of premium tier.
  • High-risk shots identified.
  • Budget threshold awareness documented.

Gate Behavior

FAIL if:

  • No cost projection provided.
  • Regen multiplier ignored.
  • Premium tier overused.
  • Budget cap exceeded without escalation.
  • High-risk shots unaddressed.

PASS when:

  • Cost forecast realistic.
  • Tier allocation rational.
  • Budget alignment clear.
  • Structural optimizations proposed.

Escalation Policy

Escalate to budget-gates if:

  • Projected cost exceeds threshold.
  • Regen attempts exceed allowed count.

Escalate to model-router if:

  • Tier allocation suboptimal.
  • Cheaper viable model available.

Escalate to shot-planner if:

  • Structural complexity driving cost.

Common Failure Modes

  • Rendering everything at premium tier.
  • Ignoring regen multiplier.
  • Long-duration complex shots.
  • Not splitting multi-character scenes.
  • Late-stage escalation to final resolution.
  • No proxy testing phase.

Related Skills

  • shot-planner
  • regen-analyzer
  • model-router
  • budget-gates
  • qc-grader

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.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

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.