red-first

red-first is a skill for Claude Code from omerakben/code-oz. It costs 28 tokens per session (1,540 once invoked), scanned A, original, MIT.

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 Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions CLAUDE.md.

Part of the code-oz-discipline plugin — 3 skills shipped together

Good fit Use it when planning a behavior change and deciding which failing tests to write and run before adding the implementation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/omerakben/code-oz/red-first
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 omerakben/code-oz --skill red-first
Clone the repo
git clone --depth 1 https://github.com/omerakben/code-oz

Made for: Claude Code.

Or install code-oz-discipline, the plugin that ships this one along with the rest of its 3 skills.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/omerakben/code-oz/red-first/github.svg)](https://agentmods.dev/skills/omerakben/code-oz/red-first)
Your own site
<a href="https://agentmods.dev/skills/omerakben/code-oz/red-first"><img src="https://agentmods.dev/badge/skills/omerakben/code-oz/red-first/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 red-first

Your own site · 80×15
<a href="https://agentmods.dev/skills/omerakben/code-oz/red-first"><img src="https://agentmods.dev/badge/skills/omerakben/code-oz/red-first.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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. 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.00028 $0.01540
Opus 5.5 $0.00011 $0.00616
Sonnet 5.5 $0.00006 $0.00308
Haiku 4.5 $0.00003 $0.00154

Measured 1mo ago against content hash 8116aee9831c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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. 1mo 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 4mo ago), licensed MIT. It adds 28 tokens to every session and 1,540 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-08-31.

Related

Other skills, from other repositories

implement

Use when an approved plan and task list exist and it is time to turn them into working, tested code — the SDD phase after analyze and before verify. Enforces TDD: a failing test comes before the code that makes it pass, one task at a time, appended to a progress ledger that survives compaction. Delegates test tooling…

ericrisco/rsc-harness · 123 tokens

test-driven-development

Writing code with tests first: RED-GREEN-REFACTOR, reproduce bugs as failing tests before fixing, and avoid testing anti-patterns. Use when implementing behaviour, fixing a defect, or asked to add tests.

damianvtran/local-operator · 48 tokens

rudder

Use locally captured coding-session intent to resolve a device-local behavioral spec, generate focused tests from that spec, implement the smallest production changes through red-green TDD, and verify coverage with the repository's native tooling. Use when the user asks to run Rudder, create or regenerate tests for…

RudderCode/Rudder · 101 tokens

tdd

A Test-Driven Development guide. TDD means writing a failing test first, adding the smallest implementation that passes it, and then improving the code while keeping the tests passing.

Insajin/autopus-adk · 11 tokens

tdd

A test-driven development workflow based on repeating three stages: write a failing test, make it pass, then improve the code. The tests focus on what users can do through public interfaces rather than internal implementation details.

Yulin-Bi/CodeAuto · 53 tokens

test-driven-development

Use when implementing any feature or bugfix, before writing implementation code.

transparent-pegasus/herdrpowers · 17 tokens