google/crosvm-contribution-workflow
Skill to assist with the contribution workflow for crosvm. ALL agents making code changes MUST use this skill to run presubmit checks before committing.
npx skills add https://github.com/google/crosvm --skill crosvm-contribution-workflow
This skill assists with the crosvm contribution workflow. ALL agents making code changes MUST use
this skill to verify their changes (by compiling and running tests) before proceeding to commit or
requesting review, even if the user does not explicitly ask to run tests.
All commands must be executed from the repository root directory.
Depending on the scope of your changes, choose the appropriate method to verify your work. The
relevant checks must pass before you proceed to create a commit or request review.
./tools/dev_container cargo checkuseful for quick feedback on syntax and basic type checking.
tools/dev_container ./tools/presubmit quicktools/dev_container ./tools/presubmitsubstantial.
tests for other targets. Note: The default set does not cover all platforms (e.g., riscv).
tools/dev_container ./tools/presubmit clippyto ensure your changes don't break compilation on any platform.
tools/dev_container ./tools/presubmit allplatforms, including end-to-end (e2e) tests using QEMU. **Note: This takes a significant amount
of time.**
Automatically fixes code formatting. This also applies to Markdown files (.md) in addition to
source code.
tools/dev_container ./tools/fmt
Use one of the methods described above. Example for quick check:
tools/dev_container ./tools/presubmit quick
> [!TIP] If your tests fail on presubmit and you need to debug the tests individually or inspect the
> VM environment, please refer to the crosvm-testing SKILL.md.
Once your changes are verified and formatted, you can upload them to Gerrit for review.
We use a custom tool ./tools/cl for this. The basic command to upload is:
./tools/cl upload
> [!TIP] For advanced usage of the CL tool, including rebasing downstream branches, checking CL
> status, and pruning old branches, see the specialized crosvm-cl-tool
> SKILL.md.
Refer to these guidelines when writing commit messages for crosvm. You must only write a commit
message AFTER ensuring all necessary tests pass.
description.
devices: vhost: user: Add Connection typedevices:, base:). Use paths forspecific components (e.g., devices: vhost: user:).
BUG=b:<bug number> for Google issue tracker, or BUG=None.BUG lines.TEST lines.Change-Id links the commit to a specific Gerrit change list (CL). Unlessexplicitly requested by the user, DO NOT change or remove the Change-Id when cherry-picking,
rebasing, or amending commits.
devices: vhost: user: vmm: Add Connection type
This abstracts away the cross-platform differences:
cfg(any(target_os = "android", target_os = "linux")) uses a Unix
domain domain stream socket to connect to the vhost-user backend, and
cfg(windows) uses a Tube.
BUG=b:249361790
TEST=tools/presubmit all
Change-Id: I47651060c2ce3a7e9f850b7ed9af8bd035f82de6
Here is the typical sequence of steps for contributing a change:
git checkout -b my-feature-branch --track origin/main
tools/dev_container ./tools/fmt
tools/dev_container ./tools/presubmit quick
*(If tests fail and you need to debug individually or inspect the VM environment, refer to the
crosvm-testing SKILL.md).*
git commit
./tools/cl upload
*(Refer to the crosvm-cl-tool SKILL.md if you need to add
reviewers, trigger try jobs, or rebase).*
Take google/crosvm-contribution-workflow from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.