No slash command · from rust-plugin
Configures cargo-dist to build per-target archives, installers, and Homebrew formulas for Rust CLI binaries, and generates the release.yml GitHub workflow.
Ships in rust-plugin. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
dist (formerly cargo-dist) builds
per-target archives, installers and a Homebrew formula, and generates the
release.yml GitHub workflow that does it on every tag. The Setup steps are
the non-interactive setup, written for dist 0.32; check the installed version
with dist --version and the
config reference
when it differs.
| Use this skill when... | Use instead when... |
|---|---|
| Shipping prebuilt binaries of a Rust CLI on GitHub Releases | Versioning and changelogs only: configure-plugin:configure-release-please |
| Pairing dist with release-please tags | Tap layout, formula review, homebrew-core eligibility: the proposed homebrew-plugin |
| Adding a Homebrew formula or shell/PowerShell installer | Container images: configure-plugin:configure-container |
Pinning the actions in dist's generated release.yml | Starting the crate itself: rust-plugin:cargo-generate |
| Producing the release once the binary is ready to ship | The binary still reads files from its checkout (embedded config, user dirs, clap shape): rust-plugin:rust-installable-cli |
Nothing in this skill assumes an owner, tap, target list or secret layout.
Read them before writing config, and ask with AskUserQuestion for whatever
the files do not settle:
| Fact | Where to look first |
|---|---|
| Binary crates and their names | Cargo.toml ([[bin]], [workspace] members) |
| Release tooling | release-please-config.json, .github/workflows/*release* |
Homebrew tap (<owner>/homebrew-tap) | An existing dist-workspace.toml, the README's install section |
| Targets | Existing CI matrix, the README's supported platforms |
| How secrets reach repo settings | Ask — it is the user's choice |
When the user gives an answer that will hold across their repos (the tap, the target set, how secrets are provisioned), offer to save it as a user-level rule so later setups read it instead of asking again.
find . -maxdepth 1 \( -name 'Cargo.toml' -o -name 'dist-workspace.toml' -o -name 'release-please-config.json' \)find . -maxdepth 3 -path './.github/workflows/release*.yml'dist-workspace.toml by hand, then generatedist init is interactive. Write the file directly and let dist generate
produce release.yml:
[workspace]
members = ["cargo:."]
[dist]
cargo-dist-version = "0.32.0"
ci = "github"
installers = ["shell", "homebrew"]
tap = "<owner>/homebrew-tap"
targets = ["aarch64-apple-darwin", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu"]
install-path = "CARGO_HOME"
create-release = false # release-please owns the GitHub Release
publish-jobs = ["./publish-homebrew"]
dist generate # writes .github/workflows/release.yml
To run a pinned dist without installing it, use mise if it is available, otherwise dist's own installer:
mise exec github:axodotdev/cargo-dist@<version> -- dist generate
dist profiledist build fails with "profile dist is not defined" until the workspace
Cargo.toml has it:
[profile.dist]
inherits = "release"
lto = "thin"
| Situation | Setting on the crate |
|---|---|
Workspace has publish = false | [package.metadata.dist] dist = true on each binary crate that ships — dist skips unpublishable crates otherwise |
| Several binary crates, only some ship | [package.metadata.dist] dist = false on the rest — each shipped binary crate becomes its own release and its own formula |
| Install name differs from the package name | [package.metadata.dist] formula = "<binary>" |
The formula and the archives are named after the package, not the binary.
formula changes the install name only; archives keep the package name
(<package>-<target>.tar.xz).
Set homepage in package metadata. Without it, dist generate warns "The
Homebrew publish job is enabled but no homepage was specified". In a workspace,
put homepage in [workspace.package] and homepage.workspace = true in the
crate.
create-release = false makes dist upload to the release that already exists
for the tag, instead of creating its own. release-please creates that
release.GITHUB_TOKEN. A tag pushed with GITHUB_TOKEN does not trigger other
workflows, so release.yml never starts. The token setup is in
configure-plugin:configure-release-please.release.yml runs only plan (pr-run-mode = "plan", the
default), so a green PR check does not prove the build works. Verify locally
(Verify before tagging).Hand edits to release.yml are overwritten by the next dist generate, and
dist generate --check fails on them. Pin through config instead:
[dist.github-action-commits]
"actions/checkout" = "<sha-or-tag>"
"actions/upload-artifact" = "<sha-or-tag>"
"actions/download-artifact" = "<sha-or-tag>"
The table accepts tags ("v7.0.1") as well as commit SHAs, so follow the repo's
existing pinning convention.
Use a custom job when the built-in homebrew publish job does not fit — for
example when the tap token is a static repository secret the built-in job
cannot read under that name. List it as publish-jobs = ["./publish-homebrew"]
and write .github/workflows/publish-homebrew.yml as a reusable workflow
(on: workflow_call with a required string input plan).
dist generate calls it from release.yml like this (abbreviated):
custom-publish-homebrew:
needs: [plan, ...]
if: ${{ !fromJson(needs.plan.outputs.val).announcement_is_prerelease || fromJson(needs.plan.outputs.val).publish_prereleases }}
uses: ./.github/workflows/publish-homebrew.yml
with:
plan: ${{ needs.plan.outputs.val }}
secrets: inherit
The prerelease guard stays on the calling job, so the reusable workflow does
not repeat it. With homebrew in installers but not in publish-jobs,
dist generate warns "A Homebrew tap was specified but the Homebrew publish
job is disabled". That warning is expected: the formula is still built as a
release artifact, and the custom job publishes it.
| Check | Command |
|---|---|
| Config parses, release plan is what you expect | dist plan |
Committed release.yml matches config | dist generate --check |
| One target builds | dist build --artifacts=local --target <triple> |
| Generated Homebrew formula | dist build --artifacts=global (look under target/distrib/) |
After the local build, extract the archive from target/distrib/ and run the
binary with --version.
[dist.dependencies.homebrew] entries default to stage = "build": they are
installed on the build machine and do not become depends_on in the formula.
The config reference documents stage = ["build", "run"] for runtime
dependencies; confirm the generated formula with
dist build --artifacts=global before relying on it.plan (Working with release-please).| Context | Command |
|---|---|
| Plan as JSON | dist plan --output-format=json |
| CI drift check | dist generate --check |
| Single-target smoke build | dist build --artifacts=local --target <triple> |
| Pinned dist without install | mise exec github:axodotdev/cargo-dist@<version> -- dist plan |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
10 skills in this plugin
/cargo-generatecargo-generate: scaffold a project from a git template repo. Use when bootstrapping a Rust or Bevy project from a template, or authoring one./cargo-llvm-covcargo-llvm-cov: Rust code coverage with LLVM instrumentation. Use when measuring coverage, enforcing thresholds, generating reports, or integrating codecov/coveralls./cargo-machetecargo-machete: detect unused Rust dependencies. Use when auditing Cargo.toml, optimizing build times, or cleaning up dependency bloat./cargo-nextestcargo-nextest: fast Rust test runner with parallel execution and advanced filtering. Use when running tests, setting up CI, or diagnosing flaky/slow tests./cargo-worktree-buildsShare one CARGO_TARGET_DIR across parallel git-worktree agents so Rust deps compile once. Use when worktrees run cargo concurrently, rebuild deps N times, or fill disk with N target/ copies./clippy-advancedAdvanced Clippy configuration for Rust — custom rules, pedantic/nursery lints, clippy.toml, IDE and CI integration. Use when configuring or enforcing lint standards.npx claudepluginhub laurigates/claude-plugins --plugin rust-pluginOther plugins' skills for the same job