agentleFS
d-oitd-oit/rust-2026-template/.agents/skills/crates-io-name-check/SKILL.md

crates-io-name-check

Skill15 starsChanged 5 months agoMITView on GitHub

Verify that a new Rust crate name is available and appropriate on crates.io before committing to it. Use when creating a new crate, starting a new Rust project, or before the first cargo publish. Triggers: "check crate name", "is name taken", "crates.io available", "new crate".

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Verify that a new Rust crate name is available and appropriate on crates.io before committing to it in Cargo.toml.

    line 21
  2. Distinctive:

    If the exact name appears in results → taken, choose another.

    line 33
  3. Distinctive:

    No exact match → likely available (confirm with Method 2).

    line 34

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Skill: crates-io-name-check

Purpose

Verify that a new Rust crate name is available and appropriate on crates.io before committing to it in Cargo.toml. This is a generic skill for any Rust project using this template — run it whenever you create a new crate (workspace member or standalone).

Availability Check

Method 1: cargo search (CLI, recommended)

cargo search <your-crate-name>
  • If the exact name appears in results → taken, choose another.
  • No exact match → likely available (confirm with Method 2).

Method 2: crates.io API

STATUS=$(curl -s -o /dev/null -w "%{http_code}" https://crates.io/api/v1/crates/<your-crate-name>)
if [ "$STATUS" = "404" ]; then
  echo "✓ Name is available"
else
  echo "✗ Name is taken (HTTP $STATUS)"
fi

Method 3: Browser

Open https://crates.io/crates/<your-crate-name> — 404 page = available.

Naming Best Practices

RuleGoodBad
Use kebab-casemy-tool-coremy_tool_core
Be specificinvoice-parserparser
Avoid generic names—utils, helpers, common
Scope to projectmyapp-cli, myapp-sdkcli, sdk
Keep it shortfoobar-rsfoobar-rust-library-2026
No name squatting—reserving empty crates

Similarity Check

Also check for confusingly similar names that could mislead users:

# Search for similar prefixes
cargo search <prefix>

# Check typosquat risk manually on crates.io
# https://crates.io/search?q=<your-name>

Cargo.toml Name vs Package Directory

Note that the [package] name in Cargo.toml is the published crate name. The directory name under crates/ can differ but should match for clarity:

crates/
  my-tool-core/    ← directory
    Cargo.toml     → [package] name = "my-tool-core"  ✓

Template Usage Note

The template includes a placeholder crate crates/example-crate/. When you replace it with your real crate, rename both the directory and the [package] name in Cargo.toml, and run this skill to verify availability before your first commit.

Rationalizations

RationalizationReality
"The name sounds fine, I don't need to check."Names are permanent on crates.io. Verify before first publish.
"I'll rename later if needed."Renaming a published crate breaks all downstream users.
"Similar names are fine."Confusingly similar names lead to typosquatting and user confusion.

Red Flags

  • Publishing without checking name availability first
  • Using generic names like utils, helpers, common
  • Ignoring similar existing crate names that could confuse users

References

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.