技能 python-packaging
⚠️ 68 差
1
下載技能 ZIP
2
在 Claude 中上傳
前往 設定 → 功能 → 技能 → 上傳技能
3
開啟並開始使用
測試它
正在使用「python-packaging」。 I need a simple pyproject.toml and folder layout for a library.
預期結果:
- 使用包含套件資料夾和測試的 src 佈局。
- 在 pyproject.toml 中定義建置系統和專案中繼資料。
- 新增依賴項目和可選的開發工具。
- 包含用於打包的 README 和 LICENSE。
正在使用「python-packaging」。 How do I set up CLI commands for my package?
預期結果:
- 安裝 Click 作為依賴項目。
- 建立帶有 click 命令的 cli.py 模組。
- 在 pyproject.toml 區段中定義進入點。
- 以可編輯模式安裝以測試命令。
正在使用「python-packaging」。 What are the steps to publish to PyPI?
預期結果:
- 使用 python -m build 建置套件。
- 使用 twine check dist/* 驗證。
- 先上傳到 TestPyPI 進行測試。
- 使用 twine upload dist/* 上傳到 PyPI。
安全審計
安全v4 • 1/17/2026
Pure documentation skill containing educational content about Python packaging. No executable scripts, network calls, file access, or code execution paths present. All static findings are false positives: the scanner misidentified repository names as cryptographic algorithms, bash documentation examples as shell execution, and legitimate config file references as credential access attempts.
2
已掃描檔案
1,047
分析行數
3
發現項
4
審計總數
風險因素
🌐 網路存取 (25)
skill-report.json:6 SKILL.md:214 SKILL.md:215 SKILL.md:216 SKILL.md:217 SKILL.md:218 SKILL.md:437 SKILL.md:694 SKILL.md:694 SKILL.md:695 SKILL.md:695 SKILL.md:696 SKILL.md:696 SKILL.md:722 SKILL.md:727 SKILL.md:771 SKILL.md:775 SKILL.md:776 SKILL.md:779 SKILL.md:852 SKILL.md:853 SKILL.md:854 SKILL.md:855 SKILL.md:856 SKILL.md:857
⚙️ 外部命令 (77)
SKILL.md:25 SKILL.md:26 SKILL.md:51-62 SKILL.md:62-66 SKILL.md:66-87 SKILL.md:87-93 SKILL.md:93-111 SKILL.md:111-119 SKILL.md:119-122 SKILL.md:122-126 SKILL.md:126-135 SKILL.md:135-143 SKILL.md:143-154 SKILL.md:154-160 SKILL.md:160-278 SKILL.md:278-282 SKILL.md:282-298 SKILL.md:298-301 SKILL.md:301-308 SKILL.md:308-314 SKILL.md:314-344 SKILL.md:344-347 SKILL.md:347-350 SKILL.md:350-353 SKILL.md:353-358 SKILL.md:358-362 SKILL.md:362-405 SKILL.md:405-411 SKILL.md:411-425 SKILL.md:425-429 SKILL.md:429-441 SKILL.md:441-444 SKILL.md:444-458 SKILL.md:458-462 SKILL.md:462-497 SKILL.md:497-503 SKILL.md:503-511 SKILL.md:511-514 SKILL.md:514-529 SKILL.md:529-535 SKILL.md:535-547 SKILL.md:547-551 SKILL.md:551-567 SKILL.md:567-570 SKILL.md:570-574 SKILL.md:574-578 SKILL.md:578-587 SKILL.md:587-590 SKILL.md:590-603 SKILL.md:603-609 SKILL.md:609-617 SKILL.md:617-620 SKILL.md:620-627 SKILL.md:627-631 SKILL.md:631-644 SKILL.md:644-647 SKILL.md:647-648 SKILL.md:648-654 SKILL.md:654-663 SKILL.md:663-667 SKILL.md:667-685 SKILL.md:685-691 SKILL.md:691-702 SKILL.md:702-704 SKILL.md:704-708 SKILL.md:708-712 SKILL.md:712-726 SKILL.md:726-731 SKILL.md:731-736 SKILL.md:736-742 SKILL.md:742-765 SKILL.md:765-769 SKILL.md:769-780 SKILL.md:780-786 SKILL.md:786-818 SKILL.md:818-822 SKILL.md:822-832
📁 檔案系統存取 (2)
審計者: claude 查看審計歷史 →
品質評分
38
架構
100
可維護性
85
內容
21
社群
100
安全
83
規範符合性
你能建構什麼
打包可重複使用的模組
為共享的 Python 函式庫設計乾淨的結構和中繼資料。
發佈命令列工具
定義進入點並將 CLI 套件發佈到 PyPI。
自動化發佈
使用建置和上傳步驟設定發佈工作流程。
試試這些提示
入門套件
提供一個最小的 src 佈局和 pyproject.toml,用於名為 acme-tools 的小型 Python 函式庫。
新增 CLI 進入點
展示如何為現有套件新增一個基於 Click、名為 acme 的 CLI 進入點。
建置和發佈
列出使用 twine 建置 wheel 並發佈到 TestPyPI 和 PyPI 的步驟。
CI 發佈工作流程
草擬一個 GitHub Actions 工作流程,在建立版本時進行建置和上傳。
最佳實務
- 使用 src 佈局以獲得更安全的匯入
- 在乾淨的環境中測試安裝
- 在發佈到 PyPI 之前先發佈到 TestPyPI
避免
- 未驗證中繼資料就發佈
- 依賴隱含的 setup.py 預設值
- 發佈時跳過 wheel 建置
常見問題
這與現代 Python 打包相容嗎?
是的,它專注於 pyproject.toml 以及 PEP 517 和 PEP 621 標準。
這個技能不能做什麼?
它提供指導和範例,但不會執行建置或上傳。
它可以幫助處理 CI 或 GitHub Actions 嗎?
是的,它包含一個用於在版本建立時發佈的範例工作流程。
它會收集或傳送我的資料嗎?
不,內容不包含資料收集或網路操作。
如果我的建置失敗怎麼辦?
檢查建置需求、中繼資料欄位,並在產出物上執行 twine check。
它如何與 Poetry 或 Flit 比較?
它記錄了多個後端並解釋了每個後端的適用時機。