Skip to content

Adds pre-push readiness skill#11935

Merged
auto-submit[bot] merged 22 commits into
flutter:mainfrom
camsim99:test-pre-push-agent
Jul 1, 2026
Merged

Adds pre-push readiness skill#11935
auto-submit[bot] merged 22 commits into
flutter:mainfrom
camsim99:test-pre-push-agent

Conversation

@camsim99

@camsim99 camsim99 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Adds a new pre-push-skill skill that verifies changes made to a packages are ready to be "pushed", i.e. the committed changes could successfully be made into a pull request that follows the requirements of the flutter/packages repository (including some of the items in the checklist below).

Pre-Review Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. 2

@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Jun 18, 2026
Comment thread .agents/skills/pre-push-skill/SKILL.md Outdated
```bash
dart run script/tool/bin/flutter_plugin_tools.dart \
format --run-on-changed-packages
```

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just saw that we could also use the --set-exit-if-changed option. But we could format directly since it might help the developer. @LouiseHsu what do you think?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think what you have is good already!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it depends on what you want the scope of this skill to be. My gut says that the skill should not format but instead should say that formatting changes were found. That way one of the evals we can run is "did any files change when running this skill" and enforce that the answer is no. But that only makes sense if the skills "check pre push" skill and not a "prepare for push" skil. So it comes down to a scope question.

Second we are designing this as a system. The precommits should handle formatting(and analyze) so maybe the right answer is to do no formatting checks.

Comment thread .agents/skills/pre-push-skill/SKILL.md Outdated
@@ -0,0 +1,184 @@
---
name: "pre-push-skill"
description: "A comprehensive pre-push checklist for contributing to the flutter/packages repository."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So from what I remember, skills are invoked only based off the description and the name. So maybe you can make the desc more detailed? something like

"Executes the required pre-push steps for the flutter/packages repository. Call this tool immediately whenever the user asks to push, requests a code review before committing, or wants to validate their local changes for a pull request. Do NOT use this tool if the user is working in flutter/flutter or flutter/engine."

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Good call, I like your description! Updated it.

@github-actions github-actions Bot removed the CICD Run CI/CD label Jun 18, 2026
@camsim99 camsim99 added the CICD Run CI/CD label Jun 18, 2026
@camsim99 camsim99 marked this pull request as ready for review June 18, 2026 20:23
@camsim99 camsim99 requested a review from reidbaker June 18, 2026 20:23

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds a new markdown document, SKILL.md, defining the pre-push validation steps and checklist for the flutter/packages repository. The review feedback suggests two improvements to the instructions: first, recommending that developers commit rather than stash their changes during the initial working tree check to ensure latest changes are validated; and second, clarifying that any auto-generated changes in the final check should be committed rather than discarded.

Comment thread .agents/skills/pre-push-skill/SKILL.md Outdated
Comment thread .agents/skills/pre-push-skill/SKILL.md Outdated
Comment thread .agents/skills/pre-push-skill/SKILL.md Outdated
@@ -0,0 +1,184 @@
---
name: "pre-push-skill"
description: "Executes the required pre-push steps for the flutter/packages repository. Call this tool immediately whenever the user asks to push, requests a code review before committing, or wants to validate their local changes can become a pull request. Do NOT use this tool if the user is working in flutter/flutter or flutter/engine."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure this should trigger on request for "code review before committing". Consider instead

Suggested change
description: "Executes the required pre-push steps for the flutter/packages repository. Call this tool immediately whenever the user asks to push, requests a code review before committing, or wants to validate their local changes can become a pull request. Do NOT use this tool if the user is working in flutter/flutter or flutter/engine."
description: "Executes the required pre-push steps for the flutter/packages repository. Call this tool immediately whenever the user asks to push, asks if we/you are ready to push, or wants to validate their local changes can become a pull request. [Do NOT use this tool if the user is working in flutter/flutter or flutter/engine](https://github.com/flutter/flutter/pull/188373)."

Why did you need "flutter/flutter#188373"? This skill should be loaded locally so it should not leak to those environments.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accepted minus the notes on engine/framework

Comment thread .agents/skills/pre-push-skill/SKILL.md Outdated
Comment thread .agents/skills/pre-push-skill/SKILL.md Outdated
Comment thread .agents/skills/pre-push-skill/SKILL.md Outdated
Comment thread .agents/skills/pre-push-skill/SKILL.md Outdated
Comment thread .agents/skills/pre-push-skill/SKILL.md Outdated
Comment thread .agents/skills/pre-push-skill/SKILL.md Outdated
## 3. Format Code

