Awesome-omni-skill scode-dist-rust-setup
Set up or standardize a Rust repository with cargo-dist release automation, Linux-focused CI with macOS release-plan tag gates, git-cliff changelog generation, Conventional Commit PR title enforcement, and Homebrew publishing to scode/homebrew-dist-tap. Use when creating a new Rust release pipeline or migrating an existing repo to this exact distribution model.
git clone https://github.com/diegosouzapw/awesome-omni-skill
T=$(mktemp -d) && git clone --depth=1 https://github.com/diegosouzapw/awesome-omni-skill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/cli-automation/scode-dist-rust-setup" ~/.claude/skills/diegosouzapw-awesome-omni-skill-scode-dist-rust-setup && rm -rf "$T"
skills/cli-automation/scode-dist-rust-setup/SKILL.mdScode Dist Rust Setup
Set up a Rust repository to match the release/distribution pattern used in juggler: dist-generated release workflow, Homebrew publishing through
scode/homebrew-dist-tap, Linux-focused CI, macOS release-plan gating on tags, and
git-cliff changelog governance.
Required Inputs
Collect these values before making changes:
: Required. Read fromcrate_name
(Cargo.toml
).[package].name
: Derive fromgithub_owner/repo
. Prompt only if parsing is ambiguous.git remote get-url origin
: Install/update dist first, then pin the discovered version incargo_dist_version
.dist-workspace.toml
Hard Defaults
Apply these defaults unless the user explicitly asks to diverge:
- Homebrew tap repository:
scode/homebrew-dist-tap - Homebrew token secret:
HOMEBREW_TAP_TOKEN - Homebrew install command namespace:
scode/dist-tap/<crate_name> - Dist installers:
onlyhomebrew - Dist targets:
,aarch64-apple-darwin
,x86_64-apple-darwin
,aarch64-unknown-linux-gnux86_64-unknown-linux-gnu - Dist plan hook:
plan-jobs = ["./release-plan-tests"] - CI platform focus: Linux for standard CI, macOS only as tag-gated release-plan test
Workflow
Phase A: Discover Project Facts
- Confirm the repository root contains
.Cargo.toml - Extract
fromcrate_name
.Cargo.toml - Derive
fromgithub_owner/repo
.git remote get-url origin - Detect existing files that may need updates instead of replacement:
dist-workspace.toml.github/workflows/ci.yml.github/workflows/release.yml.github/workflows/release-plan-tests.yml.github/workflows/conventional-commit-pr-title.ymlcliff.tomlCONTRIBUTING.mdREADME.md
Phase B: Install or Update cargo-dist and Capture Version
- Install or update dist using your preferred method.
- Capture the version from
.dist --version - Pin that exact version string as
incargo-dist-version
.dist-workspace.toml - Do not leave
unpinned.cargo-dist-version
Phase C: Configure dist-workspace.toml
- Create or update
usingdist-workspace.toml
.references/dist-workspace-template.md - Keep these values exact unless the user explicitly asks otherwise:
ci = "github"installers = ["homebrew"]install-path = "CARGO_HOME"install-updater = truetap = "scode/homebrew-dist-tap"publish-jobs = ["homebrew"]plan-jobs = ["./release-plan-tests"]
- Use the discovered dist version from Phase B for
.cargo-dist-version
Phase D: Ensure Cargo.toml is ready for dist
- Ensure
hasCargo.toml
— dist requires this for GitHub CI.repository = "https://github.com/<owner>/<repo>" - Ensure
hasCargo.toml
anddescription
— Homebrew publishing warns without them.homepage
will be added automatically by[profile.dist]
in Phase E.dist init --yes
Phase E: Generate Dist Release Workflow with dist init
dist initdist init --yes is the primary tool for this phase. It:
- Adds
to[profile.dist]
if missing.Cargo.toml - Reformats
with comments (preserving values).dist-workspace.toml - Generates
— this file is dist-managed and must never be hand-edited..github/workflows/release.yml
Steps:
- Write
first (Phase C).dist-workspace.toml - Ensure
hasCargo.toml
,repository
,description
(Phase D).homepage - Run
to generate everything. Thedist init --yes
flag auto-accepts defaults (required for non-interactive).--yes - If
is changed later, re-rundist-workspace.toml
.dist init --yes
Phase F: Install Linux/macOS CI Pattern
- Create or update
using.github/workflows/ci.yml
.references/ci-linux-macos-pattern.md - Keep standard CI Linux-focused.
- Keep a macOS job disabled in standard CI for cost control.
- Omit Windows baseline jobs unless explicitly requested.
Phase G: Add Release Plan Test Workflow
This file is NOT generated by
dist init. It is a manually-maintained reusable workflow that the dist-generated
release.yml calls via plan-jobs = ["./release-plan-tests"]. Create it AFTER running dist init (Phase E) so you can
verify release.yml references it correctly.
- Create or update
using.github/workflows/release-plan-tests.yml
.references/release-plan-tests-template.md - Run Linux tests on workflow call.
- Run macOS tests only when
is a tag ref.github.ref - Ensure
includesdist-workspace.toml
.plan-jobs = ["./release-plan-tests"] - Verify the generated
contains arelease.yml
job that calls this workflow.custom-release-plan-tests
Phase H: Enforce Conventional Commit PR Titles
-
Create or update
using.github/workflows/conventional-commit-pr-title.yml
.references/conventional-commit-pr-title-workflow.md -
Enforce these allowed types:
,feat
,fix
,docs
,doc
,perf
,refactor
,style
,test
,chore
,cirevert
-
Keep scope optional.
-
Enforce classification policy in repository docs:
- Type must reflect user-visible behavior, not implementation activity.
- CLI interface/behavior changes (commands, flags/options, arguments, output contract, exit codes, documented usage)
must be
,feat
, orfix
(useperf
when breaking), not!
.refactor
,refactor
,style
,test
,chore
,ci
, anddocs
are for non-user-visible changes only.doc
-
Update
to require Conventional Commit style PR titles. Add a section like:CLAUDE.md# PR titles PR titles must follow [Conventional Commits](https://www.conventionalcommits.org/) style. This is enforced by CI and used by git-cliff for changelog generation. Allowed types: `feat`, `fix`, `docs`, `doc`, `perf`, `refactor`, `style`, `test`, `chore`, `ci`, `revert`. Scope is optional. Examples: `feat: add user login`, `fix(parser): handle empty input`. Type must reflect user-visible behavior, not implementation activity. CLI interface/behavior changes must be `feat`, `fix`, or `perf` (use `!` when breaking), not `refactor`.If
already has a section about commit messages or PR titles, extend it rather than duplicating.CLAUDE.md
Phase I: Set Up git-cliff and Release Documentation
-
If
is missing, initialize it with:cliff.tomlgit cliff --init keepachangelog
-
If
already exists, avoid replacing it with a hardcoded template unless the user explicitly requests that migration.cliff.toml -
Keep the config compatible with Conventional Commit-driven changelogs and default it to user-visible entries only.
- Include by default:
,feat
,fix
,perf
.revert - Skip by default:
,refactor
,style
,test
,chore
,ci
,docs
.doc - Parse override tags first:
forces inclusion,changelog: include
forces exclusion.changelog: skip - If both tags are present,
wins.changelog: skip
- Include by default:
-
Update
with:CONTRIBUTING.md- Conventional Commit requirements for commit messages and PR titles.
- Classification policy: type reflects user-visible behavior; CLI interface changes are never
.refactor - Note that PR title enforcement is implemented in
..github/workflows/conventional-commit-pr-title.yml - Changelog generation uses git-cliff and root
.CHANGELOG.md - Override tag behavior for
/changelog: include
.changelog: skip - An agent-centric Releasing section using the content from
. This section is written as instructions for an AI agent so that a user can say "cut a release" and the agent guides them through the entire version bump, changelog, PR, merge, tag, and release watch flow.references/release-checklist.md
-
Update
with a Releasing section that tells agents to follow CONTRIBUTING.md:CLAUDE.md# Releasing When the user asks to "make a release" or "cut a release", follow the Releasing section of `CONTRIBUTING.md`.If
already has a releasing section, update it rather than duplicating.CLAUDE.md
Phase J: Wire Homebrew Distribution
- Ensure dist config uses
.tap = "scode/homebrew-dist-tap" - Ensure the repository has secret
for release publishing.HOMEBREW_TAP_TOKEN - Verify generated release workflow includes
and checks outpublish-homebrew-formula
.scode/homebrew-dist-tap - Document installation in
as:README.mdbrew install scode/dist-tap/<crate_name>
Verification Checklist
Run these checks after setup:
rg -n 'cargo-dist-version|tap = "scode/homebrew-dist-tap"|plan-jobs' dist-workspace.tomlrg -n '^\[profile\.dist\]' Cargo.tomlrg -n 'custom-release-plan-tests|publish-homebrew-formula|HOMEBREW_TAP_TOKEN' .github/workflows/release.ymlrg -n 'test-linux|test-macos' .github/workflows/release-plan-tests.ymlrg -n 'action-semantic-pull-request|types:' .github/workflows/conventional-commit-pr-title.ymlrg -n 'Conventional Commits|PR titles|Releasing|CONTRIBUTING.md' CLAUDE.mdrg -n 'conventional_commits = true' cliff.tomlrg -n 'git-cliff --tag|CHANGELOG\.md|Conventional Commits|cut a release|bump' CONTRIBUTING.mdrg -n 'brew install scode/dist-tap/' README.md
Resources
Use these files to avoid rewriting long templates:
references/dist-workspace-template.mdreferences/ci-linux-macos-pattern.mdreferences/release-plan-tests-template.mdreferences/conventional-commit-pr-title-workflow.mdreferences/git-cliff-and-changelog-flow.mdreferences/release-checklist.md