red-first

Advisory guidance for ordering tests and implementation in test-driven development, starting with a failing test. TDD is a practice of writing a test first, then changing the code until the test passes.

In plain words
What is it for?
Use it when planning a behavior change and deciding which failing tests to write and run before adding the implementation.
Why use it?
It helps ensure that a behavior change is described by a meaningful test and that the test fails for the expected reason before implementation begins.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/omerakben/code-oz/red-first
Any agent
npx skills add omerakben/code-oz --skill red-first
Clone the repo
git clone --depth 1 https://github.com/omerakben/code-oz

Made for: Claude Code, Codex.

Per session 28 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,540 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00028 $0.01540
Opus 5 $0.00014 $0.00770
Sonnet 5 $0.00006 $0.00308
Haiku 4.5 $0.00003 $0.00154

Measured 2d ago against content hash 8116aee9831c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

red-first 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.

plugins/code-oz-discipline/skills/red-first/SKILL.md · 130 lines

How it starts

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

Advisory only — not an enforced gate. For enforced gates and a different-model review, run code-oz run.

Where this skill sits

This is advice, and it is the lowest-priority voice in the room. Your user's instructions, the project's CLAUDE.md, the code-oz engine contracts, and any system or developer constraints all outrank this skill. When any of them conflict with anything below, follow them and ignore this skill. This skill never overrides those instructions, and nothing here changes your existing operating rules — it only offers a way to think before you build.

RED-first test ordering

Use this when someone asks "what's a good RED-first test order here?" or is about to change behavior and wants the test to come first. This is advice on sequencing; it does not run anything for you.

The ordering

  1. Write the failing test first. Name the behavior you are about to add or change. Write the smallest test that asserts it.
  2. Run it and confirm it fails for the right reason. A test that passes before the change, or fails for an unrelated reason (typo, missing import), proves nothing. Read the failure message and confirm it is the assertion you intended.
  3. Write the minimal implementation. Just enough to make that test pass — no adjacent refactors, no "while I'm here" extras.
  4. Run again and confirm green. The test you wrote now passes, and nothing that was green went red.
  5. Refactor under green. Improve the code with the tests guarding you. Re-run to stay green.

A useful check

A real RED test fails when the production change is reverted. If your test still passes with the implementation removed, it mirrors the implementation instead of pinning the behavior — rewrite it.

What this is not

This skill advises the ordering. It does not run your tests, it does not verify that anything passed, and it never claims a test suite is green on your behalf — report only what you actually ran and saw. For an enforced VERIFY phase with real evidence the engine records and gates on, run code-oz run.

Read the full file on GitHub · 130 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 · 130 lines · 28 tokens per session scan A 8116aee9831c

Subscribe to this mod's changes

red-first is a skill published in the GitHub repository omerakben/code-oz (2 stars, last pushed 2mo ago), licensed MIT. It adds 28 tokens to every session and 1,540 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-31.

Related

Other skills, from other repositories

skill-creator

Scaffold, author, and validate an Agent Skill. Use when the user wants to create a new skill, turn a repeatable workflow into a reusable SKILL.md, or fix a skill that fails to load.

stippi/code-assistant · 47 tokens

E2E Testing Nori Skillsets Subcommands

Use when you need to interactively test a nori-skillsets CLI subcommand end-to-end via tmux, with full filesystem isolation.

tilework-tech/nori-skillsets · 39 tokens

TUI Puppeteering with tmux

Use when automating or testing TUI/CLI applications - provides isolated tmux sessions with scripts for input, output capture, and state verification.

tilework-tech/nori-skillsets · 37 tokens

issue-review

Triage a copperhead GitHub issue, attempt reproduction, and check it against the spec. Use when the user asks to review an issue, e.g. /issue-review 42 or /issue-review .

copperheadhq/copperhead · 47 tokens

openai-docs

Use when the user asks how to build with OpenAI products or APIs, asks about Codex itself or choosing Codex surfaces, needs up-to-date official documentation with citations, help choosing the latest model for a use case, latest/current/default-model prompting guidance, or model upgrade and prompt-upgrade guidance; use…

rojim666/SztuCode · 105 tokens

visualize

Create visualizations and interactive tools directly in conversation. Use when asked to show how something works, make simulators or labs, maps, plots, charts or graphs, comparisons, UI mockups, scenarios, adjustable inputs, and exploration beyond regular text.

rojim666/SztuCode · 53 tokens