MCPInstall

rust-semver

Manage Rust crate semantic versioning — what counts as a public API (visible items + reachable through re-exports), pre-1.0 rules (0.x.y compatibility), breaking change detection via cargo-semver-checks (270+ lints), workspace lockstep publishing with cargo-workspaces, yank/deprecate workflows, RustSec advisories, and the semver implications of [nonexhaustive], sealed traits, hidden modules, feature flags, and trait impl additions. Use when users ask whether a change is breaking, want to publish a new version safely, run cargo-semver-checks, coordinate multi-crate workspace releases, or handle a yanked/advisory situation; hand Cargo manifest mechanics to rust-cargo-build, API design choices to rust-api-design, and CI config to rust-style-clippy.

Installs
106
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/full-stack-skills/rust-skills --skill rust-semver
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads rust-semver automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Rust Semver and Release Workflow

Authority: Cargo Semver Reference, RFC 1105 (Semver), cargo-semver-checks, RustSec Advisory Database.

This skill owns what is and isn't a breaking change in Rust, the publishing workflow for crates.io, and workspace-wide release coordination. It does not own API design (rust-api-design), Cargo manifest mechanics (rust-cargo-build), or lint config (rust-style-clippy).

Capability Boundaries

✅ Strengths

  1. Determining whether a specific code change is a major, minor, or patch bump
  2. Understanding pre-1.0 (0.x.y) special rules
  3. Running and interpreting cargo-semver-checks (270+ lints)
  4. Coordinating multi-crate workspace releases via cargo-workspaces
  5. Handling yank, deprecate, and RustSec advisory workflows
  6. Knowing the semver implications of #[non_exhaustive], sealed traits, feature flags, hidden modules
  7. Writing release notes that match the change type

⚠️ Prerequisites

  1. A Rust crate with a clear public API surface — see rust-api-design
  2. Cargo manifest and cargo publish basics — see rust-cargo-build

❌ Out of Scope

  1. Designing the API itself → rust-api-design
  2. Cargo manifest format and build configuration → rust-cargo-build
  3. Clippy lint rules → rust-style-clippy
  4. Test design for verifying behavior → rust-testing

Data Privacy

This skill does not collect, store, or transmit user data. Publishing to crates.io is a public action — confirm with the user before running cargo publish.


Part 1: What Is the Public API?

Semver applies to public API surface. In Rust, the public API is everything visible to downstream — but the definition is subtle.

Visible items

// src/lib.rs
pub fn hello() {}                    // public API
pub struct User { pub name: String } // public API
pub mod network {                    // public API
    pub fn connect() {}              // public API
}

mod internal {                       // private — NOT public API
    pub fn helper() {}               // pub, but module is private → not reachable
}

Rule: an item is public API if and only if a downstream crate can name it without unsafe. A pub item inside a pub(crate) module is not public API.

Reachability through re-exports

// src/lib.rs
mod hidden;
pub use hidden::Config;   // Config IS public API (reachable via crate root)

Even though hidden is private, Config is reachable via the re-export — it's public API.

Hidden modules

#[doc(hidden)]
pub mod unstable { /* */ }

#[doc(hidden)] does NOT remove items from the public API for semver purposes. Downstream can still use crate::unstable::Foo. If you intend them to be unstable, gate behind a feature flag or move to a private module.

Feature-gated items

#[cfg(feature = "json")]
pub mod json;   // public API only when feature enabled

The semver contract is per feature combination. Adding items under json is a minor bump for users with json enabled, and invisible to users without.


Part 2: Breaking vs Non-Breaking Changes

The Cargo Book lists the canonical changes. Summary:

Always breaking (major bump, except pre-1.0)

