From scaffold-rust-cli
Scaffold a complete Rust CLI project with Cargo, cargo-deny, cargo-nextest, git-cliff, GitHub Actions CI/CD, and Makefile. Use when the user says "scaffold a Rust CLI", "new Rust CLI", "create a Rust binary crate", "start a Rust CLI", "bootstrap a Rust CLI", or starts a Rust command-line tool from scratch. Optionally adds clap for argument parsing and supports a macOS-only variant. For language-agnostic boilerplate alone, use scaffold-new-repo.
How this skill is triggered — by the user, by Claude, or both
Slash command
/scaffold-rust-cli:scaffold-rust-cliThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generate the full boilerplate for a new Rust CLI project.
references/cargo-toml.mdreferences/ci-workflow-macos-only.mdreferences/ci-workflow.mdreferences/cliff.mdreferences/deny.mdreferences/gitignore.mdreferences/license.mdreferences/main-rs-with-clap.mdreferences/main-rs.mdreferences/makefile.mdreferences/readme.mdreferences/release-workflow-macos-only.mdreferences/release-workflow.mdreferences/rust-toolchain.mdreferences/rustfmt.mdreferences/typos.mdGenerate the full boilerplate for a new Rust CLI project.
If the user provided a project name in their request, use it as the project name and skip asking for it. Still ask for the remaining parameters unless already provided in the user's initial request.
Ask the user for these parameters:
my-tool)Cargo.toml and READMEclap dependency with derive feature and generates a skeleton with argument structs)If the user already provided some or all of these in their initial request, do not re-ask. Derive what you can from context.
Detect the user's GitHub username and full name for use in templates:
# GitHub username (for repository URLs, Homebrew tap)
gh api user -q .login
# Full name (for LICENSE copyright, Cargo.toml authors)
git config user.name
If either command fails or produces no output, ask the user to provide the value. Use the GitHub username wherever templates reference GITHUB-USERNAME and the full name wherever they reference COPYRIGHT-HOLDER.
The project should be scaffolded in a directory named after the project. If the current directory is already named after the project and is empty (or nearly empty), use it. Otherwise, create a subdirectory.
If the directory already contains Rust files (Cargo.toml, src/), warn the user before proceeding.
Skip if already inside a git repository.
git init
Read ./references/cargo-toml.md for the Cargo.toml template and create Cargo.toml from it.
PROJECT-NAME with the project namePROJECT-DESCRIPTION with the short descriptionGITHUB-USERNAME with the detected GitHub usernameCOPYRIGHT-HOLDER with the detected full nameIf clap was selected, add clap = { version = "4", features = ["derive"] } to the [dependencies] section.
Choose the template based on the clap parameter:
./references/main-rs.md./references/main-rs-with-clap.mdReplace in the with-clap template:
PROJECT-NAME with the project namePROJECT-DESCRIPTION with the short descriptionRead ./references/rust-toolchain.md for the template and create rust-toolchain.toml from it.
No replacements needed.
Read ./references/rustfmt.md for the template and create rustfmt.toml from it.
No replacements needed.
Read ./references/deny.md for the template and create deny.toml from it.
No replacements needed.
Read ./references/typos.md for the template and create typos.toml from it.
PROJECT-NAME with the project nameRead ./references/cliff.md for the template and create cliff.toml from it.
No replacements needed.
Read ./references/makefile.md for the template and create Makefile from it.
No replacements needed.
Read ./references/gitignore.md for the template and create .gitignore from it.
No replacements needed.
If a .gitignore already exists, merge the template entries into it rather than overwriting.
Choose the appropriate CI template:
./references/ci-workflow.md./references/ci-workflow-macos-only.mdCreate .github/workflows/ci.yml from the chosen template. No replacements needed (the workflow is project-name-independent).
Choose the appropriate release template:
./references/release-workflow.md./references/release-workflow-macos-only.mdCreate .github/workflows/release.yml from the chosen template.
PROJECT-NAME with the project nameRead ./references/license.md for the LICENSE template and create LICENSE from it.
YEAR with the current year (run date +%Y to get it)COPYRIGHT-HOLDER with the detected full nameRead ./references/readme.md for the README template and create README.md from it.
PROJECT-NAME with the project name (kebab-case)PROJECT-DESCRIPTION with the short descriptionGITHUB-USERNAME with the detected GitHub usernameCreate CHANGELOG.md with the initial changelog template:
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
No replacements needed. The release skill will populate version sections and comparison links on the first release.
Create stub directories for the standard project layout:
# plans directory
mkdir -p docs/plans/todo docs/plans/done
touch docs/plans/todo/.gitkeep docs/plans/done/.gitkeep
# tests directory
mkdir -p tests
touch tests/.gitkeep
Run a quick build to confirm everything compiles:
cargo build
If the build fails, diagnose and fix the issue before continuing.
Stage all generated files and create the initial commit:
git add -A
git commit -S -m "feat: scaffold Rust CLI project"
If .github/copilot-instructions.md exists (created by the scaffold-new-repo skill when running in the bootstrap flow, or already present in an existing repo), append the following entries to the PR review section. Before appending each entry, check whether the bold key text already exists in the file; skip entries that are already present.
To locate the PR review section: look for an existing heading whose text includes "PR Review" or "Code Review" (e.g., ## PR Review, ## Code Review, ## PR Review Checklist (CRITICAL)). If no matching heading exists, append a new ## PR Review section at the end of the file and place the entries there.
Cargo.toml and rustfmt.toml. Do not suggest downgrading to edition 2021.cargo deny check and typos jobs. Do not suggest removing these checks or marking them as optional.If .github/copilot-instructions.md does not exist, skip this step.
Print a summary of what was created:
make help to see available Makefile targetsgit tag v0.1.0 && git push origin v0.1.0 to trigger the release workflowmake changelog (requires git-cliff) to generate the changelog from conventional commitscargo build fails, check that Rust is installed and on the PATH. Verify the edition is supported by the installed toolchain.cargo build fails for clap, check that the dependency specification is correct in Cargo.tomlCargo.toml, src/), ask the user before overwritinggit init fails, continue generating files but warn the user./references/cargo-toml.md -- Cargo.toml template./references/main-rs.md -- src/main.rs without clap./references/main-rs-with-clap.md -- src/main.rs with clap./references/rust-toolchain.md -- rust-toolchain.toml./references/rustfmt.md -- rustfmt.toml./references/deny.md -- deny.toml./references/typos.md -- typos.toml./references/cliff.md -- cliff.toml./references/makefile.md -- Makefile template./references/gitignore.md -- .gitignore template./references/ci-workflow.md -- cross-platform CI workflow./references/ci-workflow-macos-only.md -- macOS-only CI workflow./references/release-workflow.md -- cross-platform release workflow./references/release-workflow-macos-only.md -- macOS-only release workflow./references/license.md -- MIT license template./references/readme.md -- README templatecboone/gh-actions SHAs before scaffoldingThe cboone/gh-actions reusable-workflow refs in this skill's templates are SHA-pinned with a # vX.Y.Z comment that was current when the template was authored. New releases of cboone/gh-actions rot those SHAs. Before emitting a workflow into a user's repo, refresh both the SHA and the comment to current latest:
TAG="$(gh release view --repo cboone/gh-actions --json tagName --jq '.tagName')"
SHA="$(gh api "repos/cboone/gh-actions/commits/${TAG}" --jq '.sha')"
echo "${SHA} # ${TAG}"
Replace each cboone/gh-actions/.../<workflow>.yml@<old-sha> # <old-tag> in the emitted workflow with the new SHA and tag. Dependabot in the user's repo keeps them in sync afterwards.
Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
npx claudepluginhub cboone/agent-harness-plugins