Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
brave avatar

Make Ci Green

  • 7 installs
  • 3.5k repo stars
  • Updated August 5, 2026
  • brave/brave-core

make-ci-green is a Claude Code skill that re-runs failed Jenkins CI jobs for a brave/brave-core pull request, choosing a workspace wipe for build failures and a normal retry for flaky tests.

About

Re-runs failed Jenkins CI jobs for a brave/brave-core pull request. It detects the failure stage and decides between a normal re-run for flaky test failures and a WIPE_WORKSPACE re-run for build or infrastructure failures. It also analyzes test failures to flag whether they came from the PR or are known upstream flakes. A developer uses it after CI goes red to retrigger only the failing checks.

  • Detects failure stage and picks WIPE_WORKSPACE vs normal re-run
  • Analyzes GTest failures to separate PR-caused from upstream flakes
  • Supports --dry-run to preview before triggering rebuilds

Make Ci Green by the numbers

  • 7 all-time installs (skills.sh)
  • Ranked #1,060 of 1,435 DevOps & CI/CD skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
At a glance

make-ci-green capabilities & compatibility

Requires JENKINS_BASE_URL, JENKINS_USER and JENKINS_TOKEN environment variables.

Capabilities
ci cd · testing · debugging
Works with
jenkins · github
Use cases
ci cd · testing · debugging
Runs
Runs locally
Pricing
Free
From the docs

What make-ci-green says it does

