Status: active. Approved on 2026-08-01 after repository, historical, official-source, synthetic, and representative real-project validation.
This Skill prepares, validates, publishes, and diagnoses Python distributions on PyPI/TestPyPI and Rust crates on crates.io. It uses Trusted Publishing by default for CI, preserves manual first-release paths, separates build evidence from credentials, and treats registry versions as immutable.
Before preparing a release, it asks the user to choose GitHub Actions or local publication. Action mode
generates and validates .github/workflows; local mode keeps the repository independent of GitHub Actions.
- Validate package names, versions, tags, metadata, artifact sets, and dependency order.
- Build isolated Python wheel/sdist and Rust crate release gates.
- Generate distinct
.github/workflowsrelease shapes for pure-Python and native-extension distributions. - Configure GitHub Actions around protected publish jobs and short-lived OIDC credentials.
- Explain account-wide versus project-scoped PyPI tokens and crates.io first-release requirements.
- Diagnose PyPI 403 errors, Cargo registry replacement, ambiguous uploads, and duplicate-version hazards.
- Verify clean installation or dependency resolution after publication.
- Reuse an authorized local browser login for registry/GitHub UI work without inspecting credentials or unrelated account content.
The Skill never needs to read .pypirc, Cargo credentials, GitHub Secrets, or token values. Users configure
those external credentials and registry-side trust themselves.
Do not install this draft until it is activated. After activation, link the complete
publish-python-and-rust-packages/ source directory into the user Skill directory. The linked directory must
directly contain SKILL.md; do not install by copying editable sources.
Windows PowerShell:
$skillsRoot = Join-Path $HOME ".agents\skills"
$source = (Resolve-Path "<repository-root>\publish-python-and-rust-packages").Path
$link = Join-Path $skillsRoot "publish-python-and-rust-packages"
New-Item -ItemType Directory -Force -Path $skillsRoot | Out-Null
if (Test-Path -LiteralPath $link) { throw "Destination already exists: $link" }
New-Item -ItemType Junction -Path $link -Target $source | Out-NullmacOS:
skills_root="$HOME/.agents/skills"
source_dir="$(cd "<repository-root>/publish-python-and-rust-packages" && pwd)"
link_path="$skills_root/publish-python-and-rust-packages"
mkdir -p "$skills_root"
if [ -e "$link_path" ] || [ -L "$link_path" ]; then echo "Destination already exists: $link_path" >&2; exit 1; fi
ln -s "$source_dir" "$link_path"Codex normally detects linked Skill changes automatically; restart it if necessary. After activation, invoke
it as $publish-python-and-rust-packages. For cross-agent reuse, CC Switch v3.13 or newer can scan/import the
local Skill from ~/.agents/skills, enable compatible target agents, and sync it. Review each agent's Skill
format, tools, and permissions after import; CC Switch synchronizes configuration but does not make different
agent runtimes semantically identical.
SKILL.md: release decisions, gates, and stop conditions.references/: PyPI, crates.io, GitHub Actions, and failure-diagnosis guidance.assets/github-workflows/: separate pure-Python and native-extension templates plus an optional crates.io Action template. Every template keeps ordinary validation separate from tag-gated publication.scripts/check_release_readiness.py: read-only structural release checker for Python 3.11+; mixed repositories require an explicit--kind pythonor--kind rust.