跳到正文
Skillpedia
通用编程48k · #5548

python-packaging

它能做什么

这份指南教你如何创建和分发 Python 代码包。内容包括使用现代工具组织项目,并将其发布出去,方便其他人使用。

适用场景

  • ✓想把自己的 Python 代码分享给别人时。
  • ✓开发可以安装使用的命令行工具时。
  • ✓需要把项目发布到 PyPI(Python 包的“应用商店”)时。

技能链接

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/python-packaging/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/python-packaging/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我该怎么创建一个 Python 包来分享?”

每周 5 个新技能,1 分钟读完。

工作原理

它会使用 `pyproject.toml` 等配置文件,定义代码包应如何构建和分发。然后演示如何使用相关工具打包代码,并将其上传到 PyPI 等仓库。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Python Packaging

Comprehensive guide to creating, structuring, and distributing Python packages using modern packaging tools, pyproject.toml, and publishing to PyPI.

Use this skill when

  • Creating Python libraries for distribution
  • Building command-line tools with entry points
  • Publishing packages to PyPI or private repositories
  • Setting up Python project structure
  • Creating installable packages with dependencies
  • Building wheels and source distributions
  • Versioning and releasing Python packages
  • Creating namespace packages
  • Implementing package metadata and classifiers

Do not use this skill when

  • The task is unrelated to python packaging
  • You need a different domain or tool outside this scope

Instructions

  • Clarify goals, constraints, and required inputs.
  • Apply relevant best practices and validate outcomes.
  • Provide actionable steps and verification.
  • If detailed examples are required, open resources/implementation-playbook.md.

Resources

  • resources/implementation-playbook.md for detailed patterns and examples.

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
常见问题

什么是“Python 包”?

Python 包是一组有组织的 Python 代码,其他开发者或项目可以轻松地安装和使用它。

什么是 PyPI?

PyPI 是 Python 包索引(Python Package Index),是一个公开的仓库,开发者可以在这里分享和下载 Python 包。

为什么要使用 `pyproject.toml`?

它是一个现代化的文件,集中管理 Python 项目的构建和打包配置,让流程更加规范,也更简单。

详情

作者的原始描述

Comprehensive guide to creating, structuring, and distributing Python packages using modern packaging tools, pyproject.toml, and publishing to PyPI.

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#5548
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能