Skip to content
Agentmart
Submit a tool

productionos-auto-optimize

Self-improving agent optimization — generates challenger variants of any agent/command, benchmarks against baseline, promotes winners, logs learnings to…

Skill by ShaheerKhawaja

IndexedMIT★ 8
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/shaheerkhawaja-productionos-auto-optimize

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Self-improving agent optimization — generates challenger variants of any agent/command, benchmarks against baseline, promotes winners, logs learnings to instincts. Inspired by Karpathy's autoresearch pattern.

Use cases: agent-building

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/productionos-auto-optimize

What's inside

Skill name
productionos-auto-optimize
Description
Self-improving agent optimization — generates challenger variants of any agent/command, benchmarks against baseline, promotes winners, logs learnings to instincts. Inspired by Karpathy's autoresearch pattern.
License
MIT
Instructions
62 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# productionos-auto-optimize


Use this alias when you want the same workflow through a top-level Codex-safe name without the `productionos:` namespace.
## Overview

This is the Codex-native workflow wrapper for [.claude/commands/auto-optimize.md](../../.claude/commands/auto-optimize.md).

Use it when the user wants this exact ProductionOS workflow, not just the umbrella `productionos` router.

## Source of Truth

1. Read the source command spec at [.claude/commands/auto-optimize.md](../../.claude/commands/auto-optimize.md).
2. Use [CODEX-PARITY-HANDOFF.md](../../docs/CODEX-PARITY-HANDOFF.md) to confirm runtime support and parity expectations.
3. Preserve the source workflow's guardrails, scope, artifacts, and verification intent.
4. Translate Claude-only slash-command and hook semantics into Codex-native execution instead of copying them literally.

## Codex Behavior

- Summary: Self-improving agent optimization — generates challenger variants of any agent/command, benchmarks against baseline, promotes winners, logs learnings to instincts. Inspired by Karpathy's autoresearch pattern.
- Use the source command as the behavioral spec, then execute the same intent with Codex-native tools and constraints.

## Inputs

- `target` — Agent or command to optimize (e.g., 'code-reviewer', 'security-hardener', '/production-upgrade') Required.
- `challengers` — Number of challenger variants to generate (default: 3) Default: `3` Optional.
- `benchmark` — Benchmark to evaluate against: 'self-eval' (default) | 'test-suite' | 'llm-judge' | path to custom benchmark Default: `self-eval` Optional.
- `hypothesis` — Specific hypothesis to test (e.g., 'add chain-of-thought to security-hardener'). If omitted, auto-generates hypotheses. Optional.
- `max_cost` — Maximum cost in USD for the optimization run (default: 5) Default: `5` Optional.
- `mode` — Optimization mode: prompt (modify agent instructions) | model (test different models) | layers (test prompt composition layers) | params (test convergence parameters) Default: `prompt` Optional.

## Execution Outline

1. Preamble

## Agents And Assets

- Agents: `metaclaw-learner`, `prompt-optimizer`, `rubric-evolver`
- Templates: `PREAMBLE.md`, `PROMPT-COMPOSITION.md`
- Artifacts: `.productionos/AUTO-OPTIMIZE-BASELINE.md`, `.productionos/AUTO-OPTIMIZE-HARVEST.md`, `.productionos/AUTO-OPTIMIZE-HYPOTHESES.md`, `.productionos/AUTO-OPTIMIZE-REPORT.md`, `.productionos/AUTO-OPTIMIZE-RESULTS.md`, `.productionos/analytics/skill-usage.jsonl`, `.productionos/calibration/`, `.productionos/challengers/challenger-{N}.md`, `.productionos/instincts/`, `.productionos/instincts/project/`

## Workflow

1. Load only the agents, templates, prompts, and docs referenced by the source command.
2. Execute the workflow intent with Codex-native tools.
3. If the source command implies parallel agent work, only delegate when the user explicitly wants that overhead.
4. Verify with the smallest relevant checks before concluding.
5. Summarize what changed, what was verified, and what still needs human approval.

## Guardrails

- Do not claim that Claude-only marketplace, hook, or slash-command behavior runs directly in Codex.
- Keep the scope faithful to the source command rather than broadening into a generic repo audit.
- Prefer concrete outputs and validation over describing the workflow abstractly.
- **Cost ceiling:** $ARGUMENTS.max_cost (default $5). Hard halt when exceeded.
- **No regression allowed:** If ALL challengers score lower than baseline, keep baseline.
- **Prompt length limit:** Challenger prompts cannot exceed 2x the baseline length.
- **Model safety:** Model changes require human approval before promotion.
- **Idempotent:** Running auto-optimize twice with the same inputs produces the same baseline measurement.
- **Rollback:** If promoted winner causes test failures in subsequent runs, revert automatically.

From ShaheerKhawaja/ProductionOS, MIT.

More from ShaheerKhawaja/ProductionOS

Signals

Stars
8
Forks
1
Open issues
0
Last commit (this folder)
Apr 3, 2026 (6 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from ShaheerKhawaja

Cite this page

productionos-auto-optimize skill. Agent Mart. https://agentmart.dev/skills/shaheerkhawaja-productionos-auto-optimize (last updated 2026-10-24)