ChangeWhy
Remove a public itemDownstream code referencing it breaks
Rename a public itemSame as remove + add
Change a function signature (param/return type)Callers fail to compile
Add a new variant to a non-#[non_exhaustive] enummatch lacks wildcard
Add a field to a public struct literalFoo { x: 1 } breaks if Foo gains a field
Implement a trait for an external type (or vice versa)Conflicts with downstream orphan impls
Tighten trait boundsDownstream impls may no longer satisfy
Change pub item to pub(crate)Removes from API
Remove Copy/Clone/Debug deriveDownstream may rely on them
Change semver of a public dependencyMay transitively break

Non-breaking (minor or patch bump)

ChangeWhy
Add a new public functionAdditive
Add a new trait impl for your own typeAdditive
Add a variant to a #[non_exhaustive] enumCaller has wildcard
Add a field to a private-field structCaller can't struct-literal it
Add a new feature flagInvisible to non-users
Loosen trait boundsMore permissive
Add default method to a sealed traitSealed = you control impls
Deprecate with #[deprecated]Soft removal

Subtle cases

Adding a method to a public trait

// Before
pub trait Foo { fn a(&self); }
// After
pub trait Foo { fn a(&self); fn b(&self); }   // ❌ BREAKING

Downstream impls of Foo will fail to compile (missing b). Fix: either (a) bump major, (b) seal the trait before adding methods, or (c) add b as a default method (fn b(&self) {}).

Adding a default method to an unsealed trait

pub trait Foo { fn a(&self); fn b(&self) {} }  // ✅ non-breaking

Default methods are non-breaking. But you cannot later remove the default without breaking.

Generic param with default

// Before
pub fn parse<T>(input: &str) -> T { /* */ }
// After
pub fn parse<T = String>(input: &str) -> T { /* */ }   // ✅ non-breaking

Adding a default to a generic is non-breaking. Removing the default IS breaking.

Trait object safety

If Foo is currently object-safe (Box<dyn Foo> works), making it object-unsafe (adding Self: Sized bound, adding generic method) is breaking.

Lifetime additions

// Before
pub fn parse(input: &str) -> &str { /* */ }
// After
pub fn parse<'a>(input: &'a str) -> &'a str { /* */ }   // ✅ usually non-breaking

Lifetime elision makes most lifetime changes transparent.


Part 3: Pre-1.0 (0.x.y) Rules

Crates at version 0.x follow modified semver:

VersionCompatible withWhat increments on breaking
0.0.xNothing — experimental, any change OK0.0.x
0.x.y where x > 0Same 0.x.* onlyThe minor (x) position = "major"

So 0.1.0 → 0.2.0 is a major bump. 0.1.0 → 0.1.1 is a patch (bug fix).

# Allowed in Cargo.toml:
[dependencies]
my-crate = "0.1"     # means >=0.1.0, <0.2.0

Once you hit 1.0.0, normal semver resumes.

When to go 1.0

  • API is stable (no planned breaking changes for ~6 months)
  • Used by other crates (signal of usefulness)
  • All fundamental design decisions are settled

Don't fear 1.0. Many crates live too long at 0.x because they're afraid of the commitment. The cost of 1.0 is "I commit to breaking changes requiring major bumps," which is usually fine.


Part 4: cargo-semver-checks

cargo-semver-checks is a tool that compares your crate's current public API against a published version and flags breaking changes. 270+ lints cover most cases.

Install and run

cargo install cargo-semver-checks --locked

# Before publishing a new version:
cargo semver-checks check-release

# Compare against a specific baseline:
cargo semver-checks check-release --baseline-version 1.2.0

# Compare against a git tag:
cargo semver-checks check-release --baseline-tag v1.2.0

Output interpretation

--- failure function_missing ---
Description: Function removed or renamed, or return type changed.
Error: the function `parse` was removed from the API

