cargo-anvil-adoption
Skill28 starsChanged 11 days agoMITView on GitHub
Complete cargo-anvil adoption in an existing Rust repository after the first cargo anvil run. Use when generated Anvil files coexist with legacy CI, recipes, scripts, tool configuration, or validation failures.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- microsoft/oxidizerword for word, first seen Nov 12, 2026
Other versions1 project uses a version of this.
Word for word · 1
- microsoft/oxidizer★ 193100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository5 other files it gives its agents.
- AGENTS.mdAGENTS.md
- crates/cargo-anvil/AGENTS.mdAGENTS.md
- crates/cargo-coverage-gate/AGENTS.mdAGENTS.md
- cargo-anvil-adoptionSkill
- code-reviewSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
25 rules. About 0 are common, 17 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈17
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 11
Use this skill after the first cargo anvil run in a repository that already contained Rust build and CI infrastructure.
- Distinctive: line 17
Do the work in the repository.
- Distinctive: line 22
Read the repository's instructions and design documentation before editing.
- Distinctive: line 24
Treat existing CI, scripts, configuration, and branch policies as evidence of prior behavior to evaluate, not as behavior that must be …
- Distinctive: line 33
Keep release, deployment, packaging, compliance, code-signing, and other capabilities outside Anvil's scope.
- Distinctive: line 43
Read AGENTS.md, nested instruction files, design docs, and contributor documentation.
- Very specific: line 46
Run cargo anvil --dry-run.
- Very specific: line 48
If Anvil prerequisites are missing, run just anvil-setup and retry.
- Very specific: line 50
Do not use --force merely to make the run succeed.
- Distinctive: line 56
Search for all local and cloud build surfaces:
- Distinctive: line 88
Ensure the root MSRV and stable toolchain selection are intentional and compatible with Anvil's deterministic selection rules.
- Distinctive: line 97
Prefer changing repository configuration or code to weakening a generated check.
- Distinctive: line 99
When the legacy and Anvil behaviors differ, explain the resulting behavior change and recommend the Anvil standard.
- Distinctive: line 109
Prefer the catalog behavior.
- Distinctive: line 117
Do not hand-edit emitted files when their source template is available.
- Distinctive: line 121
Run the narrow Anvil recipe corresponding to each legacy capability and resolve its failures first.
- Very specific: line 133
When a check fails, fix the root cause and rerun that specific recipe instead of repeating the entire tier.
- Distinctive: line 146
After equivalence is established:
- Distinctive: line 148
delete legacy workflows, scheduled jobs, setup actions, recipes, and scripts whose complete behavior is now owned by Anvil.
- Very specific: line 150
remove duplicate tool-version files and updaters when justfiles/anvil/versions.just is the authoritative list.
- Distinctive: line 152
update badges, contributor documentation, and agent instructions to name the Anvil workflows and recipes.
- Distinctive: line 159
Do not change hosted branch protection or organization policy without the required authorization.
- Very specific: line 165
Run cargo anvil and then cargo anvil --dry-run.
- Very specific: line 168
Run just anvil-pr for the complete local PR tier.
- Distinctive: line 174
Search again for deleted workflow names, stale badges, old recipe names, duplicate version lists, and orphaned scripts.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
<!-- GENERATED BY cargo-anvil. DO NOT EDIT DIRECTLY. -->Complete cargo-anvil adoption
Use this skill after the first cargo anvil run in a repository that already
contained Rust build and CI infrastructure. The goal is a clean, reviewable
Anvil installation that adopts the Anvil catalog as its default build and
validation contract, removes duplicate capabilities, and passes the generated
checks.
Do the work in the repository. Do not stop at an audit or plan unless a decision genuinely requires the user.
Invariants
- Read the repository's instructions and design documentation before editing.
- Preserve unrelated working-tree changes. Never discard or rewrite user work.
- Treat existing CI, scripts, configuration, and branch policies as evidence of prior behavior to evaluate, not as behavior that must be preserved.
- Compare legacy and Anvil behavior across command arguments, operating systems, feature sets, toolchains, failure policy, outputs, schedules, permissions, and downstream consumers. Call out meaningful differences, then prefer the Anvil behavior unless a concrete repository requirement justifies divergence.
- Migrate justified repository requirements to Anvil-supported configuration before deleting their old implementation. Do not preserve historical customization solely to maintain exact legacy behavior.
- Keep release, deployment, packaging, compliance, code-signing, and other capabilities outside Anvil's scope. Keep repository-specific test automation only when it covers a documented requirement that the Anvil catalog does not satisfy.
- Change cargo-anvil templates rather than generated copies when working in the cargo-anvil source repository, then regenerate.
1. Establish the adoption state
- Inspect the current branch, working tree, repository root, and remotes.
- Read
AGENTS.md, nested instruction files, design docs, and contributor documentation. - Inspect
.anvil.lock, generated files, and any.anvil-proposedsiblings. - Run
cargo anvil --dry-run. Classify every proposed update, refusal, customized file, disabled item, and stale manifest entry. - If Anvil prerequisites are missing, run
just anvil-setupand retry.
Do not use --force merely to make the run succeed. Use it only when the
repository is intentionally switching from a different tool recorded in
.anvil.lock.
2. Inventory the existing build system
Search for all local and cloud build surfaces:
- GitHub Actions, Azure DevOps pipelines, reusable templates, composite actions, and scheduled jobs;
- root and imported Justfiles, Makefiles, task runners, and developer scripts;
- Rust toolchain files and independent tool-version lists;
rustfmt.toml,clippy.toml, Cargo lint tables,deny.toml, audit config, spelling dictionaries, coverage configuration, and impact configuration;- mutation, Miri, Loom, fuzzing, examples, documentation, semver, external-type, license, and dependency checks;
- badges, contributor docs, agent instructions, branch protection, rulesets, required contexts, and merge queues.
Build a capability map from each legacy entry point to its Anvil counterpart. Record meaningful differences and unmatched behavior. For every retained repository-specific capability, document the requirement that prevents using the Anvil behavior.
3. Align the repository to Anvil
Resolve differences at the policy source:
- Merge formatting and lint policy into the repository's normal Rust, rustfmt, and Clippy configuration outside Anvil-managed regions.
- Preserve license, source, advisory, ban, and duplicate-dependency policy in
deny.tomlor the relevant tool configuration. - Move spelling exceptions into
.spelling. - Express coverage thresholds and opt-outs through cargo-coverage-gate metadata or narrowly scoped source attributes. Do not preserve a second coverage exclusion list when the Anvil gate cannot read it.
- Record intentional external public types in the package metadata understood by cargo-check-external-types.
- Ensure the root MSRV and stable toolchain selection are intentional and compatible with Anvil's deterministic selection rules.
- Represent Miri exclusions next to the affected tests, using profile-specific cfgs when only one scheduled profile needs an exception.
- Represent Loom support structurally with a feature, a required-feature test target, and a cfg-gated dependency.
- Mark interactive, credentialed, destructive, or long-running examples in
[package.metadata.anvil.examples].no-run.
Prefer changing repository configuration or code to weakening a generated check. Never convert discovery errors or unsupported states into silent skips. When the legacy and Anvil behaviors differ, explain the resulting behavior change and recommend the Anvil standard. Preserve the legacy behavior only when the repository has a current, explicit requirement that Anvil cannot represent.
4. Resolve generated-content conflicts
For every Anvil-owned file or managed region:
- Determine whether the repository edit encodes real policy or is an obsolete implementation detail.
- Prefer the catalog behavior. Move only justified repository policy to the supported configuration surface where possible.
- Revert the generated content to the catalog form by running
cargo anvil. - Take ownership of generated content only when the repository has a durable requirement the catalog cannot represent. Document why it must diverge.
- Re-run
cargo anvil --dry-rununtil there are no unexplained proposals, refusals, or manifest changes.
Do not hand-edit emitted files when their source template is available.
5. Evaluate differences before deleting duplicates
Run the narrow Anvil recipe corresponding to each legacy capability and resolve its failures first. Examples:
just anvil-fmtjust anvil-clippyjust anvil-doc-buildjust anvil-pr-testjust anvil-pr-msrvjust anvil-pr-runtime-analysisjust anvil-pr-fuzzingjust anvil-pr-mutants
When a check fails, fix the root cause and rerun that specific recipe instead of
repeating the entire tier. Install missing prerequisites with the matching
*-setup recipe or just anvil-setup.
Compare results with the legacy command where behavior is not obviously
identical. Treat disagreements as migration decisions, not automatic Anvil
defects: describe the impact and adopt Anvil's behavior unless the legacy
behavior serves a current requirement outside the catalog. Account for impact
scoping by using ANVIL_IMPACT=off when a deliberate full-workspace comparison
is required.
6. Remove duplicate infrastructure
After equivalence is established:
- delete legacy workflows, scheduled jobs, setup actions, recipes, and scripts whose complete behavior is now owned by Anvil;
- remove duplicate tool-version files and updaters when
justfiles/anvil/versions.justis the authoritative list; - update badges, contributor documentation, and agent instructions to name the Anvil workflows and recipes;
- retain scripts and pipelines only for requirements outside Anvil's scope, and document the unmet requirement and why the catalog behavior is insufficient;
- identify required status contexts or external rulesets that must change before the cleanup can merge.
Do not change hosted branch protection or organization policy without the required authorization. Report the exact old and new contexts for the maintainer when an atomic external update is necessary.
7. Final verification
- Run
cargo anviland thencargo anvil --dry-run; the second run must be clean. - Run
just anvil-pr-fast. - Run
just anvil-prfor the complete local PR tier. If that is impractical, and a generated CI backend will validate the current change, ask whether to stop after the fast tier and rely on PR checks for the remaining groups. A local-only installation must run the remaining groups locally. Never describe partial validation as complete. - Confirm generated README files and documentation are current.
- Search again for deleted workflow names, stale badges, old recipe names, duplicate version lists, and orphaned scripts.
- Review the final diff for unrelated changes and accidental policy loss.
Finish with:
- what Anvil now owns;
- what legacy infrastructure was removed;
- what repository-specific infrastructure remains, which requirement it serves, and why the Anvil behavior is insufficient;
- any intentional behavioral differences;
- any branch-policy or ruleset action required before merge;
- the exact validation completed and anything left to cloud CI.
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.

