·m05-type-driven
</>

m05-type-driven

zhanghandong/rust-skills

關鍵:用於類型驅動設計。觸發器:類型狀態、PhantomData、newtype、標記特徵、構建器模式、使無效狀態不可表示、編譯時驗證、密封特徵、ZST、類型狀態、新類型模式、類型驅動設計

281安裝·7熱度·@zhanghandong

安裝

$npx skills add https://github.com/zhanghandong/rust-skills --skill m05-type-driven

SKILL.md

| Pattern | Don't Just Say | Ask Instead |

| Primitive obsession | "It's just a string" | What does this value represent? | | Boolean flags | "Add an isvalid flag" | Can states be types? | | Optional everywhere | "Check for None" | Is absence really possible? | | Validation at runtime | "Return Err if invalid" | Can we validate at construction? |

| What types to create | m09-domain | What's the domain model? | | State machine design | m09-domain | What are valid transitions? | | Marker trait usage | m04-zero-cost | Static or dynamic dispatch? |

關鍵:用於類型驅動設計。觸發器:類型狀態、PhantomData、newtype、標記特徵、構建器模式、使無效狀態不可表示、編譯時驗證、密封特徵、ZST、類型狀態、新類型模式、類型驅動設計 來源:zhanghandong/rust-skills。

查看原文

可引用資訊

為搜尋與 AI 引用準備的穩定欄位與指令。

安裝指令
npx skills add https://github.com/zhanghandong/rust-skills --skill m05-type-driven
分類
</>開發工具
認證
收錄時間
2026-02-01
更新時間
2026-02-18

快速解答

什麼是 m05-type-driven?

關鍵:用於類型驅動設計。觸發器:類型狀態、PhantomData、newtype、標記特徵、構建器模式、使無效狀態不可表示、編譯時驗證、密封特徵、ZST、類型狀態、新類型模式、類型驅動設計 來源:zhanghandong/rust-skills。

如何安裝 m05-type-driven?

開啟你的終端機或命令列工具(如 Terminal、iTerm、Windows Terminal 等) 複製並執行以下指令:npx skills add https://github.com/zhanghandong/rust-skills --skill m05-type-driven 安裝完成後,技能將自動設定到你的 AI 程式設計環境中,可以在 Claude Code 或 Cursor 中使用

這個 Skill 的原始碼在哪?

https://github.com/zhanghandong/rust-skills