pypi-ops
БесплатноЗапускает вложенные скриптыНе проверенPublish Python packages to PyPI via OIDC Trusted Publishing (PEP 740 attestations, gh-action-pypi-publish) instead of stored tokens. Use for…
от 0xDarkMatter★ 86 звёзд на GitHubОб этом скилле
PyPI Operations
Publish Python packages to PyPI on the 2026 best-practice path: OIDC Trusted
Publishing with signed PEP 740 attestations, no long-lived token to leak. This
skill owns the publish layer (the registry handshake, the first-publish
gotchas, the recovery playbook). General GitHub Actions syntax is ci-cd-ops;
the install-side worm defense is supply-chain-defense; gh/release-page
mechanics are github-ops.
Where this fits — the release pipeline
A release spans several skills; pypi-ops owns the registry step. Chain them:
- Vet dependencies before cutting a release —
supply-chain-defense(cooldown + behavioural scan). The build runs dependency code before it touches your publish credential, so a poisoned build dep can steal the token. - Preflight —
scripts/publish-preflight.sh --build .(this skill). - Bump → tag → push —
git-ops(its push-preflight scans for secrets / forbidden files before the tag goes up). - CI publishes via OIDC — this skill's
assets/publish.yml; you approve at thepypienvironment gate. - Release page (optional, GitHub) —
github-ops, human-reviewed notes.
The one decision: OIDC vs API token
Default to OIDC Trusted Publishing. Reach for a token only when OIDC is impossible (publishing from a non-supported CI, or a one-off local push).
| Trusted Publishing (OIDC) ← default | API token | |
|---|---|---|
| Secret stored | None — short-lived OIDC token minted per run | Long-lived pypi-… token in a secret |
| Leak/phish blast radius | None to steal | Full publish rights until rotated |
| Provenance | PEP 740 attestations (signed, verifiable) | None by default |
| Setup | One-time publisher registration on PyPI | Generate token + store secret |
| Best for | All CI/CD releases | Legacy CI, emergency local upload |
If a repo currently uses a token, migrating to OIDC is strictly an upgrade — see references/trusted-publishing.md.
The #1 gotcha: first publish needs a pending publisher
A Trusted Publisher is normally configured under the project's settings on PyPI — but on the first ever publish the project doesn't exist yet, so there's nothing to configure it under. The fix is a pending publisher, registered at the account level before the first upload.
Symptom (the exact failure this skill exists to kill):
Trusted publishing exchange failure:
* invalid-publisher: valid token, but no corresponding publisher
(Publisher with matching claims was not found)
The OIDC token was valid; PyPI just has no publisher matching the claims. Fix:
PyPI → https://pypi.org/manage/account/publishing/ → Add a pending publisher
Field Value PyPI Project Name the dist name from pyproject.toml[project].nameOwner GitHub org/user Repository name repo name Workflow name the filename, e.g. publish.yml(not thename:)Environment name must equal the job's environment:(e.g.pypi)
All four claims must match the run's OIDC token exactly. After the first
successful publish, the pending publisher auto-converts to a normal project
publisher — no further action. Run diagnose-publish.sh on a failed run to read
the exact claims it presented and compare them field-by-field.
This is the most common silent-failure mode: a package's
publish.ymllooks perfect and every release builds green, yet nothing ever reaches PyPI because the publisher was never registered. Check it first.
Recommended workflow (copy assets/publish.yml)
The shipped template is hardened to the patterns below — adapt the marked points
and drop it in .github/workflows/. Non-negotiables it encodes:
on: push: tags: ['v*']— release on a version tag, never on every push.- OIDC, no token: the
publishjob haspermissions: id-token: writeandpypa/gh-action-pypi-publishwithattestations: true. Nopassword:/token. environment: pypion the publish job → a human approves every release (defense-in-depth: even a compromised repo can't auto-ship).- Build/publish split: a
buildjob (no elevated perms) produces + uploads thedistartifact;publishdownloads it. Least privilege per job. uv sync --locked+pip-audit: the release is built against the committed, hash-verified lockfile and blocked if a dep has a known CVE.twine check/ metadata validation before upload.- SHA-pinned actions with a trailing
# vXcomment (mutable tags get hijacked — seecheck-action-pins.py). - Verify-on-PyPI tail job — polls the JSON API so a silent publish failure (accepted-but-not-live, CDN lag) surfaces loudly instead of looking fine.
Supply-chain hardening — the publisher side
Stealing your publish credential lets an attacker ship malware to everyone who installs you — so the publish path is the surface th
Установить pypi-ops в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadWriteEditBashGlobGrepWebFetchВложенные файлы
FAQ
Что делает скилл pypi-ops?
Publish Python packages to PyPI via OIDC Trusted Publishing (PEP 740 attestations, gh-action-pypi-publish) instead of stored tokens. Use for: invalid-publisher errors, pending-publisher 404s, uv publish/twine, TestPyPI, environment approval gates, and rotating/auditing publish tokens.
Как установить скилл pypi-ops?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл pypi-ops запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic