Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Run presubmit checks on one or more commits. Prepare changes for submission by automatically fixing issues like formatting.
.claude/skills/pigweed-project-run-presubmit-checks/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-07 | ✗→✓ | ▲ Improved | -47% | 0% |
| case-08 | ✗→✓ | ▲ Improved | -11% | 0% |
| case-11 | ✗→✓ | ▲ Improved | -40% | 0% |
| case-12 | ✗→✓ | ▲ Improved | -10% | 0% |
| case-13 | ✗→✓ | ▲ Improved | -12% | 0% |
This skill describes how to use Pigweed's presubmit script in auto mode to automatically run checks, apply fixes, and continue a rebase across a stack of commits (CLs).
The auto mode in pw_presubmit streamlines the process of fixing presubmit issues across multiple commits. It starts an interactive rebase and runs checks on each commit. If a check fails but has an automatic fix, it applies the fix and amends the commit. If a check fails and cannot be fixed automatically, it stops and allows the user to fix it manually before resuming.
auto mode. If it is not clean, abort and tell the user to clean the working tree before starting.git rev-parse HEAD to get the current commit hash (referred to as <COMMIT>).git rebase --abort; git reset <COMMIT> --hard.> I am starting an interactive rebase at <COMMIT>. This will run presubmit checks on each commit in your stack. If a check fails but has an automatic fix, it will apply the fix and amend your commit. This will change your branch history. > > If you need to abort and fully restore your branch to its original state, you can run: > git rebase --abort; git reset <COMMIT> --hard
To run presubmit in auto mode on a stack of commits, use the following command:
console$ ./pw presubmit --mode auto --ui minimal --program full --base <BASE>
Replace <BASE> with the base commit of the stack (e.g., origin/main or a specific commit hash).
resume.json).When the script fails on a commit:
console $ git add <fixed_files> $ git commit --amend --no-edit
--resume flag and the path to the saved state file.console $ ./pw presubmit --resume /tmp/pw_presubmit_auto_XXXXXX/resume.json Replace /tmp/pw_presubmit_auto_XXXXXX/resume.json with the path provided in the failure message.
Other measured skills in the registry, with their headline benchmark lift.