new-crate

Scaffold a new Rust crate and register it in the workspace Cargo.toml.

Updated Dec 4, 2025
One-click install
npx skills add https://github.com/jamieadams-nerd/umrs-project --skill new-crate
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: new-crate
Source: https://github.com/jamieadams-nerd/umrs-project/tree/main/.claude/skills/new-crate
Command: npx skills add https://github.com/jamieadams-nerd/umrs-project --skill new-crate

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates the manual, error-prone process of adding a new crate to the Rust workspace, ensuring consistency with project conventions and proper workspace integration.

Core Features & Use Cases

  • Crate scaffolding: Create a new crate (library or binary) inside components/rusty-gadgets/ using cargo, with standard folder structure.
  • Workspace integration: Update the workspace's Cargo.toml to include the new member, keeping the list alphabetically sorted.
  • Standardization & linting: Initialize the crate root with copyright header, forbidden unsafe code, Clippy rules, and a module documentation scaffold.
  • Verification & summary: Run initial build checks and provide a summary of actions and follow-up items.

Quick Start

Create a new crate inside components/rusty-gadgets as either a library or binary, register it in Cargo.toml, set up dependencies and the crate root to match project conventions.

Frequently Asked Questions about new-crate

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scaffold a new Rust crate inside a workspace and register it in Cargo.toml?

Scaffolding a new Rust crate involves creating the library or binary project via cargo, adding it to the workspace Cargo.toml member list, and configuring the standard folder structure for proper workspace integration.

What is the best way to enforce Clippy rules and forbid unsafe code in a new Rust crate?

Enforcing Clippy rules and forbidding unsafe code in a new Rust crate requires initializing the crate root with linting configurations, copyright headers, and module documentation scaffolds during the initial project creation.

Does scaffolding a Rust crate with this method support both library and binary crate types?

Yes, this Rust crate scaffolding method supports both library and binary crate types, creating the project inside the components directory using cargo and applying a standard folder structure tailored to the chosen crate type.

What standard directory structure is set up when creating a new Rust crate in a workspace?

Creating a new Rust crate in a workspace sets up a standard directory structure including tests and examples directories, a crate root with MIT header, and Clippy configuration files to maintain project conventions.

How do I verify a new Rust crate is correctly integrated into a workspace after scaffolding?

Verifying a new Rust crate's workspace integration involves running initial build checks, which provide a summary of actions taken and highlight follow-up items needed to ensure complete and correct workspace integration.