·python-types-contracts
</>

python-types-contracts

ahgraber/skills

在 Python 中定義或發展公共接口、模式邊界或 pydantic 用法時使用。當公共 API 上缺少註釋、pydantic 模型出現在各處而不是信任邊界、合約更改缺乏遷移指導或跨模塊邊界過度使用任何/對像類型時,也可以使用。

8安裝·0熱度·@ahgraber

安裝

$npx skills add https://github.com/ahgraber/skills --skill python-types-contracts

SKILL.md

Treat type hints as interface design, not decoration. Focus on explicit contracts, stable public APIs, and boundary-safe modeling.

These are preferred defaults for common cases, not universal rules. When a default conflicts with project constraints, suggest a better-fit alternative and explain tradeoffs and compensating controls.

Internal helpers don't need the same rigor as public APIs. Over-annotating private code adds noise without safety.

在 Python 中定義或發展公共接口、模式邊界或 pydantic 用法時使用。當公共 API 上缺少註釋、pydantic 模型出現在各處而不是信任邊界、合約更改缺乏遷移指導或跨模塊邊界過度使用任何/對像類型時,也可以使用。 來源:ahgraber/skills。

查看原文

可引用資訊

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

安裝指令
npx skills add https://github.com/ahgraber/skills --skill python-types-contracts
分類
</>開發工具
認證
收錄時間
2026-02-09
更新時間
2026-02-18

快速解答

什麼是 python-types-contracts?

在 Python 中定義或發展公共接口、模式邊界或 pydantic 用法時使用。當公共 API 上缺少註釋、pydantic 模型出現在各處而不是信任邊界、合約更改缺乏遷移指導或跨模塊邊界過度使用任何/對像類型時,也可以使用。 來源:ahgraber/skills。

如何安裝 python-types-contracts?

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

這個 Skill 的原始碼在哪?

https://github.com/ahgraber/skills