Agent skill

Red Green Fix

by Comfy-Org in Comfy-Org/ComfyUI_frontend

Bug fix workflow that proves test validity with a red-then-green CI sequence.

GPL-3.0Auto-check passedTesting & QA

Install Red Green Fix

skills CLI
$ npx skills add Comfy-Org/ComfyUI_frontend --skill red-green-fix -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Comfy-Org/ComfyUI_frontend red-green-fix --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Comfy-Org/ComfyUI_frontend.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/red-green-fix .claude/skills/red-green-fix && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
red-green-fix
GitHub stars
2.1k
Token cost
~1.9k tokens
SKILL.md length
661 words
Files
2
Skills in repo
22
Repo updated
First seen
Licence
GPL-3.0

At a glance

Bug fix workflow that proves test validity with a red-then-green CI sequence.

  • Works in 4 steps: Setup → Red: Failing Test Only → Green: Minimal Fix → …
  • Writing a regression test
  • SKILL.md covers Why Two Commits, Input, Step 0 — Setup and Step 1 — Red: Failing Test Only, plus 4 more sections
  • Calls git, pnpm and gh

What it does

Red Green Fix is an agent skill from Comfy-Org/ComfyUI_frontend. Bug fix workflow that proves test validity with a red-then-green CI sequence. Commits a failing test first (CI red), then the minimal fix (CI green). Use when fixing a bug, writing a regression test, or when asked to prove a fix works.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `reference/testing-anti-patterns.md`).

It sits in Testing & QA, covering Failing and flaky tests, Debugging and Test-driven development. It works with Playwright. The repository describes itself as: Official front-end implementation of ComfyUI. The licence is GPL-3.0.

When your agent uses it

  • Writing a regression test
  • Asked to prove a fix works

Example prompts

  • “/red-green-fix”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Setup
  2. Red: Failing Test Only
  3. Green: Minimal Fix
  4. Open Pull Request

What it can do on your machine

Read from SKILL.md and the folder at commit a2dba8f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • pnpm
    • gh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, pnpm and gh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Red Green Fix loads about 1.9k tokens when it runs. Until then it costs about 62 tokens; SKILL.md has 661 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~62
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Comfy-Org/ComfyUI_frontend at commit a2dba8f, republished under its GPL-3.0 licence (© Comfy-Org). 661 words, ~1,884 tokens.

Download SKILL.mdSave it as .claude/skills/red-green-fix/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
red-green-fix
description
Bug fix workflow that proves test validity with a red-then-green CI sequence. Commits a failing test first (CI red), then the minimal fix (CI green). Use when fixing a bug, writing a regression test, or when asked to prove a fix works.

Red-Green Fix

Fixes bugs as two commits so CI automatically proves the test catches the bug.

Why Two Commits

If you commit the test and fix together, the test always passes — reviewers cannot tell whether the test actually detects the bug or is a no-op. Splitting into two commits creates a verifiable CI trail:

  1. Commit 1 (test-only) — adds a test that exercises the bug. CI runs it → test fails → red X.
  2. Commit 2 (fix) — adds the minimal fix. CI runs the same test → test passes → green check.

The red-then-green sequence in the commit history proves the test is valid.

Input

The user provides a bug description as an argument. If no description is given, ask the user to describe the bug before proceeding.

Bug description: $ARGUMENTS

Step 0 — Setup

Create an isolated branch from main:

bash
git fetch origin main
git checkout -b fix/<bug-name> origin/main

Step 1 — Red: Failing Test Only

Write a test that reproduces the bug. Do NOT write any fix code.

