Agent skill

Shepherd PRs

by flutter in flutter/flutter

Automate shepherding, checking status, updating branches, and landing open PRs or approved third-party contributor PRs in the flutter/flutter repository using the gh CLI.

BSD-3-ClauseAuto-check passedMobile

Install Shepherd PRs

skills CLI
$ npx skills add flutter/flutter --skill shepherd-prs -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install flutter/flutter shepherd-prs --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/flutter/flutter.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/shepherd-prs .claude/skills/shepherd-prs && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
shepherd-prs
GitHub stars
179k
Token cost
~1.7k tokens
SKILL.md length
774 words
Files
1
Skills in repo
14
Repo updated
First seen
Licence
BSD-3-Clause

At a glance

Automate shepherding, checking status, updating branches, and landing open PRs or approved third-party contributor PRs in the flutter/flutter repository using the gh CLI.

  • Works in 6 steps: Checking PR Status → Pre-Autosubmit Verification Rules → Third-Party Contributor PRs (2-Reviewer… → …
  • PRs that are not approved (unless they are your own and you want to check status)
  • SKILL.md covers 1. Checking PR Status, 2. Pre-Autosubmit Verification…, 3. Third-Party Contributor PRs… and 4. Failed Checks & Manual LUCI…, plus 2 more sections
  • Calls gh; reaches cr-buildbucket.appspot.com

What it does

Shepherd PRs is an agent skill from flutter/flutter. Automate shepherding, checking status, updating branches, and landing open PRs or approved third-party contributor PRs in the flutter/flutter repository using the gh CLI. When to use: - When you need to check the status of open PRs or shepherded third-party PRs. - When you need to update stale branches or apply the 'autosubmit' label to land approved PRs. When not to use: - Do not use for PRs that are not approved (unless they are your own and you want to check status). - Do not use for repositories other than…

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Mobile, covering Cross-platform mobile apps. It works with Flutter and Dart. The repository describes itself as: Flutter makes it easy and fast to build beautiful apps for mobile and beyond. The licence is BSD-3-Clause.

When your agent uses it

  • PRs that are not approved (unless they are your own and you want to check status)
  • Repositories other than flutter/flutter

Example prompts

  • “autosubmit”
  • “/shepherd-prs”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Checking PR Status
  2. Pre-Autosubmit Verification Rules
  3. Third-Party Contributor PRs (2-Reviewer Requirement)
  4. Failed Checks & Manual LUCI Re-runs
  5. Stale Branch Updates, CICD Label & Token Scope
  6. Target Branch Correction & Merge Conflicts

What it can do on your machine

Read from SKILL.md and the folder at commit 8679894. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • gh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • cr-buildbucket.appspot.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Shepherd PRs loads about 1.7k tokens when it runs. Until then it costs about 136 tokens; SKILL.md has 774 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~136
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from flutter/flutter at commit 8679894, republished under its BSD-3-Clause licence (© flutter). 774 words, ~1,651 tokens.

Download SKILL.mdSave it as .claude/skills/shepherd-prs/SKILL.md (or your agent's skills folder).
name
shepherd-prs
description
Automate shepherding, checking status, updating branches, and landing open PRs or approved third-party contributor PRs in the flutter/flutter repository using the gh CLI. When to use: - When you need to check the status of open PRs or shepherded third-party PRs. - When you need to update stale branches or apply the 'autosubmit' label to land approved PRs. When not to use: - Do not use for PRs that are not approved (unless they are your own and you want to check status). - Do not use for repositories other than flutter/flutter.

Shepherding Pull Requests Skill (flutter/flutter)

This skill defines the canonical runbook for shepherding pull requests in the flutter/flutter repository using native GitHub CLI (gh) commands.

1. Checking PR Status

When the user asks for the status of open or approved PRs:

  1. List Your Own Open PRs:
    bash
    gh pr list --repo flutter/flutter --author <username> --state open --json number,title,url,mergeable,reviewDecision
  2. List Shepherded / Reviewed Third-Party PRs:
    bash
    gh pr list --repo flutter/flutter --search "reviewed-by:<username> -author:<username> is:open" --json number,title,url,mergeable,reviewDecision
  3. Inspect Detailed PR Checks:
    bash
    gh pr checks <number> --repo flutter/flutter
  4. Inspect Reviews, Labels, and Comments:
    bash
    gh pr view <number> --repo flutter/flutter --json labels,reviewDecision,reviews,comments

2. Pre-Autosubmit Verification Rules

Before applying or re-applying the autosubmit label (gh pr edit <number> --repo flutter/flutter --add-label autosubmit), always perform the following pre-flight verification checks to ensure the autosubmit bot will not reject or strip the label:

  1. Check Previous autosubmit Removal History in Comments:

    • Always check if the autosubmit label was previously removed by the auto-submit bot by checking PR comments:
      bash
      gh pr view <number> --repo flutter/flutter --json comments
    • Look for messages from auto-submit such as "autosubmit label was removed...".
    • If the label was previously removed, identify the exact reason stated by the bot (e.g., failing CI checks, insufficient approvals, merge conflicts, or stale branch) and confirm that the underlying issue has been resolved before re-applying autosubmit.
  2. Verify Freshness of Base Commit (>7 Days Old):

    • Check whether the PR's base commit is stale (>7 days old).
    • If the base commit is more than 7 days old, always instruct running or execute a branch update before attempting to add autosubmit:
      bash
      gh pr update-branch <number> --repo flutter/flutter
    • Do not apply autosubmit until the branch update is complete and CI checks on the updated branch succeed.
  3. Strictly Verify Required Reviewer Approvals:

    • Strictly verify that third-party contributor PRs (CONTRIBUTOR, FIRST_TIME_CONTRIBUTOR, NONE) have at least 2 team member approvals (MEMBER or OWNER) before adding autosubmit so the bot doesn't remove it again.
    • Check reviews in gh pr view <number> --repo flutter/flutter --json reviews to confirm the number of approvals from Flutter team members.
  4. Verify All Status Checks Are 100% Passing:

    • The Flutter autosubmit bot automatically strips the autosubmit label whenever any CI check fails.
    • Verify that all status checks are passing (SUCCESS/pass).
    • If any check is flaky, failing, or pending a retry:
      1. Do NOT apply the autosubmit label immediately.
      2. Inform the user of the failing check and instruct them to retry it first.
      3. Only apply the autosubmit label after all retried checks complete successfully:
        bash
        gh pr edit <number> --repo flutter/flutter --add-label autosubmit

3. Third-Party Contributor PRs (2-Reviewer Requirement)

  • Pull requests authored by third-party contributors (CONTRIBUTOR, FIRST_TIME_CONTRIBUTOR, NONE) require two explicit approvals from Flutter team members (MEMBER or OWNER) before the autosubmit bot will merge them.
  • If only one team member has approved a third-party PR and the autosubmit label is applied, the autosubmit bot will remove the label.
  • Action: Strictly verify via gh pr view <number> --repo flutter/flutter --json reviews that at least 2 team member approvals are present before adding autosubmit so the bot doesn't remove it again. If only 1 approval exists, remind the user to request a second reviewer before applying the label.
Show full SKILL.md (286 more words)Show less

4. Failed Checks & Manual LUCI Re-runs

  • Due to GitHub App permission policies, third-party check runs (such as LUCI checks created by flutter-dashboard) cannot be re-run via the GitHub API.
  • Action:
    1. Print the exact LUCI Buildbucket link (e.g., https://cr-buildbucket.appspot.com/build/<build_id>) for the failing check.
    2. Instruct the user to open the URL and click Retry Build on the LUCI page.
    3. If a check continues to fail after manual retries, inspect the failure logs (gh pr view <number> --repo flutter/flutter or flutter-pr-checks-finder) and summarize the failure for the user.

5. Stale Branch Updates, CICD Label & Token Scope

  • If a PR branch is out of date with master (including when the base commit is >7 days old):
    • Always update the branch using gh pr update-branch <number> --repo flutter/flutter before attempting to add autosubmit.
  • Re-applying the CICD Label:
    • After updating a branch with gh pr update-branch (or when shepherding a PR that has not run CI), the CICD label is often stripped or required to start the CI checks on the updated commit.
    • Always check if the CICD label is present after a branch update, and re-apply it if missing:
      bash
      gh pr edit <number> --repo flutter/flutter --add-label CICD
  • Stale Token Scope Error: If updating fails due to workflow file permissions (ERROR: ... lacks the "workflow" scope), instruct the user to refresh their CLI scope:
    bash
    gh auth refresh -h github.com -s workflow

6. Target Branch Correction & Merge Conflicts

  • Dismissed Reviews Warning: Changing the target branch of a PR often causes GitHub to automatically dismiss existing approvals. Alert the user if the target branch changed so they can re-approve on GitHub.
  • Merge Conflicts: If a PR has conflicts (MERGEABLE is CONFLICTING), notify the user so the author can resolve them.

© flutter, BSD-3-Clause. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/shepherd-prs of flutter/flutter.

Open the folder on GitHubat commit 8679894

Compare with similar skills

Shepherd PRs next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Shepherd PRs compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Shepherd PRs this skillflutter/flutter179k—~1.7kAutomated safety check: PassBSD-3-Clause
Flutter Pub ReleaseMixinNetwork/flutter-plugins512—~1.3kAutomated safety check: PassMIT
Liquid Glass Widgetssdegenaar/liquid_glass_widgets712—~3.8kAutomated safety check: PassMIT
Flutter Bloc and Cubitandrewyng/context-hub14k—~998Automated safety check: PassMIT
Solidnank1ro/solid165—~3.1kAutomated safety check: PassMIT
Sync Cbl Docscbl-dart/cbl-dart152—~2kAutomated safety check: PassApache-2.0

Similar skills

  • Flutter Pub Release

    MixinNetwork/flutter-plugins

    Prepare and draft a pub.dev release for a package in the flutter-plugins monorepo.

    512 GitHub stars~1.3k tokensUpdated 1 mo ago
    MobileAuto-check passed
  • Liquid Glass Widgets

    sdegenaar/liquid_glass_widgets

    Mastery guide and architectural rules for liquidglasswidgets.

    712 GitHub stars~3.8k tokensUpdated today
    MobileAuto-check passed
  • Flutter Bloc and Cubit

    andrewyng/context-hub

    Helps choose between Bloc and Cubit in Flutter and sets defaults for packages, lifecycle, widget binding and tests.

    14k GitHub stars~998 tokensUpdated 4 mo ago
    MobileAuto-check passed
  • Solid

    nank1ro/solid

    PRIORITY — read this skill FIRST before writing Dart code when pubspec.yaml declares solidannotations or solidgenerator.

    165 GitHub stars~3.1k tokensUpdated 1 mo ago
    MobileAuto-check passed
  • Sync Cbl Docs

    cbl-dart/cbl-dart

    Sync a Couchbase Lite for Dart documentation page with the official Couchbase Lite docs.

    152 GitHub stars~2k tokensUpdated 12 days ago
    MobileAuto-check passed
  • Flutter SoLoud Audio Filters

    alnitak/flutter_soloud

    Explains how to add and tune flutter_soloud's 13 audio filters at global, per-sound and mixing-bus level, including activation order and parameter fades.

    424 GitHub stars~2.1k tokensUpdated yesterday
    MobileAuto-check passed

More from flutter/flutter

All 14 skills in this repo
  • Engine Whats New

    flutter/flutter

    Generates the "what's new" release summary and diff file for changes in the Flutter engine (//engine/src/flutter) between two releases (e.g., 3.47 vs 3.44).

    179k GitHub stars~978 tokensUpdated today
    Auto-check passed
  • Flutter Cherry Pick

    flutter/flutter

    How to land a formal cherry-pick of a merged PR for the flutter/flutter repo stable or beta channel.

    179k GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • Upgrade Browser

    flutter/flutter

    Upgrade browser versions (Chrome or Firefox) in the Flutter Web Engine and/or Framework tests.

    179k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Code Review

    flutter/flutter

    Performs a comprehensive, multi-step code review of pull requests or local code changes, using iterative refinement (generation, critique, synthesis) to ensure high-quality, actionable feedback.

    179k GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Bump Dart

    flutter/flutter

    Do not trigger automatically; only run when a user runs /bump-dart.

    179k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Run Devicelab With Led

    flutter/flutter

    Run DeviceLab tests for Flutter PRs using LUCI's led CLI tool.

    179k GitHub stars~786 tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Shepherd PRs

What does Shepherd PRs do?

Automate shepherding, checking status, updating branches, and landing open PRs or approved third-party contributor PRs in the flutter/flutter repository using the gh CLI. Shepherd PRs is an agent skill from flutter/flutter. Automate shepherding, checking status, updating branches, and landing open PRs or approved third-party contributor PRs in the flutter/flutter repository using the gh CLI.

When should I use Shepherd PRs?

Shepherd PRs fits situations like: PRs that are not approved (unless they are your own and you want to check status); repositories other than flutter/flutter.

How do I install Shepherd PRs in Claude Code?

Run `npx skills add flutter/flutter --skill shepherd-prs -a claude-code`. Or copy the skill folder (.agents/skills/shepherd-prs in flutter/flutter) into .claude/skills/shepherd-prs in your project. Claude Code loads it when a task matches its description.

How do I install Shepherd PRs in Codex?

Run `npx skills add flutter/flutter --skill shepherd-prs -a codex`. Or copy the skill folder (.agents/skills/shepherd-prs in flutter/flutter) into .agents/skills/shepherd-prs in your project. Codex loads it when a task matches its description.

Can I use Shepherd PRs in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add flutter/flutter --skill shepherd-prs -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/shepherd-prs, .gemini/skills/shepherd-prs, .github/skills/shepherd-prs and .opencode/skills/shepherd-prs in your project.

What does Shepherd PRs need to run?

Going by SKILL.md and its folder, Shepherd PRs needs the command-line tools its instructions call (gh).

Does Shepherd PRs access the network?

SKILL.md names 1 domain. In commands or code: cr-buildbucket.appspot.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Shepherd PRs safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Shepherd PRs use?

Shepherd PRs is published under the BSD-3-Clause licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Shepherd PRs use?

About 1.7k tokens (SKILL.md is roughly 6.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Shepherd PRs?

Skills that share tags, products or a category with Shepherd PRs: Flutter Pub Release (MixinNetwork/flutter-plugins, 512 stars), Liquid Glass Widgets (sdegenaar/liquid_glass_widgets, 712 stars), Flutter Bloc and Cubit (andrewyng/context-hub, 14k stars) and Solid (nank1ro/solid, 165 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Shepherd PRs?

flutter (a GitHub organization) maintains it in flutter/flutter, which has 179,369 GitHub stars. The repository holds 14 skills in this directory. The repository was last updated on October 8, 2026.

Source: flutter/flutter on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.