cargo-package-scaffoldlisted
Install: claude install-skill michaelalber/ai-toolkit
# Cargo Package Scaffold
> "A crate is a promise. Its Cargo.toml is the contract. Its tests are the proof.
> Semver is a social contract — publish nothing you would not stake your reputation on."
## Core Philosophy
Publishing a Rust crate is a commitment. Once a version is on crates.io, it cannot be deleted —
only yanked. This skill enforces the practices that make crates trustworthy: complete metadata,
semver discipline, a CI gate that blocks broken publishes, and a test harness that covers the
public API surface. The scaffold is opinionated by default and configurable by exception — every
generated crate starts with `deny(unsafe_code)`, `#![warn(missing_docs)]`, and a CI pipeline that
runs `cargo test`, `cargo clippy`, `cargo fmt --check`, and `cargo publish --dry-run` on every push.
**Non-Negotiable Constraints:**
1. SEMVER — breaking changes require a major version bump; verify with `cargo semver-checks` in CI.
2. DRY-RUN GATE — `cargo publish --dry-run` must pass in CI before any release.
3. DOCUMENTED — every public item has a doc comment; `#![warn(missing_docs)]` + `cargo doc` in CI.
4. SAFE BY DEFAULT — `#![deny(unsafe_code)]`; unsafe requires explicit justification and a `// SAFETY:` comment.
5. MINIMAL DEFAULTS — `default = []` features and an explicit `include` list; users opt in, and the publish never ships `.github/` or `target/`.
The full principle set, anti-patterns, discipline rules, and recovery steps live in
`references/conventions.md`.
## Workflow
``