Token导航 LogoToken导航TokenDH.com
AI 工具需要联网github未标认证来源可访问clear审计通过

rustRust 工具

Agent Skill

rust 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

816

周安装

34

GitHub Stars

76

下载量

272
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:rust(Rust 工具)
来源仓库:https://github.com/htlin222/dotfiles
仓库路径:skills/rust
安装命令:
npx skills add https://github.com/htlin222/dotfiles --skill rust
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/htlin222/dotfiles --skill rust

简介

rust 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。

  • 适用于围绕仓库状态、代码变更或协作事项进行信息整理。
  • 可协助分析代码变更、跟踪 Issue 进展和处理 Pull Request。
  • 安装命令为 npx skills add https://github.com/htlin222/dotfiles --skill rust。
  • 使用前需确认权限范围和维护状态,避免触发联网或文件读写操作。

SKILL.md

Rust Development

Write safe, performant Rust code.

When to Use

  • Writing Rust code
  • Ownership and lifetime issues
  • Trait implementations
  • Async Rust
  • FFI and unsafe code

Ownership Patterns

Borrowing

// Immutable borrow
fn print_length(s: &str) {
    println!("Length: {}", s.len());
}

// Mutable borrow
fn append_greeting(s: &mut String) {
    s.push_str(", world!");
}

// Ownership transfer
fn consume(s: String) -> String {
    format!("Consumed: {}", s)
}

Lifetimes

// Explicit lifetime annotation
fn longest<'a>(x: &'a str, y: &'a str) -> &'a str {
    if x.len() > y.len() { x } else { y }
}

// Struct with lifetime
struct Parser<'a> {
    input: &'a str,
    position: usize,
}

Error Handling

use thiserror::Error;

#[derive(Error, Debug)]
pub enum AppError {
    #[error("IO error: {0}")]
    Io(#[from] std::io::Error),

    #[error("Parse error at line {line}")]
    Parse { line: usize },

    #[error("Not found: {0}")]
    NotFound(String),
}

// Using Result
fn read_config(path: &Path) -> Result<Config, AppError> {
    let content = std::fs::read_to_string(path)?;
    parse_config(&content).map_err(|e| AppError::Parse { line: e.line })
}

Traits

// Define trait
trait Summary {
    fn summarize(&self) -> String;

    // Default implementation
    fn preview(&self) -> String {
        format!("{}...", &self.summarize()[..50])
    }
}

// Implement for type
impl Summary for Article {
    fn summarize(&self) -> String {
        format!("{} by {}", self.title, self.author)
    }
}

// Generic with trait bounds
fn notify<T: Summary + Display>(item: &T) {
    println!("Breaking: {}", item.summarize());
}

Async

use tokio;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let response = fetch_data().await?;
    process(response).await
}

async fn fetch_data() -> Result<Data, Error> {
    let client = reqwest::Client::new();
    let resp = client.get(URL).send().await?.json().await?;
    Ok(resp)
}

Testing

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn test_parse_valid() {
        let result = parse("valid input");
        assert!(result.is_ok());
        assert_eq!(result.unwrap(), expected);
    }

    #[test]
    #[should_panic(expected = "empty input")]
    fn test_parse_empty() {
        parse("");
    }
}

Examples

Input: "Fix lifetime error" Action: Analyze borrow checker message, adjust lifetimes or ownership

Input: "Make this async" Action: Add async/await, use tokio runtime, handle async errors

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

25.54%
按下载量换算69

windsurf

21.55%
按下载量换算59

Antigravity

17.42%
按下载量换算47

Gemini CLI

12.94%
按下载量换算35

OpenCode

8.4%
按下载量换算23

Cursor

3.63%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills