一键导入
prepare-cl
Verifies, commits, and uploads code changes as a Gerrit CL. Use when you have completed a task, fixed a bug, or are ready to submit changes for review.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Verifies, commits, and uploads code changes as a Gerrit CL. Use when you have completed a task, fixed a bug, or are ready to submit changes for review.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Builds and deploys UI demos/mocks for the ChromeOS Fleet Console/Milo UI to Google App Engine (GAE) for development and demo purposes. Handles GAE version naming constraints, VPC/cache permission workarounds, and ensures workspace cleanup after deployment.
Guidelines and commands for managing stacked CLs, preserving review votes, and querying Gerrit API.
Guidelines, metrics, testing patterns, and referential stability standards for measuring and vetting frontend performance optimizations in the LUCI Fleet Console. Use this skill when refactoring React hooks, tuning custom data fetching hooks (e.g., using TanStack Query), stabilizing component re-renders, or writing robust Cypress tests for tables.
Instructions for manually testing the Fleet Console using the browser subagent. Use when you need to verify UI changes, filter interactions, or page loads in the actual browser.
Guides the creation, editing, formatting, and structural best practices for agentic skills. Use this skill when writing or reviewing skill markdown files.
Coordinates commit order, branch safety, and submodule updates in workspaces containing nested git repositories. Use this skill when editing code or checking status across parent and submodule boundaries.
| name | prepare-cl |
| description | Verifies, commits, and uploads code changes as a Gerrit CL. Use when you have completed a task, fixed a bug, or are ready to submit changes for review. |
Note: This document contains instructions for AI code assistants working in this repository. Human developers can use it as a reference.
Use this skill when you have completed a task and need to prepare the changes for code review.
[!IMPORTANT] At the start of preparation, you MUST copy the progress checklist below into your very next response to the user, and check off the steps sequentially as you complete them. This ensures structured progress visibility and prevents skipping verification steps.
Progress:
Branch Safety Check:
git fetch origin to update your local repository refs. Always create the branch off the updated remote main: git checkout -b <branch-name> origin/main. Creating branches from stale local representations of origin/main is a major cause of early merge conflicts on Gerrit.git cl status or git branch -vv to verify that the active local branch is tracking the correct Gerrit CL ID.git log origin/main..HEAD to see the commits on your branch relative to main, and ensure they are all related to the current task.Verification:
git cl format.python3 -c "
import sys
for x in sys.argv[1:]:
with open(x, 'r') as f:
lines = f.readlines()
with open(x, 'w') as f:
f.writelines(l.rstrip() + '\n' for l in lines)
" <modified_files>
npm run lint -- <changed_file_paths>npm run test -- <test_file_paths>npm run type-checkgit cl presubmit.Commit Changes:
git status to see modified files.git add <files>.Bug: b/XXXXXXX (note the b/ prefix). Only include Bypass-Check-License: <reason> if touching third-party files where copyright statements cannot be modified; for first-party Chromium/LUCI code failing license checks, always update the header year (2026).Change-Id: When committing a brand new branch for the first time (-F), omit Change-Id: from the message file entirely so Gerrit's commit-msg hook generates a unique SHA-1 hash. Only include Change-Id: when amending (--amend) an existing uploaded CL.git commit -m "[fleet console] Fix CSV export missing columns by preserving URL columns\n\n... details ...\n\nBug: b/515102813"Upload UI Demo:
.gcloudignore setups, and VPC workarounds), run the deploy-ui-demo skill.https://<short-name>-dot-luci-milo-dev.appspot.com/ui/fleet/devicesLogin first using 'gcloud auth login'), notify the developer and ask them to run it on your behalf. Do not block the task on this failure.CL Upload:
[!CAUTION] Do NOT switch branches, stage/unstage files, or run other git operations while
git cl uploadis running in the background!git cl uploadruns asynchronously and expects the repository state to remain stable. If you switch branches (e.g., checkout a downstream branch) before the upload has fully completed, the upload process will package and commit files from the newly checked out branch under the old CL, corrupting the Gerrit CL with unrelated changes. Always wait for the upload task to finish completely before doing any further git operations.
schedule tool to go idle and check back.Advanced Git Operations for Agents:
origin/main directly. Do not stack them just because they are part of the same session or task.origin/main for the independent changes: git checkout -b <branch-name> origin/main.git cl upload.Do not use git add -A or git add . blindly. If you created temporary directories or output files, they will pollute your branch. Follow the staging safety workflows in the preventing-workspace-leakage skill to isolate generated/transient files inside .tmp/.
If you accidentally combined unrelated changes into a single commit and want to split it:
git reset --mixed HEAD~1.git add <specific_files>.git commit -m "Part 1...".If you need to build on top of another developer's in-flight CL:
git checkout -b dependent_branch.git cl patch -f <issue_number>.Rebasing and Handling Merge Conflicts:
[!IMPORTANT]
- No Bypass Tags: Do not include bypass directives (like
--bypass-hooksor--bypass-watchdog) unless explicitly authorized by the user or required due to pre-existing upstream failures at HEAD.- Anti-Flip-Flopping & Iteration Cap: If you are fixing lints or test failures, keep track of your history. If your fix reverts a previous commit or changes the same lines back and forth, stop. Limit autonomous repair loops to a maximum of 3 iterations before asking the user for help.