Rust Skills Trigger Test Checklist

2026-08-30 浏览 (1)

Rust Skills Trigger Test Checklist

Run these queries in a project that has rust-skills installed, and verify the correct skill is triggered.

How to Test

  1. Go to a Rust project directory with rust-skills plugin installed
  2. Run each query below with claude -p "query"
  3. Check if the expected skill is triggered (shown in Claude Code status line)

Layer 1: Language Mechanics

Ownership (m01-ownership)

QueryExpected Skill
E0382 错误怎么解决m01-ownership
value moved after usem01-ownership
borrowed value does not live long enoughm01-ownership
怎么解决借用错误m01-ownership
lifetime annotationm01-ownership
E0597 lifetime too shortm01-ownership

Resource (m02-resource)

QueryExpected Skill
Arc 和 Rc 区别m02-resource
Box vs Rc vs Arcm02-resource
smart pointer 选择m02-resource
shared ownershipm02-resource

Mutability (m03-mutability)

QueryExpected Skill
E0499 multiple mutable borrowsm03-mutability
E0502 borrow conflictm03-mutability
E0596 cannot borrow as mutablem03-mutability
Cell vs RefCellm03-mutability
interior mutabilitym03-mutability

Zero-Cost (m04-zero-cost)

QueryExpected Skill
E0277 trait bound not satisfiedm04-zero-cost
generic vs trait objectm04-zero-cost
monomorphizationm04-zero-cost
E0308 type mismatchm04-zero-cost
E0282 type annotations neededm04-zero-cost

Type-Driven (m05-type-driven)

QueryExpected Skill
newtype patternm05-type-driven
PhantomData 用法m05-type-driven
type state patternm05-type-driven
零大小类型 ZSTm05-type-driven
marker traitm05-type-driven

Error Handling (m06-error-handling)

QueryExpected Skill
什么时候用 panicm06-error-handling
Result vs Optionm06-error-handling
thiserror 怎么用m06-error-handling
anyhow vs eyrem06-error-handling
error propagationm06-error-handling

Concurrency (m07-concurrency)

QueryExpected Skill
cannot be sent between threadsm07-concurrency
async await 怎么用m07-concurrency
Send Sync traitm07-concurrency
deadlock 怎么避免m07-concurrency
如何在线程间共享数据m07-concurrency

Layer 2: Design Choices

Domain Modeling (m09-domain)

QueryExpected Skill
DDD in Rustm09-domain
domain model 设计m09-domain
aggregate rootm09-domain
value object vs entitym09-domain
领域建模m09-domain

Performance (m10-performance)

QueryExpected Skill
Rust 性能优化m10-performance
benchmark 怎么写m10-performance
criterion 用法m10-performance
cache localitym10-performance
零拷贝 zero copym10-performance

Ecosystem (m11-ecosystem)

QueryExpected Skill
推荐什么 cratem11-ecosystem
依赖选择m11-ecosystem
crate 对比m11-ecosystem
Cargo.toml 依赖管理m11-ecosystem
feature flags 用法m11-ecosystem

Lifecycle (m12-lifecycle)

QueryExpected Skill
RAII patternm12-lifecycle
Drop trait 实现m12-lifecycle
资源释放顺序m12-lifecycle
scopeguard 用法m12-lifecycle
析构函数m12-lifecycle

Domain Error (m13-domain-error)

QueryExpected Skill
retry 策略m13-domain-error
circuit breaker 实现m13-domain-error
错误恢复模式m13-domain-error
backoff 重试m13-domain-error
错误分类处理m13-domain-error

Mental Model (m14-mental-model)

QueryExpected Skill
怎么学 Rustm14-mental-model
Rust 思维方式m14-mental-model
从 Java 转 Rustm14-mental-model
所有权心智模型m14-mental-model
为什么 Rust 这样设计m14-mental-model

Anti-Pattern (m15-anti-pattern)

QueryExpected Skill
常见 Rust 错误m15-anti-pattern
code smell Rustm15-anti-pattern
Rust 反模式m15-anti-pattern
不要这样写 Rustm15-anti-pattern
clone 滥用m15-anti-pattern

Core Skills

Unsafe (unsafe-checker)

QueryExpected Skill
unsafe 代码怎么写unsafe-checker
FFI 绑定unsafe-checker
SAFETY commentunsafe-checker
raw pointerunsafe-checker
how to call C functionsunsafe-checker

Version/Crate (rust-learner)

QueryExpected Skill
tokio 最新版本rust-learner
Rust 1.85 有什么新特性rust-learner
serde 文档rust-learner
crate inforust-learner

Code Style (coding-guidelines)

QueryExpected Skill
Rust 命名规范coding-guidelines
clippy warningcoding-guidelines
rustfmt 配置coding-guidelines
P.NAM.01coding-guidelines

Router (rust-router)

QueryExpected Skill
分析这个问题的意图rust-router
意图分析rust-router
这是什么类型的 Rust 问题rust-router

Layer 3: Domain Constraints

Domains

QueryExpected Skill
kubernetes operator in Rustdomain-cloud-native
decimal 精度计算domain-fintech
机器学习 tensordomain-ml
IoT sensordomain-iot
axum web serverdomain-web
clap CLI argumentdomain-cli
no_std embeddeddomain-embedded

Quick Test Commands

# Layer 1: Language Mechanics
claude -p "E0382 错误怎么解决"           # m01-ownership
claude -p "E0499 multiple mutable borrows" # m03-mutability
claude -p "newtype pattern"              # m05-type-driven
claude -p "Send Sync trait"              # m07-concurrency

# Layer 2: Design Choices
claude -p "DDD in Rust"                  # m09-domain
claude -p "benchmark 怎么写"              # m10-performance
claude -p "推荐什么 crate"                # m11-ecosystem
claude -p "RAII pattern"                 # m12-lifecycle
claude -p "circuit breaker 实现"          # m13-domain-error
claude -p "怎么学 Rust"                   # m14-mental-model
claude -p "常见 Rust 错误"                # m15-anti-pattern

# Core Skills
claude -p "unsafe 代码怎么写"             # unsafe-checker
claude -p "tokio 最新版本"                # rust-learner
claude -p "Rust 命名规范"                 # coding-guidelines

# Layer 3: Domains
claude -p "axum web server"              # domain-web
claude -p "decimal 精度计算"              # domain-fintech

Expected Behavior

When a skill triggers correctly, you should see:

  1. The skill name in Claude Code's status line
  2. Response content that matches the skill's expertise
  3. References to patterns/rules from that skill

Troubleshooting

If skills don't trigger:

  1. Ensure rust-skills plugin is installed: claude /plugins
  2. Check plugin path is correct
  3. Verify SKILL.md files have description: field with keywords
  4. Try more specific keywords from the skill description

你可能感兴趣的文章

Rust Skills - Claude Instructions

Rust Skills

Rust Skills - Agent Instructions

Rust Skills Review Report

Rust Skills

Rust Skills

Changelog

  • 所属分类: AI
  • 本文标签: rust
  • 版权声明: 本文链接 https://seaxiang.com/blog/DUPAGXi5