feat(skills): add ci skill for automated failure replication#23720
feat(skills): add ci skill for automated failure replication#23720mattKorwel merged 12 commits intomainfrom
Conversation
|
Size Change: -4 B (0%) Total Size: 26.3 MB
ℹ️ View Unchanged
|
…ript" This reverts commit f40a8ef.
📦 Skill Distribution & PackagingTo facilitate sharing and installation, I have packaged this skill into a 🛠️ How to PackageIf you make changes to the source in # node <path-to-creator>/package_skill.cjs <source-folder> <output-folder>
node /Users/mattkorwel/.gcli/nightly/node_modules/@google/gemini-cli/bundle/builtin/skill-creator/scripts/package_skill.cjs .gemini/skills/ci .gemini/dist🚀 How to InstallReviewers can install and test this skill immediately using the following commands: Project-Specific (Workspace Scope): gemini skills install .gemini/dist/ci.skill --scope workspaceMachine-Wide (User Scope): gemini skills install .gemini/dist/ci.skill --scope user🔄 ActivationAfter installation, reload your session to enable the expertise:
|
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a new CI skill to enhance the developer experience by automating the detection and local replication of continuous integration failures. It aims to eliminate manual monitoring and log parsing, allowing developers to quickly identify and fix issues by reproducing them instantly in their local environment. Highlights
Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
|
/gemini review |
| @@ -0,0 +1,66 @@ | |||
| --- | |||
| name: ci | |||
| description: | |||
There was a problem hiding this comment.
IIRC there's a command npm run watch which watches for run failures. Is the idea that your skill saves us time by not waiting for the run to complete before marking it failed?
There was a problem hiding this comment.
that is the core posit yes. npm run watch --compact will list any jobs that have failed (but not provide details on what or why). but npm run view --log and npm run view --job --log (which show test details)
block until all jobs are done. that means even though a test might fail at minute two, we wait another 10 plus to get the details, unless you manually go dig through the ui, which is very un agentic ;)
There was a problem hiding this comment.
also, at least in my experience, gh run view --logs and the model do a really really bad job of efficiently parsing through the logs. this is orders of magnitude quicker and uses multiple round trips less.
| process.exit(0); | ||
| } | ||
|
|
||
| while (true) { |
There was a problem hiding this comment.
nit: maybe we can have the agent break this up into subroutines for readability.
There was a problem hiding this comment.
great idea for future revision!
|
Maybe a good idea to have the pr-creator skill leverage this skill to watch the PR to make sure it passes all checks? |
|
the failing e2e test is a known flake. will merge main as soon as that fix lands to skip the flake. |



Description
This PR introduces a specialized CI Skill to the repository, designed to streamline the developer feedback loop during the final stages of PR preparation.
The Problem (Before)
Previously, a developer pushing a change had a fragmented experience:
gh run list.npm test -w <package> -- <path>command to reproduce it locally.The Solution (After)
The new
ciskill provides a high-signal, automated bridge between remote CI and local development:statusworkflow provides a real-time, single-line status in the terminal and exits immediately upon the first failure.replicateworkflow (default) not only monitors but automatically executes the necessary local commands (tests, lint) to reproduce the CI failure as soon as it happens.ci.mjs) to parse logs via the GitHub API, filter out noise, and generate exact, copy-pasteable (or auto-executed) commands tailored to the monorepo structure.Developer Journey
Changes
.gemini/skills/ci/SKILL.mddefining thestatusandreplicateworkflows..gemini/skills/ci/scripts/ci.mjs, a portable Node.js tool for high-performance CI monitoring and log parsing.Verification
@google/gemini-cliand@google/gemini-cli-core).skill-creatortoolchain.Technical Challenges & Why This Wasn't Easy
A significant hurdle in building this tool was handling the "race condition" of GitHub Actions logs.
gh run view --logcommands frequently fail with the message"logs are not complete until run is done", making it impossible to perform fail-fast analysis while jobs are still in progress.@google/gemini-clivs@google/gemini-cli-core) to generate valid local commands.