Flutter pr checks finder

From flutter/flutter · View interactive version

Flutter pr checks finder is an AI agent skill from the GitHub repository flutter/flutter. Find failing checks on a Flutter PR and locate the corresponding LUCI log URLs.

How to use this skill

Skill file

Flutter PR Checks Finder

Prerequisites

Workflow

1. Find Failing Checks

You can use the gh CLI if it's installed and authenticated, or use direct HTTP requests to the GitHub API as a fallback.

Option A: Using `gh` CLI (Preferred)

Run the following command to list checks:

gh pr checks <PR_NUMBER>
Option B: Using GitHub API via HTTP

If gh is not available, you can use read_url_content or a similar method to interact with the public GitHub API:

  1. Find the PR SHA:

Make an HTTP request to: https://api.github.com/repos/flutter/flutter/pulls/<PR_NUMBER>

Extract the head.sha field.

  1. List Check Runs:

Make an HTTP request to: https://api.github.com/repos/flutter/flutter/commits/<PR_SHA>/check-runs

Parse the JSON response. CRITICAL: You must handle pagination to avoid missing failures! Check the total_count field. If it is greater than the number of items in the check_runs array (typically capped at 100 or what you set with per_page), make additional HTTP requests by appending ?per_page=100&page=<N> to the URL for each subsequent page until all check runs are fetched. Identify all checks that have failed (i.e., where conclusion is failure).

Identify all checks that have failed.

2. Retrieve Failure Logs

For each failing check:

  1. Find the Log URL:

Example LUCI URL structure: https://ci.chromium.org/ui/p/flutter/builders/try/<Builder Name>/<Build Number>/overview

  1. Build Raw Log URL:
  1. Fetch Raw Logs:

Builder to Step Name Mapping

[!NOTE]

Step names can be very specific and hard to guess. This section documents patterns to help find them.

Recipes & Tools
Locating Exact Names in Engine

If guessing fails, find the exact test and task names in the engine configuration:

  1. Look up the builder in [.ci.yaml (engine)][ci-yaml-engine] to find its config_name property.
  2. Locate the corresponding JSON file in the [builders folder][builders-folder] directory.
  3. Read the JSON file to find the tests array and the specific tasks listed within them.
Fallback

If read_url_content fails with 404 on guessed step names, you may need to find the step name from the LUCI overview page or other sources.

[cocoon]: https://github.com/flutter/cocoon

[recipes]: https://github.com/flutter/recipes

[ci-yaml-root]: ../../../.ci.yaml

[ci-yaml-engine]: ../../../engine/src/flutter/.ci.yaml

[builders-folder]: ../../../engine/src/flutter/ci/builders/

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.