Layer 2 Skills Test Scenarios

2026-08-30 浏览 (1)

Layer 2 Skills Test Scenarios

Layer 2: Design Choices

m05-type-driven

QueryExpected SkillExpected Elements
newtype patternm05-type-drivenwrapper, type safety
PhantomData 用法m05-type-drivenmarker, lifetime
type state patternm05-type-drivenstate machine, compile-time
零大小类型 ZSTm05-type-drivenzero-sized, marker

Test Commands

claude -p "newtype pattern"
claude -p "PhantomData 用法"

m09-domain

QueryExpected SkillExpected Elements
DDD in Rustm09-domainaggregate, entity
domain model 设计m09-domainvalue object, repository
领域建模m09-domainbounded context
aggregate rootm09-domaininvariant, consistency

Test Commands

claude -p "DDD in Rust"
claude -p "领域建模"

m10-performance

QueryExpected SkillExpected Elements
Rust 性能优化m10-performanceprofiling, bottleneck
benchmark 怎么写m10-performancecriterion, bench
criterion 用法m10-performanceblack_box, throughput
零拷贝 zero copym10-performanceCow, bytes

Test Commands

claude -p "Rust 性能优化"
claude -p "benchmark 怎么写"

m11-ecosystem

QueryExpected SkillExpected Elements
推荐什么 cratem11-ecosystemcrates.io, popularity
依赖选择m11-ecosystemmaintenance, features
Cargo.toml 依赖管理m11-ecosystemversion, workspace
feature flags 用法m11-ecosystemoptional, cfg

Test Commands

claude -p "推荐什么 crate"
claude -p "feature flags 用法"

m12-lifecycle

QueryExpected SkillExpected Elements
RAII patternm12-lifecycleDrop, scope
Drop trait 实现m12-lifecycledestructor, cleanup
资源释放顺序m12-lifecycledrop order, field
scopeguard 用法m12-lifecycledefer, guard

Test Commands

claude -p "RAII pattern"
claude -p "Drop trait 实现"

m13-domain-error

QueryExpected SkillExpected Elements
retry 策略m13-domain-errorbackoff, exponential
circuit breaker 实现m13-domain-errorstate, threshold
错误恢复模式m13-domain-errorfallback, graceful
错误分类处理m13-domain-errortransient, permanent

Test Commands

claude -p "retry 策略"
claude -p "circuit breaker 实现"

m14-mental-model

QueryExpected SkillExpected Elements
怎么学 Rustm14-mental-modelownership, mindset
Rust 思维方式m14-mental-modelborrow checker, mental model
从 Java 转 Rustm14-mental-modelcomparison, transition
为什么 Rust 这样设计m14-mental-modelrationale, philosophy

Test Commands

claude -p "怎么学 Rust"
claude -p "Rust 思维方式"

m15-anti-pattern

QueryExpected SkillExpected Elements
常见 Rust 错误m15-anti-patternpitfall, mistake
code smell Rustm15-anti-patternrefactor, improve
Rust 反模式m15-anti-patternavoid, better
clone 滥用m15-anti-patternunnecessary, performance

Test Commands

claude -p "常见 Rust 错误"
claude -p "clone 滥用"

Validation Checklist

  • All Layer 2 skills trigger correctly
  • Design-related queries route properly
  • Chinese keywords work
  • No conflicts with Layer 1 skills

你可能感兴趣的文章

Agent Integration Test Scenarios

Domain Skills Test Scenarios

Rust-Router Test Scenarios

Ownership (m01) Test Scenarios

Unsafe-Checker Test Scenarios

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