python-lib-init

Generate distributable Python library projects with synchronized version pins and strict tooling.

Updated May 15, 2026
One-click install
npx skills add https://github.com/M4RC0Sx/claude-skills --skill python-lib-init
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-lib-init
Source: https://github.com/M4RC0Sx/claude-skills/tree/main/skills/python-lib-init
Command: npx skills add https://github.com/M4RC0Sx/claude-skills --skill python-lib-init

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manually setting up a Python library for distribution requires configuring dozens of interdependent tools, keeping Python version pins synchronized across multiple files, and setting up CI to test across supported versions—all of which are error-prone and time-consuming to do correctly.

Core Features & Use Cases

  • Full library scaffolding: Generates a complete project structure using uv init --lib with a py.typed marker for PEP 561 compliant type hint distribution.
  • Strict tooling baseline: Pre-configures Ruff linting, mypy strict type checking, pytest testing, and ensures all Python version references (.python-version, requires-python, Ruff target-version, mypy python_version, CI matrix) stay in sync.
  • CI and publishing workflow: Sets up a GitHub Actions matrix to test across all supported Python versions, plus a complete build and PyPI publishing workflow.
  • Use case: If you are building a utility library to share with other Python developers, this skill handles all boilerplate setup so you can start writing library code immediately instead of configuring tooling.

Quick Start

Use the python-lib-init skill to bootstrap a new Python library project configured for PyPI distribution with synchronized version pins, strict linting, and multi-version CI testing out of the box.

Frequently Asked Questions about python-lib-init

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up a Python library for PyPI distribution without manual boilerplate errors?

You can bootstrap a Python library for PyPI distribution by automating the configuration of project structure, strict Ruff and mypy tooling baselines, and synchronized Python version pins to eliminate manual boilerplate setup errors.

How do I keep Python version references synchronized across Ruff, mypy, and GitHub Actions CI?

Keeping Python version references synchronized across Ruff target-version, mypy python_version, requires-python, and CI matrices requires a strict tooling baseline that automatically aligns all version declarations during library scaffolding.

What is PEP 561 compliant type hint distribution and when do I need it for a Python library?

PEP 561 compliant type hint distribution requires including a py.typed marker file in your Python library package so downstream consumers can use your type annotations for static type checking.

Can I use uv for dependency management when scaffolding a Python library with strict tooling?

Yes, you can use uv-based dependency management when scaffolding a Python library because the project structure is generated using uv init --lib with strict Ruff, mypy, and pytest baselines pre-configured.

What's the best way to configure a GitHub Actions matrix for multi-version Python library testing?

The best way to configure multi-version Python CI testing is to set up a GitHub Actions matrix that validates compatibility across all declared supported Python versions during the library scaffolding process.

Do I need to manually configure Ruff and mypy strict baselines for a new Python package?

No, you do not need to manually configure Ruff linting and mypy strict type checking for a new Python package because strict tooling baselines are pre-configured automatically during the library scaffolding process.