experiment

experiment is a skill for Claude Code, Codex from Insajin/autopus-adk. It costs 14 tokens per session (1,385 once invoked), scanned A, original, MIT.

An automated test-and-measure cycle for improving code against a chosen number, such as runtime. It tries one focused change at a time and keeps or discards it based on the result.

In plain words
What is it for?
Use it to improve a measurable code result, such as benchmark speed. It can repeatedly run a metric command, ask an executor to make changes, and stop when limits or safety checks are reached.
Why use it?
It removes the guesswork from optimization and makes changes reversible. Each change is compared with a baseline before the next one is attempted.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit Use it to improve a measurable code result, such as benchmark speed. It can repeatedly run a metric command, ask an executor to make changes, and stop when limits or safety checks are reached.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/insajin/autopus-adk/experiment
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Insajin/autopus-adk --skill experiment
Clone the repo
git clone --depth 1 https://github.com/Insajin/autopus-adk

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for experiment

README.md
[![agentmods](https://agentmods.dev/badge/skills/insajin/autopus-adk/experiment/github.svg)](https://agentmods.dev/skills/insajin/autopus-adk/experiment)
Your own site
<a href="https://agentmods.dev/skills/insajin/autopus-adk/experiment"><img src="https://agentmods.dev/badge/skills/insajin/autopus-adk/experiment/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for experiment

Your own site · 80×15
<a href="https://agentmods.dev/skills/insajin/autopus-adk/experiment"><img src="https://agentmods.dev/badge/skills/insajin/autopus-adk/experiment.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 14 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,385 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00014 $0.01385
Opus 5 $0.00007 $0.00692
Sonnet 5 $0.00003 $0.00277
Haiku 4.5 $0.00001 $0.00138

Measured 9d ago against content hash 311ec2ece82f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

experiment scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.omp/skills/experiment/SKILL.md · 219 lines

How it starts

The opening of the file, as written. The whole thing — 219 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Experiment Loop Skill (XLOOP)

Skill for running automated iterative improvement loops that optimize a measurable metric while keeping changes simple and reversible.

Overview

The experiment loop (auto experiment) runs an agent-driven cycle:

  1. Measure baseline metric
  2. Ask an executor agent to make one focused change
  3. Measure the new metric
  4. Decide: keep (commit) or discard (reset)
  5. Check circuit breaker and simplicity gate
  6. Repeat until MaxIterations or circuit break

Setup

# Initialize experiment branch (requires clean worktree)
auto experiment init --session-id my-session

# Verify metric command works
auto experiment metric \
  --metric 'go test -bench=. ./... | grep ns/op | awk "{print \"{\\\"metric\\\":\"$3\"}\"}"' \
  --metric-key metric

Full Loop Configuration

auto experiment init --session-id opt-$(date +%s)

# Then invoke the loop via the agent skill below

Agent Orchestration Pattern

The experiment loop is driven by invoking an executor agent repeatedly. Pass the full history context on each call so the agent can learn from past iterations.

## Experiment Loop — Iteration {N}

### Config
- MetricCmd: {cmd}
- Direction: {minimize|maximize}
- Target: {files}
- Scope: {files or "same as target"}
- SimplicityThreshold: {threshold}

### History (last 5 results)
{JSON array of recent Result objects from `auto experiment record`}

### Baseline: {baseline_value} {unit}
### Best so far: {best_value} at iteration {best_iter}

### Your task
Make ONE focused change to the target files that should improve the metric.
Do NOT modify files outside the allowed scope.
After making your change, run:
  auto experiment commit --iteration {N} --description "your change description"
Then output the description in the last line.

Keep / Discard Decision

After each executor run, measure the metric and decide:

new_value = RunMetricMedian(cfg, cmd)
simplicity = CalculateSimplicity(baseline, new_value, linesAdded, linesRemoved, direction)

if direction.IsBetter(new_value, best_value):
    if simplicity >= cfg.SimplicityThreshold:
        status = "keep"
        best_value = new_value
        circuit_breaker.Record(true)
    else:
        status = "discard"   # improvement too small relative to code complexity
        ResetToCommit(last_keep_hash)
        circuit_breaker.Record(false)
else:
    status = "discard"
    ResetToCommit(last_keep_hash)
    circuit_breaker.Record(false)

Read the full file on GitHub · 219 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 219 lines · 14 tokens per session scan A 311ec2ece82f

Subscribe to this mod's changes

experiment is a skill published in the GitHub repository Insajin/autopus-adk (111 stars, last pushed today), licensed MIT. It adds 14 tokens to every session and 1,385 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.