Skip to content
Back to skills

Productionos Auto Optimize

ASecurity

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.

  • 8 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 27, 2026
data-airailscode-reviewsecurity

Security analysis

A100/100

Scanned May 27, 2026

npx -y skills add ShaheerKhawaja/ProductionOS --skill productionos-auto-optimize --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Productionos Auto Optimize?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Productionos Auto Optimize
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/shaheerkhawaja-productionos-auto-optimize/badge)](https://www.skillsdirectory.com/skills/shaheerkhawaja-productionos-auto-optimize)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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."
argument-hint: "[repo path, target, or task context]"
---

# 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.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.