pypi-package-scaffold
Skill3 starsChanged 4 months agoMITView on GitHub
Scaffolds production-ready PyPI packages with pyproject.toml, hatch/flit/build tooling, GitHub Actions publish workflow, test harness, and documentation. Python analog of nuget-package-scaffold. Use when creating Python packages, setting up PyPI publishing, configuring package metadata, or building Python libraries.
- Installs packages
In this repository86 other files it gives its agents.
- AGENTS.mdAGENTS.md
- project-templates/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- project-templates/CLAUDE.mdCLAUDE.md
- alembic-migration-managerSkill
- architecture-journalSkill
- architecture-reviewSkill
- automated-code-reviewSkill
- axum-scaffolderSkill
- capture-consolidateSkill
- cargo-package-scaffoldSkill
- code-review-coachSkill
- confluence-guide-writerSkill
- dependency-mapperSkill
- doc-syncSkill
- dotnet-architecture-checklistSkill
- dotnet-controller-api-scaffolderSkill
- dotnet-security-reviewSkill
- dotnet-vertical-sliceSkill
- ef-migration-managerSkill
- email-captureSkill
- environment-healthSkill
- evaluate-testsSkill
- fastapi-scaffolderSkill
- fitness-functionsSkill
- jira-comment-writerSkill
- legacy-migration-analyzerSkill
- minimal-api-scaffolderSkill
- nuget-package-scaffoldSkill
- oss-vettingSkill
- pattern-tradeoff-analyzerSkill
- php-api-scaffolderSkill
- php-architecture-checklistSkill
- php-feature-sliceSkill
- php-migration-managerSkill
- php-package-scaffoldSkill
- php-security-reviewSkill
- pr-feedback-writerSkill
- python-architecture-checklistSkill
- python-feature-sliceSkill
- python-modernization-analyzerSkill
- python-security-reviewSkill
- qraspi-architectureSkill
- qraspi-graduateSkill
- qraspi-implementSkill
- qraspi-planSkill
- qraspi-questionsSkill
- qraspi-researchSkill
- qraspi-skeletonSkill
- qrspi-implementSkill
- qrspi-planSkill
- qrspi-questionsSkill
- qrspi-researchSkill
- qrspi-specSkill
- react-app-scaffolderSkill
- react-architecture-checklistSkill
- react-component-scaffolderSkill
- react-feature-sliceSkill
- react-modernization-analyzerSkill
- react-security-reviewSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 25
NO PUBLISH WITHOUT TESTS — pytest must pass (the publish job needs: test) before any upload.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
PyPI Package Scaffold
"A library is only as good as its documentation and its tests. Semantic versioning is a contract with your users — break it and you break trust."
Core Philosophy
A Python package is a contract with its users in three parts: the API surface (what's public), the
version (what changes are breaking), and the metadata (who maintains it, license, supported Python
versions). Packaging is not an afterthought — a package that cannot be installed reliably, has no
tests, ships without type stubs, or lacks documentation is not ready for PyPI. The scaffold
establishes all of these before the first publish, using the src/ layout and Trusted Publishing.
Non-Negotiable Constraints:
- NO PUBLISH WITHOUT TESTS —
pytestmust pass (the publish jobneeds: test) before any upload. - SEMVER IS LAW — breaking changes require a major version bump; no exceptions.
- METADATA REQUIRED — name, version, description, license, authors, readme, requires-python, classifiers.
- MULTI-VERSION SUPPORT —
requires-python = ">=3.10"minimum; test matrix covers 3.10–3.14. - DETERMINISTIC BUILDS — pinned build dependencies;
PYTHONHASHSEED=0in CI; ship both sdist and wheel.
Full principle table, KB lookups, command sequences, anti-patterns, discipline rules, and error
recovery live in references/conventions.md.
Workflow
SCAFFOLD Create the src-layout structure:
src/<package>/{__init__.py (+__all__), py.typed, _internal/}
tests/ docs/ pyproject.toml README.md LICENSE CHANGELOG.md
.github/workflows/{ci.yml, publish.yml}
(Full pyproject.toml in references/pyproject-template.md.)
CONFIGURE Set all required metadata + classifiers + [project.urls] (checklist in conventions.md).
TEST pip install -e ".[dev]"; pytest --cov; mypy --strict; ruff check + format --check.
BUILD python -m build; twine check dist/*; inspect wheel contents.
PUBLISH TestPyPI first (upload + install-verify), then PyPI. Use Trusted Publishing (OIDC), no tokens.
(Automated workflow in references/ci-publish-workflow.md.)Exit criteria: required metadata complete; pytest, mypy --strict, ruff, and
twine check dist/* all pass; sdist + wheel built; TestPyPI install verified; publish workflow gated
on the test matrix via needs: test.
State Block
<pypi-package-state>
phase: SCAFFOLD | CONFIGURE | TEST | BUILD | PUBLISH | COMPLETE
package_name: [name]
version: [semver]
python_requires: [version]
build_tool: hatchling | flit | setuptools | build
type_stubs: true | false
ci_configured: true | false
testpypi_published: true | false
pypi_published: true | false
last_action: [description]
next_action: [description]
</pypi-package-state>Output Template
- Package scaffold checklist —
references/output-templates.md. - Complete
pyproject.toml(metadata, tool config, build-system) —references/pyproject-template.md. - GitHub Actions test matrix + Trusted-Publishing workflow —
references/ci-publish-workflow.md. - Principle table, KB lookups, command sequences, anti-patterns, discipline rules, error recovery —
references/conventions.md.
Integration with Other Skills
| Skill | Relationship |
supply-chain-audit | After scaffolding, audit the package's dependencies for CVEs and license compliance. |
python-security-review | Review the package for security issues before publishing to PyPI. |
python-architecture-checklist | Ensure the package's internal structure is maintainable. |
nuget-package-scaffold | Cross-reference for teams publishing both Python and .NET packages — identical philosophy, different tooling. |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

