brave/brave-core/make-ci-green
Claude Code and agent skill by brave/brave-core
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Re-run failed CI jobs for a brave/brave-core PR. Detects failure stage and uses WIPE_WORKSPACE for build/infra failures. Triggers on: make ci green, retry ci, rerun ci, fix ci, re-run failed jobs, retrigger ci.
Install
npx vskill@latest install brave/brave-core/make-ci-greenSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as brave/brave-core/make-ci-green.
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):
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 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) |
Step 2: Analyze Failures
Run the script in dry-run mode to analyze without triggering:
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):
Example output (test failure with analysis):
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:
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 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").
Test Failure Analysis
When the failed stage is a test stage (not build/infra), the script automatically:
- Extracts test failures from Jenkins console output (GTest
[ FAILED ]
patterns)
- Classifies each test as Brave (
src/brave/) or Chromium (src/
excluding brave) using git grep
- Checks upstream flakiness via LUCI Analysis (Chromium tests only —
Brave-specific tests are not in LUCI)
- Correlates with PR changes to determine if the failure is likely caused
by the PR or unrelated
- Searches for existing issues in
brave/brave-browsermatching the test
name
- Suggests filing an issue only if the failure is likely unrelated to the
PR AND no existing issue exists
PR Correlation Logic
| 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 |
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
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_URLin 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 forgit greptest classification
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingagents/skills/make-ci-green/SKILL.md
Popularity
- Repository stars
- 3,627
- Repository forks
- 1,448
- 7-day trend score
- 41
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/brave/brave-core/make-ci-green)