agentleFS
MicrosoftKnown publishermicrosoft/ox-tools/crates/cargo-anvil/templates/skills/cargo-anvil-adoption/SKILL.md

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

  • Other versions1 project uses a version of this.

    Word for word · 1

    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.

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
  1. Very specific:

    Use this skill after the first cargo anvil run in a repository that already contained Rust build and CI infrastructure.

    line 11
  2. Distinctive:

    Do the work in the repository.

    line 17
  3. Distinctive:

    Read the repository's instructions and design documentation before editing.

    line 22
  4. Distinctive:

    Treat existing CI, scripts, configuration, and branch policies as evidence of prior behavior to evaluate, not as behavior that must be …

    line 24
  5. Distinctive:

    Keep release, deployment, packaging, compliance, code-signing, and other capabilities outside Anvil's scope.

    line 33
  6. Distinctive:

    Read AGENTS.md, nested instruction files, design docs, and contributor documentation.

    line 43
  7. Very specific:

    Run cargo anvil --dry-run.

    line 46
  8. Very specific:

    If Anvil prerequisites are missing, run just anvil-setup and retry.

    line 48
  9. Very specific:

    Do not use --force merely to make the run succeed.

    line 50
  10. Distinctive:

    Search for all local and cloud build surfaces:

    line 56
  11. Distinctive:

    Ensure the root MSRV and stable toolchain selection are intentional and compatible with Anvil's deterministic selection rules.

    line 88
  12. Distinctive:

    Prefer changing repository configuration or code to weakening a generated check.

    line 97
  13. Distinctive:

    When the legacy and Anvil behaviors differ, explain the resulting behavior change and recommend the Anvil standard.

    line 99
  14. Distinctive:

    Prefer the catalog behavior.

    line 109
  15. Distinctive:

    Do not hand-edit emitted files when their source template is available.

    line 117
  16. Distinctive:

    Run the narrow Anvil recipe corresponding to each legacy capability and resolve its failures first.

    line 121
  17. Very specific:

    When a check fails, fix the root cause and rerun that specific recipe instead of repeating the entire tier.

    line 133
  18. Distinctive:

    After equivalence is established:

    line 146
  19. Distinctive:

    delete legacy workflows, scheduled jobs, setup actions, recipes, and scripts whose complete behavior is now owned by Anvil.

    line 148
  20. Very specific:

    remove duplicate tool-version files and updaters when justfiles/anvil/versions.just is the authoritative list.

    line 150
  21. Distinctive:

    update badges, contributor documentation, and agent instructions to name the Anvil workflows and recipes.

    line 152
  22. Distinctive:

    Do not change hosted branch protection or organization policy without the required authorization.

    line 159
  23. Very specific:

    Run cargo anvil and then cargo anvil --dry-run.

    line 165
  24. Very specific:

    Run just anvil-pr for the complete local PR tier.

    line 168
  25. Distinctive:

    Search again for deleted workflow names, stale badges, old recipe names, duplicate version lists, and orphaned scripts.

    line 174

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md
<!-- 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

  1. Inspect the current branch, working tree, repository root, and remotes.
  2. Read AGENTS.md, nested instruction files, design docs, and contributor documentation.
  3. Inspect .anvil.lock, generated files, and any .anvil-proposed siblings.
  4. Run cargo anvil --dry-run. Classify every proposed update, refusal, customized file, disabled item, and stale manifest entry.
  5. If Anvil prerequisites are missing, run just anvil-setup and 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.toml or 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:

  1. Determine whether the repository edit encodes real policy or is an obsolete implementation detail.
  2. Prefer the catalog behavior. Move only justified repository policy to the supported configuration surface where possible.
  3. Revert the generated content to the catalog form by running cargo anvil.
  4. Take ownership of generated content only when the repository has a durable requirement the catalog cannot represent. Document why it must diverge.
  5. Re-run cargo anvil --dry-run until 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-fmt
  • just anvil-clippy
  • just anvil-doc-build
  • just anvil-pr-test
  • just anvil-pr-msrv
  • just anvil-pr-runtime-analysis
  • just anvil-pr-fuzzing
  • just 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.just is 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

  1. Run cargo anvil and then cargo anvil --dry-run; the second run must be clean.
  2. Run just anvil-pr-fast.
  3. Run just anvil-pr for 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.
  4. Confirm generated README files and documentation are current.
  5. Search again for deleted workflow names, stale badges, old recipe names, duplicate version lists, and orphaned scripts.
  6. 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.