Flutter cherry pick

From flutter/flutter · View interactive version

Flutter cherry pick is an AI agent skill from the GitHub repository flutter/flutter. How to land a formal cherry-pick of a merged PR for the flutter/flutter repo stable or beta channel. Only use for flutter/flutter landed pull requests. Only use when the cherry pick request is into "stable", "beta" or a branch that has the format with flutter-<major>.<minor>-candidate.0.

How to use this skill

Skill file

Flutter Cherry-Pick Workflow

Constraints

This skill has the following strict constraints:

Quick Start

Trigger this skill by providing a merged PR number or URL and optionally the target channel:

Workflows

Phase 1: Initialization and Channel Detection

  1. Identify Inputs:
  1. Determine Channel:
  1. Verify you are in the root of the flutter repository.
  2. Verify Environment: Ensure the repository is clean (no uncommitted changes). Run git status --porcelain to check. If there are pending changes, stop and ask the user to resolve them or stash them.

Phase 2: Run Cherry-Pick Orchestrator

  1. Run the helper script to start the process:

```bash

<DART_EXECUTABLE> .agents/skills/flutter-cherry-pick/scripts/flutter_cp.dart --pr <ORIGINAL_PR> --channel <CHANNEL> --action start

```

  1. Evaluate Script Output:

Phase 3: Conflict Resolution

  1. Analyze Conflicts:
  1. Document Conflicts: Articulate what conflicts were encountered and how they were resolved. You will need to include this information in the final PR description.
  2. Attempt Auto-Resolution:
  1. User Fallback:
  1. Continue the Process:

```bash

<DART_EXECUTABLE> .agents/skills/flutter-cherry-pick/scripts/flutter_cp.dart --pr <ORIGINAL_PR> --channel <CHANNEL> --action continue

```

Phase 4: Fill Template and Apply

  1. Retrieve Template:
  1. Gather Context:
  1. Draft the Template:

```markdown

### Impact

What is the impact of this cherry-pick? (Explain the impact on users...)

```

```markdown

### Impact

This fixes a critical crash in the image decoder when rendering corrupted GIFs.

```

```markdown

### Shared Engineering Cohort

Were any engineering cohorts (e.g. Flutter Tooling, Engine, Framework) consulted?

```

```markdown

### Shared Engineering Cohort

Were any engineering cohorts (e.g. Flutter Tooling, Engine, Framework) consulted?

```

  1. Review with User (GATING STEP):
  1. Apply Template, Update Title, and Add Label:

```bash

gh pr edit <CP_PR> --title "[<CHANNEL>] <ORIGINAL_PR_TITLE>" --body "<FINAL_TEMPLATE>" --add-label "cp: review"

```

(Note: If gh pr edit fails due to GraphQL deprecation errors, you can use the REST API via gh api to update the body and add the label).

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.