'Re-run failed CI jobs for a brave/brave-core PR. Detects failure stage and retry ci, rerun ci, fix ci, re-run failed jobs, retrigger ci.'
npx skills add https://github.com/brave/brave-core --skill 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).
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.
Extract the PR number from the user's input. The PR number is required. Check
for --dry-run flag.
| User says | PR number |
| ------------------------------------ | --------------- |
| /make-ci-green 33936 | 33936 |
| "retry ci for 33936" | 33936 |
| "make ci green on PR 33936" | 33936 |
| "re-run failed jobs 33936 --dry-run" | 33936 (dry run) |
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
Show the user what was found:
(normal vs WIPE_WORKSPACE), reason
including location, PR correlation, upstream flake verdict, existing issues,
and issue filing suggestions
actionable by this tool
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:
should fix their PR, no issue suggested
filing an issue if none exists
suggesting a new one
upstream flakiness
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.
The script examines which pipeline stage failed:
| Failed Stage | Action | Rationale |
| -------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | -------------------------------------------------------- |
| init, checkout, install, config, build, compile, setup, sync, gclient, source, deps, fetch, configure, bootstrap, prepare, environment | WIPE_WORKSPACE | Infrastructure/build failure; workspace may be corrupted |
| storybook, test(s), audit, lint, upload, publish, or anything else | Normal re-run | Test failure likely flaky; no workspace issue |
| Unknown (API error) | Normal re-run | Safe default |
Stage matching is case-insensitive substring matching (e.g., "Build (Debug)"
matches "build").
When the failed stage is a test stage (not build/infra), the script
automatically:
[ FAILED ]patterns)
src/brave/) or Chromium (src/excluding brave) using git grep
Brave-specific tests are not in LUCI)
by the PR or unrelated
brave/brave-browser matching the testname
PR AND no existing issue exists
| Scenario | Assessment | Action |
| ----------------------------------------------------- | -------------------- | --------------------------------------------------- |
| PR modifies the test file itself | likely_from_pr | No issue suggestion — developer should fix their PR |
| PR modifies files in the same directory/module | likely_from_pr | No issue suggestion |
| PR has chromium_src/ overrides in related paths | likely_from_pr | No issue suggestion |
| Chromium test with no related chromium_src/ changes | likely_unrelated | Suggest filing issue (if none exists) |
| Brave test with no overlapping PR changes | likely_unrelated | Suggest filing issue (if none exists) |
| Cannot determine (e.g., test source not found) | unknown | No suggestion |
Issues are never auto-filed. The script only suggests filing and provides:
Test failure: <TestSuite.TestMethod>QA/intermittentbrave/brave-browserThe user must confirm before any issue is created.
# 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
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$JENKINS_BASE_URL in the URL)Security)
[ FAILED ]markers)
not in LUCI)
be detected
src/ checkout for git grep test classificationIntegration with protocols.io API for managing scientific protocols. This skill should be used when working with protocols.io to search, create, update, or publish protocols; manage protocol steps and materials; handle discussions and comments; organize workspaces; upload and manage files; or integrate protocols.io functionality into workflows. Applicable for protocol discovery, collaborative protocol development, experiment tracking, lab protocol management, and scientific documentation.
Analyzes job descriptions and generates tailored resumes that highlight relevant experience, skills, and achievements to maximize interview chances
Generate Excalidraw diagrams from natural language descriptions. Use when asked to "create a diagram", "make a flowchart", "visualize a process", "draw a system architecture", "create a mind map", or "generate an Excalidraw file". Supports flowcharts, relationship diagrams, mind maps, and system architecture diagrams. Outputs .excalidraw JSON files that can be opened directly in Excalidraw.
Build and distribute Expo development clients locally or via TestFlight
Use when you have a written implementation plan to execute in a separate session with review checkpoints
Data structure for annotated matrices in single-cell analysis. Use when working with .h5ad files or integrating with the scverse ecosystem. This is the data format skill—for analysis workflows use scanpy; for probabilistic models use scvi-tools; for population-scale queries use cellxgene-census.
Benchling R&D platform integration. Access registry (DNA, proteins), inventory, ELN entries, workflows via API, build Benchling Apps, query Data Warehouse, for lab data management automation.
Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use bioservices.
Take brave/make-ci-green from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.