oxygen: Command for Claude Code

.claude/commands/test-feature.md

test-feature is a command for Claude Code from oxy-hq/oxygen. It costs 23 tokens per session (2,846 once invoked), scanned A, original, Apache-2.0.

A command that creates an agentic browser test file from a plain-language description. It writes the test, checks its format and schema, performs a dry-run check, and records its test budget.

In plain words
What is it for?
It is for adding a browser test for a feature or regression from a short description.
Why use it?
It removes the need to learn the test file syntax or manually perform the initial validation steps. It also avoids a question-and-answer process when the request is clear.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool.

This is oxy-hq/oxygen's own configuration. It tells Claude Code how to work on oxygen itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything oxygen configures →

Reuse

Borrowing it

Nothing to install: this file belongs to oxy-hq/oxygen. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/oxy-hq/oxygen/main/.claude/commands/test-feature.md
Clone the repo
git clone --depth 1 https://github.com/oxy-hq/oxygen

Made for: Claude Code.

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 test-feature

README.md
[![agentmods](https://agentmods.dev/badge/commands/oxy-hq/oxygen/test-feature/github.svg)](https://agentmods.dev/commands/oxy-hq/oxygen/test-feature)
Your own site
<a href="https://agentmods.dev/commands/oxy-hq/oxygen/test-feature"><img src="https://agentmods.dev/badge/commands/oxy-hq/oxygen/test-feature/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 test-feature

Your own site · 80×15
<a href="https://agentmods.dev/commands/oxy-hq/oxygen/test-feature"><img src="https://agentmods.dev/badge/commands/oxy-hq/oxygen/test-feature.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,846 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.
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.00023 $0.02846
Opus 5.5 $0.00009 $0.01138
Sonnet 5.5 $0.00005 $0.00569
Haiku 4.5 $0.00002 $0.00285

Measured 2d ago against content hash 9a78c24b9573, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

test-feature 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 2d 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.

.claude/commands/test-feature.md · 237 lines

How it starts

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

Generate an agentic browser test from a description

One-shot generator for .flow.test.yml files. Skips Q&A, takes the description as $ARGUMENTS, infers the answers, writes the YAML, runs the self-checks (parse + schema + --dry-run lint), adds a _budgets.yml entry, and tells the dev which CI bucket the flow lands in. For vague requests, the agentic-browser-test skill prompts a short Q&A instead.

This command must be run from the root of an oxy-hq/oxygen-internal checkout. Source-of-truth files live on main (the agentic browser test suite landed in PR #2275).

Steps

1. Sanity-check the working directory

test -f web-app/tests/agentic/README.md && test -f json-schemas/flow-test.json

If either path is missing, exit and tell the dev to checkout main of oxy-hq/oxygen-internal (the agentic test suite shipped in PR #2275).

2. Re-read source of truth

Always re-read these — they evolve:

  • web-app/tests/agentic/README.md — runner mechanics, primitives, fixtures, expect kinds.
  • json-schemas/flow-test.json — schema. target: enum, settings keys, defaults.
  • web-app/tests/agentic/canonical-prompts.md — verbatim copy-pasteable step text for cache_scope: shared.
  • web-app/tests/agentic/flows/_budgets.yml — existing cost ceilings.
  • The most recent flow file in web-app/tests/agentic/flows/ matching the surface — the team's current taste.
  • internal-docs/agentic-browser-testing-spec.md for dated change-log entries and the incident retrospective.

3. Infer the answers

From $ARGUMENTS, infer:

Field How to infer
target: Match the surface phrase to the schema's enum (chat / ide / threads / onboarding / any). When ambiguous, default to any.
Filename Lower-kebab descriptive name prefixed with the bucket the flow will land in (builder-…, chat-…, threads-…, ide-…, metric-tree-…). Don't shadow an existing flow filename.
backend_mode: Omit it: the default is enterprise mode (cloud) — the runner starts oxy start --enterprise, seeds demo_project/ as the Demo workspace, signs in as [email protected] and prefixes workspace paths. An /admin/* flow needs a staff session instead, handed in by scripts/verify-all.sh phase 4. Never local (legacy --local) unless the flow tests legacy local mode itself. Mixed-mode invocations error loudly.
setup: Build from the 3 documented commands in fixtures/reset.ts:SetupCommand only — reset_test_file (wipes demo_project/test.sql), restore_demo_file:<rel> (reverts a demo file via git show HEAD:… — used by builder flows), goto:/<path>. None of these can make a network call; flows never seed their own data.
cache_actions: true. Egress-substitution makes false no longer required for secret correctness — flip only for operational reasons (force-cold benchmark).
max_steps: 15–25 for typical flows. 30 default. Bump only if the flow has long pipelines (builder runs, agentic onboarding).
Step text Convert the dev's verbal user actions into one act: per logical action, each followed by a wait_for: that names the gate proving it worked. Bias hard toward explicit [data-testid=…] selectors — grep web-app/src/**/*.tsx for the testids referenced by the dev's description before authoring.
cache_scope: per step flow (default). Opt into shared only when the step text is byte-identical to a snippet from canonical-prompts.md.
expect: One judge: for the dev's stated success criterion. Zero or more assert: for any structural claim the description names ("a SQL artifact appears", "the save button hides", "the URL changes to /threads/").

Read the full file on GitHub · 237 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. 2d ago First seen · 237 lines · 23 tokens per session scan A 9a78c24b9573

Subscribe to this mod's changes

test-feature is a command published in the GitHub repository oxy-hq/oxygen (203 stars, last pushed yesterday), licensed Apache-2.0. It adds 23 tokens to every session and 2,846 once invoked, about $0.0001 per session on Opus 5.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-10-14.