Choosing the Test Framework
Bug typeFrameworkFile location
Logic, utils, stores, composablesVitestsrc/**/*.test.ts (colocated)
UI interaction, canvas, workflowsPlaywrightbrowser_tests/tests/*.spec.ts

For Playwright tests, follow the /writing-playwright-tests skill for patterns, fixtures, and tags.

Rules
  • The test MUST fail against the current codebase (this is the whole point)
  • Do NOT modify any source code outside of test files
  • Do NOT include any fix, workaround, or behavioral change
  • Do NOT add unrelated tests or refactor existing tests
  • Keep the test minimal — only what is needed to reproduce the bug
  • Avoid common anti-patterns — see reference/testing-anti-patterns.md
Vitest Example
typescript
// src/utils/pathUtil.test.ts
import { describe, expect, it } from 'vitest'
import { resolveModelPath } from './pathUtil'

describe('resolveModelPath', () => {
  it('handles absolute paths from folder_paths API', () => {
    const result = resolveModelPath(
      '/absolute/models',
      '/absolute/models/checkpoints'
    )
    expect(result).toBe('/absolute/models/checkpoints')
  })
})
Playwright Example
typescript
import {
  comfyPageFixture as test,
  comfyExpect as expect
} from '../fixtures/ComfyPage'

test.describe('Model Download', { tag: ['@smoke'] }, () => {
  test('downloads model when path is absolute', async ({ comfyPage }) => {
    await comfyPage.workflow.loadWorkflow('missing-model')
    const downloadBtn = comfyPage.page.getByTestId('download-model-button')
    await downloadBtn.click()
    await expect(comfyPage.page.getByText('Download complete')).toBeVisible()
  })
})
Verify Locally First

Run the test locally before pushing to confirm it fails for the right reason:

bash
# Vitest
pnpm test:unit <test-file>

# Playwright
pnpm test:browser:local -- --grep "<test name>"

If the test passes locally, it does not reproduce the bug — revisit your test before pushing.

Quality Checks and Commit
bash
pnpm typecheck
pnpm lint
pnpm format:check

git add <test-files-only>
git commit -m "test: add failing test for <concise bug description>"
git push -u origin HEAD
Verify CI Failure
bash
gh run list --branch $(git branch --show-current) --limit 1

STOP HERE. Inform the user of the CI status and wait for confirmation before proceeding to Step 2.

  • If CI passes: the test does not catch the bug. Revisit the test.
  • If CI fails for unrelated reasons: investigate and fix the test setup, not the bug.
  • If CI fails because the test correctly catches the bug: proceed to Step 2.

Step 2 — Green: Minimal Fix

Write the minimum code change needed to make the failing test pass.

Show full SKILL.md (291 more words)Show less
Rules
  • Do NOT modify, weaken, or delete the test from Step 1 — it is immutable. If the test needs changes, restart from Step 1 and re-prove the red.
  • Do NOT add new tests (tests were finalized in Step 1)
  • Do NOT refactor, clean up, or make "drive-by" improvements
  • Do NOT modify code unrelated to the bug
  • The fix should be the smallest correct change
Quality Checks and Commit
bash
pnpm typecheck
pnpm lint
pnpm format

git add <fix-files-only>
git commit -m "fix: <concise bug description>"
git push
Verify CI Pass
bash
gh run list --branch $(git branch --show-current) --limit 1
  • If CI passes: the fix is verified. Proceed to PR creation.
  • If CI fails: investigate and fix. Do NOT change the test from Step 1.

Step 3 — Open Pull Request

bash
gh pr create --title "fix: <description>" --body "$(cat <<'EOF'
## Summary

<Brief explanation of the bug and root cause>

- Fixes #<issue-number>

## Red-Green Verification

| Commit | CI Status | Purpose |
|--------|-----------|---------|
| `test: ...` | :red_circle: Red | Proves the test catches the bug |
| `fix: ...` | :green_circle: Green | Proves the fix resolves the bug |

## Test Plan

- [ ] CI red on test-only commit
- [ ] CI green on fix commit
- [ ] Added/updated E2E regression under `browser_tests/` or explained why not applicable
- [ ] Manual verification (if applicable)
EOF
)"

Gotchas

CI fails on test commit for unrelated reasons

Lint, typecheck, or other tests may fail — not just your new test. Check the CI logs carefully. If the failure is unrelated, fix it in a separate commit before the test: commit so the red X is clearly attributable to your test.

Test passes when it should fail

The bug may only manifest under specific conditions (e.g., Windows paths, external model directories, certain workflow structures). Make sure your test setup matches the actual bug scenario. Check that you're not accidentally testing the happy path.

Flaky Playwright tests

If your e2e test is intermittent, it doesn't prove anything. Use retrying assertions (toBeVisible, toHaveText) instead of waitForTimeout. See the /writing-playwright-tests skill for anti-patterns.

Pre-existing CI failures on main

If main itself is red, branch from the last green commit or fix the pre-existing failure first. A red-green proof is meaningless if the baseline is already red.

Reference

ResourcePath
Unit test frameworkVitest (src/**/*.test.ts)
E2E test frameworkPlaywright (browser_tests/tests/*.spec.ts)
E2E fixturesbrowser_tests/fixtures/
E2E assetsbrowser_tests/assets/
Playwright skill.claude/skills/writing-playwright-tests/SKILL.md
Unit CI.github/workflows/ci-tests-unit.yaml
E2E CI.github/workflows/ci-tests-e2e.yaml
Lint CI.github/workflows/ci-lint-format.yaml
Testing anti-patternsreference/testing-anti-patterns.md
Related skill.claude/skills/perf-fix-with-proof/SKILL.md

© Comfy-Org, GPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in .claude/skills/red-green-fix of Comfy-Org/ComfyUI_frontend.

  • SKILL.md
  • reference/testing-anti-patterns.md

Open the folder on GitHubat commit a2dba8f

Compare with similar skills

Red Green Fix next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Red Green Fix compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Red Green Fix this skillComfy-Org/ComfyUI_frontend2.1k—~1.9kAutomated safety check: PassGPL-3.0
Testingkortix-ai/suna20k—~3.6kAutomated safety check: NotesCustom licence
E2Esendou-ink/sendou.ink297—~2.1kAutomated safety check: NotesAGPL-3.0
Fix BugMelbourneDeveloper/dart_node1131 repos~709Automated safety check: NotesNone
Opsmill Dev Test Driving Bugsopsmill/infrahub534—~4kAutomated safety check: PassApache-2.0
Debug E2E Testbitovi/ai-enablement-prompts121—~677Automated safety check: PassMIT

Similar skills

  • Testing

    kortix-ai/suna

    A skill your agent uses for every Kortix test task, behavior change, bug fix, refactor, API route change, CLI change, SDK change, browser journey, test failure, coverage question, local benchmark…

    20k GitHub stars~3.6k tokensUpdated today
    Testing & QAAuto-check: notes
  • E2E

    sendou-ink/sendou.ink

    Run, debug, and manage Playwright e2e tests. An agent skill from sendou-ink/sendou.ink.

    297 GitHub stars~2.1k tokensUpdated today
    Testing & QAAuto-check: notes
  • Fix Bug

    MelbourneDeveloper/dart_node

    Fix a bug using test-driven development. An agent skill from MelbourneDeveloper/dart_node.

    113 GitHub starsUsed in 1 repo~709 tokens
    Testing & QAAuto-check: notes
  • Writes a single failing test that reproduces a bug after its root-cause analysis is complete, before any fix is written.

    534 GitHub stars~4k tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Debug E2E Test

    bitovi/ai-enablement-prompts

    Debug and fix failing Playwright E2E tests. An agent skill from bitovi/ai-enablement-prompts.

    121 GitHub stars~677 tokensUpdated 29 days ago
    Testing & QAAuto-check passed
  • Debugging

    idavidov13/agentic-playwright

    Playwright test debugging conventions for the scaffold — reading failure messages, classifying failure modes (TimeoutError, ZodError, strict-mode violation, locator not found, network errors, schema…

    225 GitHub stars~6.2k tokensUpdated 2 days ago
    Testing & QAAuto-check: notes

More from Comfy-Org/ComfyUI_frontend

All 22 skills in this repo
  • Adding Deprecation Warnings

    Comfy-Org/ComfyUI_frontend

    Adds deprecation warnings for renamed or removed properties/APIs.

    2.1k GitHub stars~775 tokensUpdated today
    Auto-check passed
  • Agent Integration Replay

    Comfy-Org/ComfyUI_frontend

    Replay recorded agent conversations as Playwright tests against the real chat panel and canvas.

    2.1k GitHub stars~805 tokensUpdated today
    Auto-check: notes
  • Codegen Transform

    Comfy-Org/ComfyUI_frontend

    Transforms raw Playwright codegen output into ComfyUI convention-compliant tests.

    2.1k GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Comment Sicko

    Comfy-Org/ComfyUI_frontend

    Dispatches the comment-sicko subagent to hunt gratuitous comments in a PR/diff, triages its raw findings, and posts a polite, professional writeup.

    2.1k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Hardening Flaky E2E Tests

    Comfy-Org/ComfyUI_frontend

    Diagnoses and fixes flaky Playwright e2e tests by replacing race-prone patterns with retry-safe alternatives.

    2.1k GitHub stars~2.8k tokensUpdated today
    Auto-check passed
  • Perf Fix With Proof

    Comfy-Org/ComfyUI_frontend

    Ships performance fixes with CI-proven improvement using stacked PRs.

    2.1k GitHub stars~1.6k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Red Green Fix

What does Red Green Fix do?

Bug fix workflow that proves test validity with a red-then-green CI sequence. Red Green Fix is an agent skill from Comfy-Org/ComfyUI_frontend. Bug fix workflow that proves test validity with a red-then-green CI sequence.

When should I use Red Green Fix?

Red Green Fix fits situations like: writing a regression test; asked to prove a fix works.

How do I install Red Green Fix in Claude Code?

Run `npx skills add Comfy-Org/ComfyUI_frontend --skill red-green-fix -a claude-code`. Or copy the skill folder (.claude/skills/red-green-fix in Comfy-Org/ComfyUI_frontend) into .claude/skills/red-green-fix in your project. Claude Code loads it when a task matches its description.

How do I install Red Green Fix in Codex?

Run `npx skills add Comfy-Org/ComfyUI_frontend --skill red-green-fix -a codex`. Or copy the skill folder (.claude/skills/red-green-fix in Comfy-Org/ComfyUI_frontend) into .agents/skills/red-green-fix in your project. Codex loads it when a task matches its description.

Can I use Red Green Fix in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Comfy-Org/ComfyUI_frontend --skill red-green-fix -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/red-green-fix, .gemini/skills/red-green-fix, .github/skills/red-green-fix and .opencode/skills/red-green-fix in your project.

What does Red Green Fix need to run?

Going by SKILL.md and its folder, Red Green Fix needs the command-line tools its instructions call (git, pnpm and gh).

Does Red Green Fix access the network?

SKILL.md contains no URLs. Its commands use git and gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Red Green Fix safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Red Green Fix use?

Red Green Fix is published under the GPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Red Green Fix use?

About 1.9k tokens (SKILL.md is roughly 7.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Red Green Fix?

Skills that share tags, products or a category with Red Green Fix: Testing (kortix-ai/suna, 20k stars), E2E (sendou-ink/sendou.ink, 297 stars), Fix Bug (MelbourneDeveloper/dart_node, 113 stars) and Opsmill Dev Test Driving Bugs (opsmill/infrahub, 534 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Red Green Fix?

Comfy-Org (a GitHub organization) maintains it in Comfy-Org/ComfyUI_frontend, which has 2,058 GitHub stars. The repository holds 22 skills in this directory. The repository was last updated on October 10, 2026.

Source: Comfy-Org/ComfyUI_frontend on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.