/oxy:oxy-experimentsfrom oxy
Use when running an Oxy experiment from a terminal or agent — drafting a design, choosing its grain (hour, day, week, month), pricing candidate designs, registering, watching a live run and its interim reading, aborting, or reading the report — with `oxyc experiments`. Covers the lifecycle order, the hash handshake that guards every write, why a pricing refusal or a sealed result is the answer rather than an error, why an interim is a hint and not a result, and what lives in git versus the experiment record.
Ships in oxy. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub oxy-hq/skills --plugin oxyoxycAn experiment is a record on the deployment, not a file in the workspace:
one draft design edited in place, priced, registered (which freezes it and
makes it the run), then watched until it is reported or aborted. What the
design points at stays in git and is compiled like any other workspace file:
the lever automations (lever.on.via, lever.off.via), the measures and views
(outcome.target, design.time_dimension, guardrail criteria). A design that
names an automation or measure the workspace does not have is refused at
pricing or registration — fix the workspace, not the record. So is a lever
whose automation never reads the units it is sent — {{ unit }} for
lever.per: unit, {{ units }} for per: wave, or {{ members }} under
assign_by — since every flip would then switch the whole fleet. Make the
automation act on the units it is given.
There is no file to import: create the draft from a YAML or JSON body
(create --file), or start from an existing design's config (design <name>).
owner is a workspace member's email (any @ makes it one, matched whatever
its capitals) or else a team name; it receives guardrail alerts, abort notices
and estimate failures. An owner that matches nobody sends them to the
organisation's owners and admins.
Every verb needs --workspace <id> (oxyc api {org}/workspaces lists them)
and the deployment (--env dev|staging|local, or --target <url>). Staff
reach a tenant workspace only inside oxyc assume start --org <slug> --reason …;
a 403 that says assume_role_required means start one, not that the role is
missing.
oxyc experiments list # what exists, and each status
oxyc experiments design customer_promo > promo.yml # a starting point: the config as YAML
# edit promo.yml: `experiment:` is the new name; leave design.waves/seed and
# outcome.mde_at_proposal empty — pricing writes those. Set design.grain if not daily
oxyc experiments create --file promo.yml
oxyc experiments price promo \
--candidate '{shape: waves, wave_sizes: [20, 20], first_switch_on: 2026-11-02, spacing_days: 14}' \
--candidate '{shape: switchback, first_period_on: 2026-11-02, period_days: 7, pairs: 6}' \
--wait
oxyc experiments use promo <proposal-id> # pricing's keys onto the draft
oxyc experiments register promo --yes # irreversible: freezes the design
oxyc experiments status promo # flips, guardrails, compliance, estimate
oxyc experiments interim promo # the reading so far — a peek, not the result
oxyc experiments result promo # sealed until the run is reported
Statuses, in order: draft → registrable (a priced proposal was adopted) →
registered → live → closing → reported, or aborted from
registered/live. registration_refused carries the reason in the note
column.
design.grain is day (the default, and omitted from the config), hour,
week or month. One reading is a unit's outcome over one period of it, and
every count in the design is in periods: pre_days, post_days,
washout_days, anticipation_days, a candidate's spacing_days and
period_days keep their _days names but mean hours, weeks or months at those
grains. The answer is stated per unit-period (per store-week), and a period
that has not finished is never read.
design.timezone), and a whole local hour at hour grain, written
2026-10-26T14:00 (a bare date means midnight; 14:30 is refused). Pricing
refuses a first date that is not a period start and names the next one.when_on/when_off) measures must also have a time of
day, or no switch inside a day could be confirmed — pricing warns and names
the measure. Prefer a period that holds the same hours in both halves of a
pair (12 or 24); hourly outcomes swing hard across the day.grace_days,
guardrails, and the arrival-lag warnings.price takes one to six candidates and prices each against the draft. Each
comes back done (an MDE), refused (why this design cannot answer the
question) or failed (a fault). A refusal is the platform's most valuable
output — "all 80 units are placed in waves, none is left as a control", or
"a sign-flip test over 4 pairs cannot reach α = 0.05" — so change the candidate
the way the reason says and price again. Do not retry the same candidate.
mde/unit-day only (per unit-period at other
grains). A grouped design's own mde is per group-day, so raw mde
numbers are not comparable across candidates.alpha on a candidate overrides outcome.alpha for it. Above 0.05 the
report can only ever say directional, never significant.stale priced an earlier draft; use refuses it. Price again.--wait polls until every candidate settles (default 600 s, --timeout);
without it, read them later with oxyc experiments proposals <name>.edit sends the hash of the draft it read (or --base-hash for the one you
read earlier); register and retrospective send the hash of the draft they
read just before posting. If someone edited the draft in between, the server
answers 409 "the design was changed since you read it" — re-read with
design, merge, and try again. Never loop on the 409.
An experiment has one draft, edited in place until it is registered;
registering locks it, and a registered design never changes. To change
one, duplicate <name> <new-name> (the UI's Duplicate as new draft) and
edit and price the copy.
register pre-registers: it freezes the design at the server's clock and the
driver flips levers on the scheduled dates. Do it before the first switch date.retrospective is for a design whose dates are all past: it analyses
existing data as the experiment's one run and moves no lever. status says
retrospective_ready when it is allowed, or not yet with the reason.A retrospective needs no lever and no mde_at_proposal. A rollout that was not
randomised is declared with design.assignment: observed: its waves are the units
that changed and the dates they changed, and it needs no seed and no pricing.
Its report reads Observational; never price-and-overwrite the waves to fake a
draw (a hand-edited split is reported as written by hand). A retrospective whose
estimate refused (a unit with no rows, coverage) leaves the design editable: fix
it, then retrospective again.
To read what happened after a past change ended (a promotion's pull-forward),
give an observed design's wave switch_off (the first day it was off) and set
design.carryover_days; carryover on an observed design is refused without it.
switch_off must not fall inside the post window (end post_days at it), and the
retrospective is refused until the carryover window's last day is over.
Use the real end date: a promotion stopped early but exported with its planned
end reads the wrong days.
A retrospective leaves out a unit with too little data, or listed with none,
and names it under the report's dropped units; it does not refuse the run. A
unit missing a few days keeps the rest and costs no other unit anything; one
under the coverage floor of a single wave's window is left out of that wave only.
outcome.denominator makes the outcome a per-unit share (Σ target / Σ denominator): retrospective only, and pricing refuses it. outcome.scale: proportional reads each value as ln(1 + y) and reports a % lift per unit
(report.proportional, the headline as a share, 0.12 = +12%): use it when units
differ in size by orders of magnitude. Retrospective only; refused with a
denominator, a driver or a switchback, and on a negative value. A denominator is
also refused with design.one_date_test: permutation, design.strata,
design.carryover_days or more than one switch date: the ratio is read on one
switch date with Welch's test. A proportional outcome's carryover is a share too.
An anomaly guardrail's significance picks the detector's band: 0.9545
(±2σ; anything below 0.9973 reads as this), 0.9973 (±3σ) or 0.9999994
(±5σ). It trips only on two consecutive flagged treated days at one unit.
direction: increase | decrease | both picks the side; absent, a guardrail on
outcome.target watches the side against outcome.direction and any other
measure both.
A change made in a few chosen units (a promotion on three products, a
campaign in one market) is better read against a synthetic control: on an
observed design set design.comparison: synthetic_control, and list in
design.exclude any unchanged unit the change may still have reached (sibling
products, neighbouring stores). Each treated unit gets its own weighted mix of
unchanged units that tracked it before the switch. It needs one switch date and
at least 10 donors, and is refused with a switchback, strata, a denominator,
carryover or hour grain. report.synthetic lists each unit's fit (pre_fit: 0
tracks perfectly, 1 is no better than a flat line), its donor weights and its
series; the report is labelled Not randomised — synthetic control and
offers no projection.
A one-date design is tested with Welch by default. For a handful of treated
units beside many untreated ones, set design.one_date_test: permutation: the
treated units are read against every untreated one, which Welch cannot do with
two or three of them. It needs enough units for a relabelling to reach alpha (3
vs 3 cannot), takes seconds, and is refused with several switch dates (always
permutation), a switchback, or a synthetic control.
With two or more waves, report.waves lists each wave's own effect and
interval. They are not adjusted for the number of waves: quote the pooled
headline as the answer, and a clear single wave as a lead, never a finding.
Both take the experiment's only run, both are irreversible, and both refuse
without --yes when stdin is not a terminal (exit 8). Confirm with the person
before passing --yes — say which design (design <name> prints its hash).
status shows flip counts (sent overlaps confirmed/unconfirmed/failed),
failed flips by unit (a failed flip is resent after a backoff of 1h, doubling to
8h: an on up to 3 attempts, an off until one lands), guardrail standing, compliance (not measured until a
treated flip is decided) and the estimate job. NOT ADVANCING means the
driver has not moved the run: that is a platform problem to report, not
something to fix from the CLI.abort <name> --reason "<what the owner is told>" with --levers off
(default, the UI's Turn levers off: switch treated units back off) or
--levers keep (Keep levers as they are). Ask the person which; it is
their call. It records a request; the next tick actuates it. An aborted run
cannot resume, its report is labelled ABORTED, and at hour grain only whole
days before the abort are measured.result before reported prints sealed and exits 0. There is
deliberately no final effect number on a live run — do not try to compute
one from status or from the warehouse. A finished run whose report is not
written yet prints being prepared.interim <name> is the registered analysis over the periods finished so
far, on a live or closing run only (a retrospective run has none). It is
read once a day while live; --refresh asks for a fresh one (members who can
price; one at a time per run) and --wait polls until it lands. It shows
read through the last period it read, last attempt when the newest try
failed (the previous reading stays), and nothing until a whole period of the
first after window has finished. A run not in progress prints its state and
exits 0.verdict (not a bare "significant"), and repeat every
line under assumptions — a switchback's carryover and pull-forward
assumptions are part of the result.write_back in the result: the file, edge and value). Oxygen does not write
the repository: make that edit in the workspace's repository (oxyc workspace clone) and push it like any other change.--json on every verb returns the server's body. Exit codes are the oxyc
contract: 2 usage, 4 auth (or no assume session), 5 not found, 6 refused
request (409 stale hash or wrong state, 422 the design's own reason), 7
server/network, 8 an irreversible step not confirmed. The message is the
server's own sentence — quote it to the person rather than paraphrasing.
9 skills in this plugin
/oxy-agentsUse when creating, editing, reviewing or debugging an Oxy agent, a `.agentic.yml` file that answers questions from the semantic model by clarifying, specifying, solving (SQL), executing and interpreting. Triggers include "create an analytics agent", "my agent picks the wrong metric", "my solving instructions are ignored", "react ignores config keys", "ignored_keys", "the agent never uses my verified query", "the agent can't see a database", "which tools can a state call", "set thinking, effort, budget_tokens or extended thinking", "per-state model or max_retries", "validation rules", "Cube or Looker semantic_engine", "analytics vs app-builder agent", "`.agent.yml` or `.agentic.yml`", and validating, running (`oxyc agentic run`) or testing (`oxyc evals run`) an agent. Not for writing the semantic model itself (views, topics) or automations./oxy-airway-pipelinesUse when writing, reviewing, or debugging an Oxy Airway ELT pipeline (`.airway.yml`) — sources, the `kind` values Oxy actually wires, credentials, reset, rewind and retry — or when one misbehaves: "unsupported source kind", a pipeline that parses then fails at run time, credentials that do not resolve, a *pipeline* run landing `completed_with_errors` (an *automation* run with that status is `oxy-automations`), a schema that will not change, missing history after a backfill, or duplicate rows. Carries the traps the published pipeline reference does not./oxy-automationsUse when writing, debugging, or reviewing an Oxy automation (a `.automation.yml` / legacy `.procedure.yml` workflow — tasks, loops, variables, schedules) in a customer workspace, or when an automation *run* misbehaves: an `http_request` task that works locally and fails in cloud, a file that is silently not an automation, a task that validates but fails with "unknown task type", SQL that receives JSON instead of a table, or an automation run landing `completed_with_errors`. Covers the file-naming trap, task-type gotchas, running SQL and automations on a deployment with `oxyc run`, and where the authoritative reference lives./oxy-cliUse when you need data out of an Oxy deployment — querying a customer's warehouse or semantic layer, reading threads/runs/apps/orgs, checking why an endpoint 4xxs, or reproducing a customer-reported bug against real data. Also when you need to know which endpoints exist or what body one takes, and (staff) when standing a new customer account up or checking which of its steps have landed. Triggers on "query the customer's data", "what does this API return", "debug this in production/dev", "which endpoint", "check the thread/run/app", "oxyc", "oxy api", "stand up a new customer", "new account setup", "oxyc bootstrap"./oxy-custom-appsUse when building, debugging, reviewing, shipping, or verifying an Oxy custom-app bundle (a code-first React/Vite app served by Oxy at /customer-apps/<org>/<slug>/), including writing Oxy Functions, driving them from the UI, and checking a published app in the browser with the Playwright MCP server (no CI checks a published bundle). Covers the oxy-app.json contract, @oxy-hq/sdk and @oxy-hq/vite-plugin, where app data goes (ctx.airhouse, ctx.oltp, ctx.storage), pitfalls, performance guardrails, load speed and usage tracking (service worker, Activity tab, useTrackEvent), the self-serve oxyc publish ship flow, dev-<handle> sandboxes and workspace previews, how an AI agent gets its own short-lived credential (oxyc tokens create --sandbox-agent or --agent, never the engineer's oxyc login), and reading a deployment's live data with oxyc api and oxyc proxy (the oxy binary has no HTTP-API commands; every one of them is oxyc)./oxy-data-architectureUse when deciding where an aggregate gets materialised — writing an `execute_sql` rollup, chaining one after an `airway` ingest step, choosing rollup vs semantic `pre_aggregations`, or whether raw rows must be retained — and on the symptoms: a dashboard that aggregates at query time, a load that wrote every row yet failed, preagg that cannot bucket to 15 minutes or join two views, or no "bronze"/"silver"/"gold" in the schema. Pipeline internals: `oxy-airway-pipelines`; view syntax: `oxy-semantic-modeling`.