Each failure is a semver violation. Fix by either:

  1. Restore the item (don't actually remove it)
  2. Bump the major version (acknowledge the breaking change)
  3. Use a compatibility shim (re-add under the old name, delegating to new)

CI integration

# .github/workflows/semver.yml
name: Semver Check
on: [pull_request]
jobs:
  semver:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: obi1kenobi/cargo-semver-checks-action@v2

PRs that introduce breaking changes will fail CI unless the version is bumped accordingly.

Common lint hits

LintMeaningFix
function_missingRemoved or renamed functionRestore or bump major
enum_variant_addedAdded variant to non-#[non_exhaustive] enumMark #[non_exhaustive]
struct_field_addedAdded field to public structMake private or #[non_exhaustive]
trait_method_addedAdded method to unsealed traitAdd default or seal
inherent_method_missingRemoved impl block methodRestore or bump major
type_marked_deprecated#[deprecated] addedAcceptable, bump minor

Part 5: Publishing Workflow

Single-crate publish

# 1. Bump version in Cargo.toml
# 2. Update CHANGELOG.md
# 3. Run quality gates
cargo fmt --all --check
cargo test --workspace --all-targets --all-features
cargo clippy --workspace --all-targets --all-features -- -D warnings
cargo semver-checks check-release

# 4. Verify package contents
cargo package --list    # show files included
cargo package           # build the .crate in target/package/
cargo publish --dry-run # full simulation

# 5. Publish
cargo publish           # 🚨 public action — confirm with user first

Workspace lockstep publish via cargo-workspaces

For multi-crate workspaces, cargo-workspaces automates the version bump + publish dance:

cargo install cargo-workspaces

# Bump all members together:
cargo workspaces version minor      # 0.1.0 → 0.2.0 across all members

# Bump with custom prerelease:
cargo workspaces version prerelease --pre-id beta

# Publish all members in topological order:
cargo workspaces publish

cargo-workspaces:

  1. Edits each member's Cargo.toml version
  2. Updates internal path = "" dependencies to the new version
  3. Commits + tags if you pass --no-individual-tags or --individual-tags
  4. Publishes in dependency order (deps before dependents)

Yank a published version

If a version has a critical bug, yank it (prevents new dependencies on it, doesn't remove existing):

cargo yank --vers 1.2.3
# To undo:
cargo yank --vers 1.2.3 --undo

Yanked versions remain in the registry for projects with Cargo.lock pinning them.

Deprecate a crate

Mark the crate as deprecated on crates.io via the maintainer's page. Downstream will see a deprecation notice when they run cargo add.


Part 6: RustSec Advisories

RustSec Advisory Database tracks known vulnerabilities in published crates.

cargo-audit

cargo install cargo-audit --locked
cargo audit               # scan Cargo.lock against advisory DB
cargo audit --deny warnings   # fail CI on any advisory

cargo-deny (more comprehensive)

cargo-deny covers:

  • advisories — RustSec
  • licenses — deny unauthorized licenses
  • bans — deny specific crates
  • sources — deny specific git/registry sources
# deny.toml
[advisories]
db-urls = ["https://github.com/rustsec/advisory-db"]
yanked = "deny"

[licenses]
allow = ["MIT", "Apache-2.0", "BSD-3-Clause"]
confidence-threshold = 0.8
cargo install cargo-deny --locked
cargo deny check

Responding to an advisory in your crate

  1. Acknowledge in the issue tracker
  2. Patch and publish a new version
  3. File an advisory with RustSec (if applicable): https://github.com/rustsec/advisory-db/
  4. Yank the vulnerable version (after the fix is published)
  5. Communicate to users via CHANGELOG + release notes

Part 7: Release Notes

For every publish, write a CHANGELOG.md entry. Suggested format:

## [1.2.0] - 2026-07-21

### Added
- `Client::builder()` for ergonomic construction (#45)
- `Visibility::IncludeHidden` variant

### Changed
- `parse()` now accepts `impl AsRef<str>` instead of `&str`

### Deprecated
- `Client::new()` — use `Client::builder()` instead

### Fixed
- Panic on empty input in `parse()` — now returns `Err`

Tools:


Workflow

  1. Inventory the diff — what changed in pub items since the last release?
  2. Classify each change — breaking, additive, or fix (see Part 2)
  3. Decide version bump — major/minor/patch; remember pre-1.0 rules
  4. Run cargo-semver-checks — confirm your classification matches the tool
  5. Update CHANGELOG — what changed, why, with migration notes
  6. Run quality gates — fmt, test, clippy, doc
  7. Publish — single (cargo publish) or workspace (cargo workspaces publish)
  8. Handle post-publish — yank if broken, file advisory if security

Decision Shortcuts

ChangeBumpNotes
Added a pub fnminorAdditive
Fixed a bugpatchBehavior change, no API change
Removed a pub fnmajorOr restore + deprecate
Added a sealed trait methodminorSealed = you control impls
Added an unsealed trait methodmajorOr add default
Added enum variantmajor (or minor if #[non_exhaustive])
Added pub struct fieldmajor (or minor if #[non_exhaustive] or private)
Bumped MSRVminor (if min = 1.0+)Document policy
Bumped dependency semver-majormajorTransitive break

Resources

  • Semver Reference (full) — full change catalog
  • cargo-semver-checks Lint Catalog
  • Workspace Publishing Cookbook — cargo-workspaces recipes
  • examples/golden-semver/ — a crate demonstrating a non-breaking version bump

Upstream Sources

FAQ

What does the rust-semver skill do?

Manage Rust crate semantic versioning — what counts as a public API (visible items + reachable through re-exports), pre-1.0 rules (0.x.y compatibility), breaking change detection via cargo-semver-checks (270+ lints), workspace lockstep publishing with cargo-workspaces, yank/deprecate workflows, RustSec advisories, and the semver implications of [nonexhaustive], sealed traits, hidden modules, feature flags, and trait impl additions. Use when users ask whether a change is breaking, want to publish a new version safely, run cargo-semver-checks, coordinate multi-crate workspace releases, or handle a yanked/advisory situation; hand Cargo manifest mechanics to rust-cargo-build, API design choices to rust-api-design, and CI config to rust-style-clippy.

How do I install rust-semver?

Run npx skills add https://github.com/full-stack-skills/rust-skills --skill rust-semver in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/rust-semver/ (personal) or .claude/skills/rust-semver/ (project).

Which AI agents can use rust-semver?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is rust-semver safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains rust-semver?

It is published by full-stack-skills in full-stack-skills/rust-skills. It has 106 recorded installs.

More from full-stack-skills/rust-skills

View all →

rust-testing

full-stack-skills/rust-skills

Design, implement, and validate Rust tests, including unit, integration, doctest, compile-fail, property, fuzz, benchmark, coverage, async, concurrency, process, daemon, IPC, terminal, platform, and hardware-facing test strategies. Use when users ask for Rust test architecture, flaky-test diagnosis, coverage gates, benchmarks, trybuild, cargo-nextest, real-process tests, or failure-path verification.

Testing & QA148 installs

rust-concurrency

full-stack-skills/rust-skills

Open the skill to read its SKILL.md instructions.

Backend & APIs137 installs

rust-style-clippy

full-stack-skills/rust-skills

Open the skill to read its SKILL.md instructions.

Backend & APIs137 installs

rust-performance

full-stack-skills/rust-skills

Measure, profile, optimize, and regression-test Rust performance across latency, throughput, CPU, allocations, memory, binary size, and compile time using representative workloads, Criterion, iai-callgrind, cargo-flamegraph, samply, DHAT, heap or pprof tools, cargo-bloat, cargo-llvm-lines, and build timings. Use when users report slow Rust code, high memory or CPU, large binaries, noisy benchmarks, tail-latency regressions, or need performance budgets and evidence-backed optimization.

Backend & APIs135 installs

rust-code-review

full-stack-skills/rust-skills

Review Rust changes for correctness, memory and thread safety, error semantics, unnecessary allocation or cloning, lock scope, API compatibility, test gaps, documentation, and dependency risk, applying the Rust API Guidelines checklist (C-PANIC, C-UNWRAP, C-TRANSMUTE, C-BOOL, C-NEWTYPE, C-COMMON-TRAITS, C-CONVERT, C-SEALED, C-NON-EXHAUSTIVE). Use when reviewing Rust diffs, pull requests, libraries, unsafe boundaries, or production incidents; report actionable findings by severity before summaries, route automated formatting or lint policy to rust-style-clippy, and route API shape decisions (trait sealing, error taxonomy, newtype design, builder patterns) to rust-api-design.

rust-cargo-build

full-stack-skills/rust-skills

Open the skill to read its SKILL.md instructions.

Backend & APIs123 installs

Popular backend & apis skills

View category →

find-skills

vercel-labs/skills

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

OfficialBackend & APIs4.1M installs

entra-app-registration

microsoft/azure-skills

Guides Microsoft Entra ID app registration, OAuth 2.0 authentication, and MSAL integration. USE FOR: create app registration, register Azure AD app, configure OAuth, set up authentication, add API permissions, generate service principal, MSAL example, console app auth, Entra ID setup, Azure AD authentication. DO NOT USE FOR: Key Vault secrets (use azure-keyvault-expiration-audit), general Azure resource security guidance.

OfficialBackend & APIs566.7K installs

This skill should be used when the user wants to "write agent code", "build an agent with ADK", "add a tool", "create a callback", "define an agent", "use state management" — in a project that needs ADK (Agent Development Kit) API patterns and code examples. It provides a quick reference for agent types, tool definitions, orchestration patterns, callbacks, state management, the graph Workflow API, and reference recipes to study. Do NOT use for scaffolding (use google-agents-cli-scaffold) or deployment (use google-agents-cli-deploy).

Backend & APIs514.8K installs

embedded-captions

heygen-com/hyperframes

Add captions or subtitles to an existing single-subject talking-head video without editing the footage. Use for plain verbatim captions, cinematic captions embedded behind the subject, VFX captions, “炸/特效/酷炫字幕,” or a named identity from the 35-style catalog. Route by visual identity, not by backend engine. The quiet anchor rail is the default; embed every word only when the user explicitly wants a fully cinematic treatment. The workflow runs locally end to end, including transcription and subject matting; split multi-shot footage before applying it.

Backend & APIs453.3K installs

entra-agent-id

microsoft/azure-skills

Provision Microsoft Entra Agent Identity Blueprints, BlueprintPrincipals, and per-instance Agent Identities via Microsoft Graph, and configure OAuth 2.0 token exchange (fmipath, OBO, cross-tenant) including the Microsoft Entra SDK for AgentID sidecar. USE FOR: Agent Identity Blueprint, BlueprintPrincipal, agent OAuth, fmipath token exchange, agent OBO, Workload Identity Federation for agents, polyglot agent auth, Microsoft.Identity.Web.AgentIdentities. DO NOT USE FOR: standard Entra app registration (use entra-app-registration), Microsoft Foundry agent authoring (use microsoft-foundry).

OfficialBackend & APIs336.6K installs

neon

neondatabase/agent-skills

Overview of Neon, a complete set of cloud backend primitives around Lakebase Postgres: Auth, Object Storage, Functions, the AI Gateway, and Realtime. Start here to choose Neon for undecided login, files, APIs, and LLM calls, set up the CLI or MCP server, and follow the branch-first workflow. Use when building an app or backend on Neon, or when "Neon" or "Lakebase Postgres" is mentioned. Child skill neon-postgres wins for an existing DATABASEURL, SQL, schema, inspect, or search. Child skill neon-auth wins for login, users, sessions, identity routing, and Managed Better Auth setup. Child skill neon-realtime wins for live queries in reactive apps and agents. Also use for object storage, S3, buckets, serverless functions, function triggers, cron, AI gateway, LLM calls, realtime, logs, Loki, Grafana, observability, postgres, database, backend, Claimable Neon, neon.new, or a no-signup database.

Backend & APIs237.1K installs