crosvm-contribution-workflow
Skill1.3k starsChanged 5 months agoBSD-3-ClauseView on GitHub
Skill to assist with the contribution workflow for crosvm. ALL agents making code changes MUST use this skill to run presubmit checks before committing.
Trending
Quiet this year.thin dataabout the whole repository
Who's talking about google/crosvm
- A Hacker News story“Crosvm – The Chrome OS Virtual Machine Monitor”Hacker News · Oct 27, 2021 · 6 points
- A Hacker News story“crosvm: The ChromeOS Virtual Machine Monitor”Hacker News · May 31, 2023 · 3 points
- termux/termux-packages“[Package]: crosvm”GitHub · Feb 10, 2024 · 2 reactions
- google/android-cuttlefish“Increase nofile limits to be able to use --gpu_mode="guest_swiftshader"”GitHub · Aug 13, 2024
- oasis-tcs/virtio-spec“virtio-sound: add latency_bytes definition”GitHub · Jun 21, 2024
The biggest 5 of 9 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 9
Talked about on GitHub and Hacker News (9 times).
On GitHub · 7
- Feb 10, 2024[Package]: crosvm — termux/termux-packages2 reactions · 127 comments
- Aug 13, 2024Increase nofile limits to be able to use --gpu_mode="guest_swiftshader" — google/android-cuttlefish0 reactions · 3 comments
- Jun 21, 2024virtio-sound: add latency_bytes definition — oasis-tcs/virtio-spec0 reactions · 2 comments
- May 21, 2024Stack overflow from opening qcow files with backing file pointing to itself — cloud-hypervisor/cloud-hypervisor0 reactions · 1 comment
- Aug 28, 2023refactor: refactor platform dependant code and fix windows tests — kubewarden/policy-fetcher0 reactions · 1 comment
2 more on GitHub
- Mar 8, 2023Potential missing INTx interrupt while handling EOI with IOAPIC — cloud-hypervisor/cloud-hypervisor0 reactions · 4 comments
- Jun 10, 2022fusedev: Fixed some issues about EINTR and EAGIN handled incorrectly — cloud-hypervisor/fuse-backend-rs0 reactions · 1 comment
On Hacker News · 2
- Oct 27, 2021Crosvm – The Chrome OS Virtual Machine Monitor6 points
- May 31, 2023crosvm: The ChromeOS Virtual Machine Monitor3 points · 1 comment
In this repository4 other files it gives its agents.
- .agents/AGENTS.mdAGENTS.md
- crosvm-cl-toolSkill
- crosvm-dev-containerSkill
- crosvm-testingSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 9 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
All commands must be executed from the repository root directory.
- Distinctive: line 23
Usage: Use this during normal development iterations.
- Distinctive: line 29
Usage: Run this as a minimum sanity check before creating a commit.
- Distinctive: line 34
Usage: Run this when you have made changes that might affect multiple platforms or are more substantial.
- Distinctive: line 41
Usage: Run this to quickly check all platforms (including riscv) for cross-platform changes.
- Distinctive: line 47
Usage: Run this before final submission or for complex changes that require full validation.
- Distinctive: line 65
Use one of the methods described above.
- Distinctive: line 100
Length: No more than 50 characters, including tags.
- Distinctive: line 111
Tip: If you do not know the bug number, ask the user for clarification.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Contribution Workflow Skill
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.
Formatting and Presubmit Checks
All commands must be executed from the repository root directory.
Choosing the Right Test Method
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 check- Usage: Use this during normal development iterations.
- Description: It attempts to compile the project with the default feature set. Fast and useful for quick feedback on syntax and basic type checking.
tools/dev_container ./tools/presubmit quick- Usage: Run this as a minimum sanity check before creating a commit.
- Description: Performs a health check, runs unit tests on x86, and runs clippy lints.
tools/dev_container ./tools/presubmit- Usage: Run this when you have made changes that might affect multiple platforms or are more substantial.
- Description: In addition to the quick checks, this performs cross-compilation and runs unit tests for other targets. Note: The default set does not cover all platforms (e.g., riscv).
tools/dev_container ./tools/presubmit clippy- Usage: Run this to quickly check all platforms (including riscv) for cross-platform changes.
- Description: Runs clippy lints for all supported platforms. This is a relatively quick way to ensure your changes don't break compilation on any platform.
tools/dev_container ./tools/presubmit all- Usage: Run this before final submission or for complex changes that require full validation.
- Description: This is the most thorough check. It runs all the above tests on all supported platforms, including end-to-end (e2e) tests using QEMU. Note: This takes a significant amount of time.
Commands
1. Auto-formatting
Automatically fixes code formatting. This also applies to Markdown files (.md) in addition to
source code.
tools/dev_container ./tools/fmt2. Running Checks
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.
Uploading Changes
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.
Commit Message Guidelines
Refer to these guidelines when writing commit messages for crosvm. You must only write a commit message AFTER ensuring all necessary tests pass.
1. Subject Line
- Format: Starts with a tag representing the component, followed by a colon and space, then the
description.
- Example:
devices: vhost: user: Add Connection type
- Example:
- Tags: Usually the name of the crate modified (e.g.,
devices:,base:). Use paths for specific components (e.g.,devices: vhost: user:). - Length: No more than 50 characters, including tags.
2. Body
- Content: State the motivation followed by the impact/action.
- Wrapping: Text must be wrapped to 72 characters.
3. BUG Lines
- Format:
BUG=b:<bug number>for Google issue tracker, orBUG=None. - You can have multiple
BUGlines. - Tip: If you do not know the bug number, ask the user for clarification.
4. TEST Lines
- Format: Describe how the change was tested in free form.
- You can have multiple
TESTlines.
5. Change-Id
- The gerrit commit message hook will insert this automatically if the commit-msg hook is installed.
- Important: The
Change-Idlinks the commit to a specific Gerrit change list (CL). Unless explicitly requested by the user, DO NOT change or remove theChange-Idwhen cherry-picking, rebasing, or amending commits.
Example Commit Message
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: I47651060c2ce3a7e9f850b7ed9af8bd035f82de6End-to-End Contribution Journey
Here is the typical sequence of steps for contributing a change:
- Start a branch:
git checkout -b my-feature-branch --track origin/main - Make changes and implement your feature or fix.
- Format your code:
tools/dev_container ./tools/fmt - Run presubmit checks:
(If tests fail and you need to debug individually or inspect the VM environment, refer to the crosvm-testing SKILL.md).tools/dev_container ./tools/presubmit quick - Commit your changes (following the Commit Message Guidelines):
git commit - Upload the CL:
(Refer to the crosvm-cl-tool SKILL.md if you need to add reviewers, trigger try jobs, or rebase)../tools/cl upload
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

