スキル一覧に戻る
get2knowio

maverick-rust-unsafe

by get2knowio

Highway to the agent zone!

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

SKILL.md


name: maverick-rust-unsafe description: Rust unsafe code, FFI, and safety invariants version: 1.0.0 triggers:

  • unsafe
  • "unsafe {"
  • "unsafe fn"
  • raw pointer
  • "*const"
  • "*mut"
  • transmute
  • FFI
  • extern

Rust Unsafe Skill

When to Use Unsafe

  • FFI with C libraries
  • Raw pointers for performance
  • Type transmutation (rare, dangerous)
  • Unsafe trait implementations

Safety Documentation

/// SAFETY: The slice is guaranteed to be non-empty by the caller.
/// This is enforced by the type system via NonEmptySlice.
unsafe fn get_first_unchecked(slice: &[i32]) -> i32 {
    debug_assert!(!slice.is_empty());
    *slice.get_unchecked(0)
}

Avoid Unsafe When Possible

// BAD - unjustified unsafe
unsafe fn get_first(slice: &[i32]) -> i32 {
    *slice.get_unchecked(0)
}

// GOOD - safe alternative
fn get_first(slice: &[i32]) -> Option<&i32> {
    slice.first()
}

Review Severity

  • CRITICAL: Unsafe without justification, potential undefined behavior
  • MAJOR: Missing safety documentation, unsafe could be safe
  • MINOR: Debug assertions missing in unsafe code

スコア

総合スコア

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

レビュー

💬

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