Re-run failed Jenkins CI jobs for a brave/brave-core PR. Automatically detects the failure stage and decides whether to use WIPE_WORKSPACE (for build/infra failures) or a normal re-run (for test/story
SKILL.md
The following environment variables must be set (e.g., in your `.envrc`):
SKILL.md
npx skills add https://github.com/brave/brave-core --skill make-ci-green

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs7
repo stars3.5k
Last updatedAugust 5, 2026
Repositorybrave/brave-core

What it does

Retrigger failing Jenkins CI checks on a brave/brave-core PR after a flaky or build failure.

Who is it for?

Brave developers whose brave-core PR has red CI and want to retrigger only the failing Jenkins checks.

Skip if: Non-Jenkins checks like SonarCloud or Socket Security, which it lists but cannot act on.

When should I use this skill?

A brave-core PR has failing CI jobs that need a retry or a workspace wipe.

What you get

Failing Jenkins checks are retriggered with the correct action and test failures are triaged.

By the numbers

  • 4-step job (parse, analyze, present, trigger)

Files

SKILL.mdMarkdownGitHub ↗

Make CI Green

Re-run failed Jenkins CI jobs for a brave/brave-core PR. Automatically detects the failure stage and decides whether to use WIPE_WORKSPACE (for build/infra failures) or a normal re-run (for test/storybook failures).

---

When to Use

  • Flaky test failures on CI that just need a retry
  • Build/infra failures that need a workspace wipe to recover
  • After pushing new commits to retrigger only the failing checks
  • Batch retriggering when multiple platform checks are failing

---

Environment Requirements

The following environment variables must be set (e.g., in your .envrc):

export JENKINS_BASE_URL=https://$JENKINS_BASE_URL
export JENKINS_USER=<your-jenkins-username>
export JENKINS_TOKEN=<your-api-token>

Get your API token from $JENKINS_BASE_URL/me/configure.

---

The Job

Step 1: Parse Arguments

Extract the PR number from the user's input. The PR number is required. Check for --dry-run flag.

User saysPR number
/make-ci-green 3393633936
"retry ci for 33936"33936
"make ci green on PR 33936"33936
"re-run failed jobs 33936 --dry-run"33936 (dry run)

Step 2: Analyze Failures

Run the script in dry-run mode to analyze without triggering:

python3 .claude/skills/make-ci-green/retrigger-ci.py <pr-number> --dry-run --format json

Step 3: Present Findings

Show the user what was found:

  • Failing Jenkins checks: check name, failed stage, recommended action

(normal vs WIPE_WORKSPACE), reason

  • Test failure analysis (for test stage failures): per-test details

including location, PR correlation, upstream flake verdict, existing issues, and issue filing suggestions

  • Non-Jenkins failures (SonarCloud, Socket Security, etc.): listed but not

actionable by this tool

  • Pending checks: still running, listed for awareness
  • No failures: report that CI is already green

Example output (build/infra failure):

PR 33936: 1 failing Jenkins check(s)

  [DRY-RUN] continuous-integration/linux-x64/pr-head
       Stage: build
       Action: WIPE_WORKSPACE
       Reason: Pre-test stage failure: "build" -> WIPE_WORKSPACE
       URL: https://$JENKINS_BASE_URL/job/brave-core-build-pr-linux-x64/job/PR-33936/2/

Example output (test failure with analysis):

PR 33936: 1 failing Jenkins check(s)

  [DRY-RUN] continuous-integration/linux-x64/pr-head
       Stage: test_brave_unit_tests
       Action: normal
       Reason: Test/post-build stage failure: "test_brave_unit_tests" -> normal re-run
       URL: https://$JENKINS_BASE_URL/job/brave-core-build-pr-linux-x64/job/PR-33936/2/
       Test Failures (2):

         - BraveWalletServiceTest.GetBalance
           Location: brave
           PR correlation: likely_from_pr (PR modifies files in same directory as test: browser/brave_wallet/)

         - WebUIURLLoaderFactoryTest.RangeRequest
           Location: chromium
           Upstream flake: known_upstream_flake
           PR correlation: likely_unrelated (Chromium test with no related chromium_src overrides in PR)
           >> SUGGEST FILING ISSUE: "Test failure: WebUIURLLoaderFactoryTest.RangeRequest"
           Stack trace (last 20 lines):
             ...

Key decisions shown per test failure:

  • likely_from_pr: The PR changes overlap with the test's source — developer

should fix their PR, no issue suggested

  • likely_unrelated: The failure appears unrelated to the PR — suggests

filing an issue if none exists

  • Existing issue found: Shows link to the existing issue instead of

suggesting a new one

  • Upstream flake (Chromium tests only): Shows LUCI Analysis verdict for

upstream flakiness

Step 4: Confirm and Trigger

If the user wants to proceed (and not --dry-run), run the script to trigger rebuilds:

python3 .claude/skills/make-ci-green/retrigger-ci.py <pr-number> --format json

Report the results: which checks were retriggered, the action taken, and any errors.

---

WIPE_WORKSPACE Decision Logic

The script examines which pipeline stage failed:

Failed StageActionRationale
init, checkout, install, config, build, compile, setup, sync, gclient, source, deps, fetch, configure, bootstrap, prepare, environmentWIPE_WORKSPACEInfrastructure/build failure; workspace may be corrupted
storybook, test(s), audit, lint, upload, publish, or anything elseNormal re-runTest failure likely flaky; no workspace issue
Unknown (API error)Normal re-runSafe default

Stage matching is case-insensitive substring matching (e.g., "Build (Debug)" matches "build").

---

Test Failure Analysis

When the failed stage is a test stage (not build/infra), the script automatically:

1. Extracts test failures from Jenkins console output (GTest [ FAILED ] patterns) 2. Classifies each test as Brave (src/brave/) or Chromium (src/ excluding brave) using git grep 3. Checks upstream flakiness via LUCI Analysis (Chromium tests only — Brave-specific tests are not in LUCI) 4. Correlates with PR changes to determine if the failure is likely caused by the PR or unrelated 5. Searches for existing issues in brave/brave-browser matching the test name 6. Suggests filing an issue only if the failure is likely unrelated to the PR AND no existing issue exists

PR Correlation Logic

ScenarioAssessmentAction
PR modifies the test file itselflikely_from_prNo issue suggestion — developer should fix their PR
PR modifies files in the same directory/modulelikely_from_prNo issue suggestion
PR has chromium_src/ overrides in related pathslikely_from_prNo issue suggestion
Chromium test with no related chromium_src/ changeslikely_unrelatedSuggest filing issue (if none exists)
Brave test with no overlapping PR changeslikely_unrelatedSuggest filing issue (if none exists)
Cannot determine (e.g., test source not found)unknownNo suggestion

Issue Filing

Issues are never auto-filed. The script only suggests filing and provides:

  • Suggested title: Test failure: <TestSuite.TestMethod>
  • Body with platform, upstream flake verdict (if applicable), and stack trace
  • Suggested label: QA/intermittent
  • Target repo: brave/brave-browser

The user must confirm before any issue is created.

---

Usage Examples

# Dry run: analyze without triggering
python3 .claude/skills/make-ci-green/retrigger-ci.py 33936 --dry-run

# Trigger rebuilds for all failing checks
python3 .claude/skills/make-ci-green/retrigger-ci.py 33936

# JSON output for programmatic use
python3 .claude/skills/make-ci-green/retrigger-ci.py 33936 --format json

# Dry run with JSON output
python3 .claude/skills/make-ci-green/retrigger-ci.py 33936 --dry-run --format json

---

Exit Codes

  • 0: Success (checks found and processed)
  • 1: Config error (missing JENKINS_TOKEN)
  • 2: API error (GitHub or Jenkins unreachable)
  • 3: No failing Jenkins checks found

---

Limitations

  • Only handles Jenkins CI checks (identified by $JENKINS_BASE_URL in the URL)
  • Cannot retrigger GitHub Actions or other CI systems (SonarCloud, Socket

Security)

  • Requires Jenkins API access with a valid token
  • Does not handle PENDING checks (still running)
  • WIPE_WORKSPACE detection relies on stage name keyword matching
  • Test failure extraction only supports GTest output format ([ FAILED ]

markers)

  • Upstream flake check only works for Chromium tests (Brave-specific tests are

not in LUCI)

  • PR correlation uses directory-level heuristics; indirect dependencies may not

be detected

  • Requires a local chromium src/ checkout for git grep test classification

Related skills

DevOps & CI/CDdevopstesting

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.