rust-prompt-templates

Installation
SKILL.md

Rust Prompt Templates — AI 輔助 Rust 開發提示詞模板庫

適用場景

  • 使用 AI(Claude / ChatGPT / Copilot)撰寫 Rust 程式碼時,需要結構化的 prompt 以獲得高品質輸出
  • 團隊統一 AI 輔助開發流程,確保產出風格一致
  • 快速生成符合 Rust 慣例的程式碼、測試、文件
  • Debug 時需要 AI 精確分析編譯錯誤或 runtime 問題
  • 程式碼審查、重構、效能優化的標準化 AI 輔助流程

核心知識:Prompt 設計五原則

# 原則 說明
1 角色設定 開頭指定角色(如「你是 Rust 資深工程師」),引導模型調用正確領域知識
2 具體約束 明列 Rust edition、crate 版本、#![forbid(unsafe_code)] 等技術邊界
3 輸出格式 指定「完整 .rs 檔案」「含 /// doc comments」「附 Cargo.toml」
4 上下文注入 提供型別定義、錯誤訊息、程式碼片段;上下文越精確,產出越準確
5 迭代提示 複雜任務拆為 prompt chain:設計介面 → 實作 → 錯誤處理 → 測試
Installs
1
First Seen
Oct 3, 2026