Consistent code style is required for all pull requests.
The repository uses auto-formatters (like `dart format`, `clang-format`)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not not but maybe later we should reference the check-readiness skill to ensure the formatters are on path and acceptable.

Comment thread .agents/skills/pre-push-skill/SKILL.md Outdated
```bash
dart run script/tool/bin/flutter_plugin_tools.dart \
format --run-on-changed-packages
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it depends on what you want the scope of this skill to be. My gut says that the skill should not format but instead should say that formatting changes were found. That way one of the evals we can run is "did any files change when running this skill" and enforce that the answer is no. But that only makes sense if the skills "check pre push" skill and not a "prepare for push" skil. So it comes down to a scope question.

Second we are designing this as a system. The precommits should handle formatting(and analyze) so maybe the right answer is to do no formatting checks.

Comment thread .agents/skills/pre-push-skill/SKILL.md Outdated

```bash
dart run script/tool/bin/flutter_plugin_tools.dart \
dart-test --run-on-changed-packages

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again this is a place where we could simplify the command if we scoped it to camera_android_camerax

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also has the semi dangerous assumption that main was not broken and that we are merging back into main. Those assumptions are probably fine for a first version of the skill but we might want to articulate a more nuanced version.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated this to include more nuance. We could do a more technical step where we have the agent check if it was failing before but I consider that a bit out of scope.

Comment thread .agents/skills/pre-push-skill/SKILL.md Outdated
Comment thread .agents/skills/pre-push-skill/SKILL.md Outdated
Comment thread .agents/skills/pre-push-skill/SKILL.md Outdated

## 8. Final Clean Working Tree Check

Before pushing, ensure that all your fixes, formatting changes,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets make a call on if this skill is only about evaluating if the changes are ready to push or if its scope it to actually make the changes.

Comment thread .agents/skills/pre-push-skill/SKILL.md Outdated
Comment thread .agents/skills/pre-push-skill/SKILL.md Outdated
Comment thread .agents/skills/pre-push-skill/SKILL.md Outdated
Comment thread .agents/skills/pre-push-skill/SKILL.md Outdated
Comment thread .agents/skills/pre-push-skill/SKILL.md Outdated
Comment thread .agents/skills/pre-push-skill/SKILL.md Outdated
Comment thread .agents/skills/pre-push-skill/SKILL.md Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Meta comments:

  • We need to decide if file changes are part of this skill or if this skill has no file changes and instead the agents responds to failures like a test.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Decided that this should just be a skill that verifies the state of code versus applies fixes. We can change that later on but I don't think we should introduce the complexity of fixes for now.

@github-actions github-actions Bot added p: camera and removed CICD Run CI/CD labels Jun 23, 2026
@github-actions github-actions Bot added the CICD Run CI/CD label Jun 23, 2026
@camsim99 camsim99 added CICD Run CI/CD and removed CICD Run CI/CD labels Jun 23, 2026
@github-actions github-actions Bot removed the CICD Run CI/CD label Jun 23, 2026
@camsim99 camsim99 requested a review from reidbaker June 23, 2026 22:56
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Jun 23, 2026
@camsim99

Copy link
Copy Markdown
Contributor Author

@reidbaker Re-wrote this quite a bit to focus this skill on verifying code is ready to push versus making automatic fixes and only on the camera_android_camerax package. PTAL!

@reidbaker reidbaker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really good changes!

Comment thread packages/camera/camera_android_camerax/.agents/skills/pre-push-skill/SKILL.md Outdated
name: "pre-push-skill"
description: "Executes the required pre-push steps for the flutter/packages repository. Call this tool immediately whenever the user asks to push, asks if we/you are ready to push, or wants to validate their local changes can become a pull request."
---

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing this skill does not have is a list of assumptions about what is available on the path. Not a requirement for now but I wanted to point that out since I noticed. Here is an example from flutter/flutter. https://github.com/flutter/flutter/blob/master/.agents/skills/flutter-pr-checks-finder/SKILL.md#prerequisites

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added gh because we require it for making a PR :)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks this works. I think long term we want check readiness to cover our tool requirements.

