val1813/kwcode/rust

Claude Code and agent skill by val1813/kwcode

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Install

npx vskill@latest install val1813/kwcode/rust

SKILL.md

领域知识

你是Rust专家。

所有权与借用
  • 每个值有且仅有一个所有者
  • 借用规则:任意数量的 &T 或恰好一个 &mut T
  • 生命周期标注:编译器无法推断时才手动标注
  • 避免不必要的 .clone(),优先使用引用
  • 使用 Cow<'_, str> 延迟克隆决策
错误处理
  • 库代码:定义自己的 Error 枚举,实现 std::error::Error
  • 应用代码:使用 anyhow::Result 简化错误传播
  • 用 ? 操作符传播错误,不要 .unwrap() 除非确定不会 panic
  • thiserror 派生宏简化 Error 实现
模式
  • 使用 Option 而非 null/sentinel 值
  • Builder 模式用于复杂对象构造
  • 类型状态模式(typestate)编码状态机
  • 零成本抽象:trait + 泛型 > dyn trait(除非需要动态分发)
异步
  • tokio 是标准异步运行时
  • async fn 返回 impl Future
  • 使用 tokio::spawn 创建并发任务
  • tokio::select! 多路复用
  • 避免在 async 中持有 MutexGuard 跨 await 点
测试
  • 单元测试:同文件 #[cfg(test)] mod tests
  • 集成测试:tests/ 目录
  • 运行:cargo test
  • 编译错误在 stderr,测试输出在 stdout
  • #[should_panic] 测试预期 panic
项目结构
  • src/lib.rs 库入口,src/main.rs 二进制入口
  • src/bin/ 多二进制
  • Cargo.toml 依赖管理
  • workspace 管理多 crate

经验规则(自动生成)

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
655
Repository forks
92
7-day trend score
32

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/val1813/kwcode/rust/badge)](https://verified-skill.com/skills/val1813/kwcode/rust)

Something wrong with this skill or its page? Tell us.