Install
$ agentstack add skill-btfranklin-skills-publish-python-package-pypi ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Publish Python Package Pypi
Overview
Implement a consistent release pipeline for Python packages: CI on push/PR, draft release notes on version tags, and PyPI publish on release publication. Follow the workflow patterns captured in references/workflow-templates.md.
Baseline Pattern
For package repos, maintain these workflow files:
.github/workflows/python-package.yml.github/workflows/draft-release-notes.yml.github/workflows/python-publish.yml
Use references/workflow-templates.md for canonical templates and version-pinned actions.
Workflow
- Identify repository type.
- If repo is an app/service (not a PyPI package), do not add
python-publish.ymlby default. - If repo is a package/library, continue.
- Inspect package metadata before workflow changes.
- Confirm
pyproject.tomlhas package metadata suitable for publishing. - Confirm build works locally:
pdm build.
- Configure PyPI Trusted Publisher requirements.
- In PyPI project settings, add a Trusted Publisher for this GitHub repository/workflow.
- Use environment
releasein workflow and repository environment settings. - Do not introduce long-lived PyPI API tokens unless explicitly requested.
- Add or update
.github/workflows/python-publish.yml.
- Trigger:
on: release: types: [published]. - Permissions:
contents: readand job-levelid-token: write. - Steps: checkout (full history), setup python, install pdm,
pdm build,pypa/gh-action-pypi-publish. - Keep publish job minimal and deterministic.
- Ensure CI and release-note workflows exist.
python-package.ymlshould test/lint on push and PR.draft-release-notes.ymlshould trigger onv*.*.*tag pushes.- Keep action versions aligned with repo standards.
- Validate end-to-end.
- Validate workflow files:
gh workflow list. - Validate package build:
pdm build. - Validate release path:
- Push tag
vX.Y.Zto trigger release notes draft. - Publish GitHub release to trigger PyPI publish workflow.
- Check Actions run logs and PyPI project page.
Required GitHub/PyPI Configuration
- GitHub Actions secrets:
- Add repository (or org-level) secret
OPENAI_API_KEYwhen usingdraft-release-notes.yml. GITHUB_TOKENis provided automatically by Actions and does not need manual creation.
- GitHub environment:
- Create/configure environment
releaseif using environment protections. - Ensure the publish job can run in
release(reviewers/rules must allow it).
- PyPI Trusted Publisher:
- In PyPI project settings, register the GitHub repository/workflow/environment used by
python-publish.yml. - Do not add
PYPI_API_TOKENfor trusted publishing unless explicitly requested.
Repo Conventions
- Use
actions/checkout@v6.0.1,actions/setup-python@v6.1.0, andpypa/gh-action-pypi-publish@v1.13.0unless a user asks to change versions. - Install tooling with:
python -m pip install --upgrade pippython -m pip install pdm- Match the publish workflow Python version to project support policy. This can vary (
3.10,3.11,3.12,3.14), so do not hardcode one global value.
Troubleshooting
Trusted publishing exchange failure:
- Confirm
id-token: writeexists at job level. - Confirm PyPI trusted publisher repository/workflow/environment names match exactly.
- Confirm workflow ran from the expected repository and branch/release context.
- Workflow did not run:
- Confirm event type (
release.published) and that release is published, not draft only. - Confirm workflow file exists on default branch.
- Build artifact problems:
- Run
pdm buildlocally and inspectdist/. - Confirm package metadata and included files are correct.
references/
references/workflow-templates.md: canonical workflow templates and adaptation notes for package repositories.
Output Expectations
When applying this skill, produce:
- A short summary of current workflow coverage and gaps.
- Exact workflow file patches.
- Any required PyPI/GitHub settings that must be configured manually.
- Validation results (
pdm build, workflow/event sanity, and what was not verifiable locally). - A checklist of required GitHub/PyPI settings (
OPENAI_API_KEY,releaseenvironment, trusted publisher mapping).
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: btfranklin
- Source: btfranklin/skills
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.