本文へ移動
cccskills
無料GitHub で公開

python-packaging

Python package creation and PyPI distribution via pyproject.toml and entry points. Use when publishing a package or setting up build configuration.

インストール方法を見る

含まれるファイル(5)

  • SKILL.md3.7 KB
  • modules/ci-cd-integration.md2.1 KB
  • modules/entry-points.md1.7 KB
  • modules/pyproject-patterns.md2.9 KB
  • modules/uv-workflow.md1.4 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Python Packaging

Modern Python packaging with pyproject.toml, uv, and best practices for distribution.

Quick Start

# Create new project with uv
uv init my-package
cd my-package

# Add dependencies
uv add requests click

# Build package
uv build

# Publish to PyPI
uv publish

Verification: Run the command with --help flag to verify availability.

When To Use

  • Creating distributable Python libraries
  • Building CLI tools
  • Publishing to PyPI
  • Setting up development environments
  • Managing project dependencies

When NOT To Use

  • Testing packages - use python-testing instead
  • Optimizing package performance - use python-performance
  • Testing packages - use python-testing instead
  • Optimizing package performance - use python-performance

Core Decisions

1. Layout Choice

# Source layout (recommended)
src/my_package/
    __init__.py
    module.py

# Flat layout (simple)
my_package/
    __init__.py
    module.py

Verification: Run the command with --help flag to verify availability.

Source layout benefits:

  • Clear separation of source and tests
  • Prevents accidental imports of uninstalled code
  • Better for packages with complex structure

2. Project Structure

Minimal Project:

**Verification:** Run `pytest -v` to verify tests pass.
my-project/
├── pyproject.toml
├── README.md
├── src/
│   └── my_package/
│       └── __init__.py
└── tests/
    └── test_init.py

Verification: Run pytest -v to verify tests pass.

Complete Project:

**Verification:** Run the command with `--help` flag to verify availability.
my-project/
├── pyproject.toml
├── README.md
├── LICENSE
├── .gitignore
├── src/
│   └── my_package/
│       ├── __init__.py
│       ├── cli.py
│       ├── core.py
│       └── utils.py
├── tests/
│   ├── conftest.py
│   └── test_core.py
└── docs/
    └── index.md

Verification: Run pytest -v to verify tests pass.

Detailed Topics

See modules for detailed information:

Best Practices

  1. Use source layout for anything beyond simple packages
  2. Pin direct dependencies with minimum versions
  3. Use optional dependency groups for dev/docs/test
  4. Include py.typed for type hint support
  5. Add detailed README with usage examples
  6. Use semantic versioning (MAJOR.MINOR.PATCH)
  7. Test on multiple Python versions before publishing

Exit Criteria

  • Modern pyproject.toml configuration
  • Clear dependency specification
  • Proper version management
  • Tests included and passing
  • Build process reproducible
  • Publishing pipeline automated

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Shapes turns action-first: action leads, steps numbered, state restated. Use for ADHD-friendly output. Do not use to trim tokens; use response-compression.

日本語の概要は準備中です。原文の説明を表示しています。

athola/claude-night-market3412026年10月10日 更新

Inverts burden of proof for code additions. Use when reviewing PRs, planning refactors, or running unbloat to challenge every addition's necessity.

日本語の概要は準備中です。原文の説明を表示しています。

athola/claude-night-market3412026年10月10日 更新

Tracks per-agent token usage and flags waste in parallel dispatch. Use when evaluating parallel agent efficiency or after a multi-agent run.

日本語の概要は準備中です。原文の説明を表示しています。

athola/claude-night-market3412026年10月10日 更新

Coordinates Claude agent teams via filesystem protocol. Use when orchestrating parallel agents with task dependencies. Do not use for single-agent tasks.

日本語の概要は準備中です。原文の説明を表示しています。

athola/claude-night-market3412026年10月10日 更新

Evaluates API surface design, consistency, and exemplar alignment. Use when reviewing public API changes or before releasing a new API surface.

日本語の概要は準備中です。原文の説明を表示しています。

athola/claude-night-market3412026年10月10日 更新

Selects architecture paradigm via research before scaffolding. Use when architecture is undecided and the choice needs justification and documentation.

日本語の概要は準備中です。原文の説明を表示しています。

athola/claude-night-market3412026年10月10日 更新

athola のスキルをすべて見る

このスキルの問題を報告する