Comment thread packages/camera/camera_android_camerax/.agents/skills/pre-push-skill/SKILL.md Outdated
Comment thread packages/camera/camera_android_camerax/.agents/skills/pre-push-skill/SKILL.md Outdated
Comment thread packages/camera/camera_android_camerax/.agents/skills/pre-push-skill/SKILL.md Outdated
give the user a quote from the testing documentation
on what type of test is required for their changes.
Beyond the rubric, if you think the change does not meet
the documented quality bar, tell the user

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

non blocking. We should standardize on how we refer to the person operating the agent/skill/chat and document that in the readme for this folder.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a note in the README!

Comment thread packages/camera/camera_android_camerax/.agents/skills/pre-push-skill/SKILL.md Outdated
(for example, `[camera_android] Fix crash`
or `[camera_android, camera_android_camerax] Fix crash`
if both `camera_android` and `camera_android_camerax` were modified).
- BODY is the PR description that should contain a link

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Later I think we will delegate pr descriptions to a skill but this is good.

Lets make the body of the pr follow the file https://github.com/flutter/packages/blob/main/.github/PULL_REQUEST_TEMPLATE.md. You can link it as a relative path from this directory.

@github-actions github-actions Bot removed the CICD Run CI/CD label Jun 24, 2026
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Jun 24, 2026
@camsim99 camsim99 requested a review from reidbaker June 24, 2026 22:58
@camsim99 camsim99 added CICD Run CI/CD and removed CICD Run CI/CD labels Jun 24, 2026
name: "pre-push-skill"
description: "Executes the required pre-push steps for the flutter/packages repository. Call this tool immediately whenever the user asks to push, asks if we/you are ready to push, or wants to validate their local changes can become a pull request."
---

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks this works. I think long term we want check readiness to cover our tool requirements.

@reidbaker reidbaker added override: no changelog needed Override the check requiring CHANGELOG updates for most changes override: no versioning needed Override the check requiring version bumps for most changes labels Jun 30, 2026
@camsim99 camsim99 added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 1, 2026
@auto-submit auto-submit Bot merged commit 56e3095 into flutter:main Jul 1, 2026
13 checks passed
pull Bot pushed a commit to Klomgor/flutter that referenced this pull request Jul 2, 2026
…er#188916)

flutter/packages@e742106...420e135

2026-07-02 dkwingsmt@users.noreply.github.com [material_ui] Migrate api
sample code to @example dartdoc directive (flutter/packages#12078)
2026-07-02 dkwingsmt@users.noreply.github.com [material_ui] Move over
more API samples (flutter/packages#12092)
2026-07-01 katelovett@google.com [cupertino_ui] Migrate api sample code
to @example dartdoc directive (flutter/packages#12063)
2026-07-01 katelovett@google.com [cupertino_ui] Move over more API
samples (flutter/packages#12086)
2026-07-01 48776784+mackings@users.noreply.github.com
[two_dimensional_scrollables] Fix TreeView horizontal hit testing
(flutter/packages#11859)
2026-07-01 1063596+reidbaker@users.noreply.github.com
[camera_android_camerax][tool] Integrate dart_code_linter for cyclomatic
complexity checks (flutter/packages#11999)
2026-07-01 dinurymomshad.dev@gmail.com [cross_file] Add runnable example
with main() (flutter/packages#11527)
2026-07-01 36861262+QuncCccccc@users.noreply.github.com [cupertino_ui]
Enable `switch_test.dart` (flutter/packages#12076)
2026-07-01 jmccandless@google.com [cupertino_ui] Re-enable
dialog_test.dart (flutter/packages#12057)
2026-07-01 jmccandless@google.com [cupertino_ui] Re-enable
action_sheet_test.dart (flutter/packages#12055)
2026-07-01 rmolivares@renzo-olivares.dev [cupertino_ui] Migrate
`bottom_tab_bar_test.dart` to `SemanticsHandle` (flutter/packages#12012)
2026-07-01 1063596+reidbaker@users.noreply.github.com [repo] Add comment
style guideline to AGENTS.md (flutter/packages#12077)
2026-07-01 43054281+camsim99@users.noreply.github.com Adds pre-push
readiness skill (flutter/packages#11935)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC flutter-ecosystem@google.com on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App CICD Run CI/CD override: no changelog needed Override the check requiring CHANGELOG updates for most changes override: no versioning needed Override the check requiring version bumps for most changes p: camera

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants