スキル一覧に戻る
patrickhaahr

cargo

by patrickhaahr

i use arch and neovim btw

0🍴 0📅 2026年1月19日
GitHubで見るManusで実行

SKILL.md


name: cargo description: Guide for managing Cargo dependencies using cargo CLI commands instead of manually editing Cargo.toml. Use this skill when working on Rust projects that need dependency management.

Overview

This skill ensures dependencies are always added to Rust projects using cargo add CLI commands rather than manually editing Cargo.toml. This guarantees the latest compatible versions are used and maintains proper dependency resolution.

Usage

Adding Dependencies

NEVER manually edit Cargo.toml to add dependencies. Always use:

cargo add crate_name

With features:

cargo add crate_name --features "feature1,feature2"

Dev dependencies:

cargo add crate_name --dev

Build dependencies:

cargo add crate_name --build

With version constraint (only when necessary):

cargo add crate_name --version "^1.0.0"

Removing Dependencies

Use cargo remove instead of manually deleting from Cargo.toml:

cargo remove crate_name
cargo remove crate_name --dev
cargo remove crate_name --build

Upgrading Dependencies

Use cargo upgrade to update dependencies (requires cargo-edit package):

cargo upgrade crate_name
cargo upgrade --all
cargo upgrade --dry-run

Checking Dependency Status

cargo tree
cargo outdated

When to Use

Use this skill whenever you need to:

  • Add a new dependency to a Rust project
  • Remove a dependency
  • Update or upgrade dependencies
  • Modify dependency features

Best Practices

  1. Always use cargo add - Never hardcode versions unless explicitly required
  2. Specify features - Always include required features with --features flag
  3. Check dependency tree - Use cargo tree after adding to verify transitive dependencies
  4. Test after changes - Run cargo build and cargo test after dependency changes
  5. Use dry-run - When unsure, use --dry-run flag to preview changes

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です