# Cost Time Optimizer

> Optimizes workflow execution for latency, token usage, and unnecessary artifact generation while preserving quality gates. Use before or during orchestration to reduce turnaround time and operating cost.

- Skill: `alainlebret/cost-time-optimizer` (Agent Skill)
- Install (CLI): `npx skillmds@latest add alainlebret/cost-time-optimizer`
- Raw SKILL.md: https://api.skillmd.com/api/skills/alainlebret/cost-time-optimizer/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Productivity
- Author: alainlebret (https://skillmd.com/u/alainlebret)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/alainlebret/cost-time-optimizer

---


# Cost Time Optimizer

## Goal
Minimize execution cost and runtime without reducing required quality, policy compliance, or reproducibility.

## Inputs
- `workflow-spec.json`
- `execution-plan.json` (if available)
- Existing artifacts in run directory
- Request constraints (deadline, depth, mandatory outputs)

## Produce
Write `optimization-plan.json` with:
- `baseline_plan_summary`
- `pruning_actions`
- `parallelization_actions`
- `reuse_actions`
- `prompt_budget_policy`
- `expected_savings` (time and token estimate)
- `risk_controls`

## Optimization policy
- Prune optional skills that do not affect user-stated outcomes.
- Reuse validated existing artifacts when skip conditions permit.
- Parallelize independent optional steps.
- Downscope overlong narrative artifacts when rubric/spec coverage is unchanged.
- Preserve all `required` quality gates.

## Guardrails
- Never remove mandatory artifacts or required skills.
- Never bypass validation tools.
- If optimization increases semantic risk, downgrade confidence and require manual confirmation.

## Rules
- Prefer deterministic, auditable reductions over aggressive heuristics.
- Every optimization action must include expected gain and rollback condition.

