Make the work you repeat faster and cheaper.

Find and optimize common agent workflows. Save 90%+ on tokens, cost, and wait time.

If you use Codex, Claude Code, or another AI agent for the same kinds of tasks again and again, this free prompt can turn them into faster, cheaper workflows and skills. In our tests, token use and latency fell by more than 90% while useful output quality stayed the same.

Try it on your own work: copy the prompt and drop it into Codex, Claude Code, or any agent that can read its past sessions. It will find one repeated workflow, optimize it, and show you the measured before-and-after.

See how and why it works →

COPY IT · DROP IT INTO YOUR AGENT · REVIEW THE MEASURED BEFORE-AND-AFTER

One prompt. A measurable result.
Copy the promptNo installation or account required
Paste it into your agentCodex, Claude Code, or any agent that can read its past sessions
Let it optimize one repeated taskIt builds a faster version in a separate folder
Compare before and afterTokens · cost · time · output quality
You decide what to keepNothing is installed or published without approval
01 / Proof

Typical repeated workflows. More than 90% less agent work.

Across repeatable, skill-driven agent workflows, the optimized versions used dramatically fewer tokens and finished much faster while useful output stayed the same.

Gains seen on typical repeatable agent workflows

15 historical scenarios
94–96%Fewer gross tokens
87–92%Less elapsed time
Up to 10×Fewer AI calls
SameUseful output quality

Observed across two repeated, instruction-driven workflows replayed over 15 matching historical scenarios. These are measured examples, not a universal guarantee; your result depends on how much of the workflow is predictable and repeated.

What these numbers mean.The original and optimized versions ran against matching past tasks. Token use, elapsed time, AI calls, and output usefulness were compared directly. The one-time cost of creating the optimization was reported separately.
02 / The tax
General agents are excellent at discovering a workflow. They are expensive at rediscovering it forever.
01

Reload the worldBroad instructions, history, memories and source trees flood the context again.

02

Replan the routeThe model chooses the same tools, order and stopping condition from scratch.

03

Rebuild stateDeduplication, lifecycle status and identity matching become another reasoning problem.

04

Re-argue the rulesSafety boundaries live in prose the model must remember instead of capabilities code can enforce.

05

Validate with more reasoningThe agent spends another turn deciding whether its own work followed the recipe.

03 / The shift

The model stops being the operating system.

A compiled harness does not remove intelligence. It relocates it. Stable procedure becomes executable; fuzzy judgment stays with the model; consequential actions stay with you.

Code owns invariantsModel owns semantic judgmentHuman owns consequences
04 / Method

Five moves from history to harness.

Treat past sessions the way a compiler treats profiling data: use observed execution to specialize the next version.

01

Profile

Cluster session history by the job performed—not just similar prompt wording.

02

Extract

Reconstruct the complete contract: inputs, tools, state, decisions, outputs and gates.

03

Partition

Separate stable procedure from irreducible judgment and human authority.

04

Compile

Emit source adapters, typed state, validators, bounded LLM calls and explicit terminal states.

05

Replay

Run old and new against equivalent raw inputs. Measure cost, latency, calls and quality.

05 / Ownership

Compile the routine. Preserve the judgment.

The boundary is the product. Compile too little and you keep paying the tax. Compile too much and you freeze the intelligence that made the agent useful.

Code

What is stable

  • Source paths and adapters
  • Parsing, normalization and exact identity
  • State transitions and retry limits

What must be enforced

  • Eligibility and capability gates
  • Schema validation and audit events
  • Artifact rendering and terminal states
LLM

What remains fuzzy

  • Semantic selection among valid choices
  • Interpretation of ambiguous language
  • Synthesis and natural-language generation

How it is bounded

  • One named purpose per call
  • Small evidence packet, no wandering
  • Typed output checked by code
Human

What stays consequential

  • Publishing and sending
  • Production installation
  • Business decisions and public voice

Why it stays here

  • Authority is not an optimization target
  • Approval is an explicit state
  • Safety is capability-shaped, not aspirational
06 / What the prompt does
Establish evidenceFind history; disclose gaps.
Profile workflowsRank frequent, viable candidates.
Reconstruct the old contractDo not erase inconvenient work.
Design the boundaryAssign code, model and human owners.
Build in isolationRunner, schemas, tests and fixtures.
Benchmark fairlyEquivalent raw inputs; comparable costs.
Protect qualityPredefined rubric; honest ties.
Report compilation costSeparate from recurring runtime.
Hand over something runnableDemo, use and install paths.
02 / FAQ

Questions you may have.

Is this just advice for writing a better prompt?

No. It asks your agent to inspect real past work, build a working optimized version of one repeated task, and compare the old and new versions using measured results.

Why not just cache the context?

Caching can reduce input cost, but it does not eliminate model-controlled planning, tool routing, state reconstruction, retries or policy interpretation. A harness makes stable procedure explicit, testable and enforceable.

Does the optimized version stop using AI?

No. It keeps AI for the parts that need judgment or writing. Ordinary code handles predictable steps such as loading files, keeping track of progress, checking rules, and producing the final artifact.

What workflows are good candidates?

Frequent workflows with stable inputs, repeatable skeletons, clear terminal states, deterministic checks and safely replayable scenarios. One-off creative investigations and rapidly changing processes usually are not.

Will I definitely save 90%?

No. The headline numbers come from measured examples. Your savings depend on how much of the existing workflow is repeated coordination versus useful judgment. The prompt measures your actual result and requires honest evidence labels.

What if my agent cannot see its history?

The audit cannot proceed honestly without traces. Export the sessions or point the agent to its local history directory. Token and latency comparisons remain unavailable unless trustworthy usage fields exist.

Is it safe to run?

The prompt defaults to local files, isolated output, replay adapters and no external side effects. It forbids commits, pushes, installation and public actions. Still inspect your environment: session history itself may contain sensitive information.

Make repeated AI work faster and cheaper.

Optimize your agent.

Copy the prompt and drop it into Codex, Claude Code, or your agent of choice. It will find one repeated workflow, optimize it, and show you the before-and-after.

See how it works