重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
pypi-doppler by terrylica/cc-skills
npx skills add https://github.com/terrylica/cc-skills --skill pypi-doppler在以下情况下使用此技能:
此技能仅支持本地机器发布。
publishCmduv build)scripts/publish-to-pypi.sh广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
参见:ADR-0027, docs/development/PUBLISHING.md
此技能提供仅限本地的 PyPI 发布,使用 Doppler 进行安全的凭证管理。它与工作区范围的发布工作流集成,其中:
| 脚本 | 用途 |
|---|---|
scripts/publish-to-pypi.sh | 带有 CI 检测防护的本地 PyPI 发布 |
用法:复制到项目的 scripts/ 目录:
/usr/bin/env bash << 'DOPPLER_EOF'
# 环境无关的路径
PLUGIN_DIR="${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/marketplaces/cc-skills/plugins/itp}"
cp "$PLUGIN_DIR/skills/pypi-doppler/scripts/publish-to-pypi.sh" scripts/
chmod +x scripts/publish-to-pypi.sh
DOPPLER_EOF
安装 Doppler CLI:
brew install dopplerhq/cli/doppler
使用 Doppler 进行身份验证:
doppler login
验证对 claude-config 项目的访问权限:
doppler whoami
doppler projects
创建 PyPI API 令牌:
pypi-AgEIcHlwaS5vcmc... 开头,约 180 个字符)将令牌存储在 Doppler 中:
doppler secrets set PYPI_TOKEN='pypi-AgEIcHlwaS5vcmc...' \
--project claude-config \
--config prd
验证令牌已存储:
doppler secrets get PYPI_TOKEN \
--project claude-config \
--config prd \
--plain
发布前验证:在发布到 PyPI 之前,验证版本是否已从上一个版本递增。未递增版本就发布是无效的,并且浪费资源。
自动检查序列:
pyproject.toml 版本与最新的 PyPI 版本进行比较feat: 或 fix: 类型。"步骤 1:开发与提交(Conventional Commits):
git add .
git commit -m "feat: add new feature" # MINOR 版本号提升
git push origin main
步骤 2:自动化版本管理(GitHub Actions - 40-60 秒):
GitHub Actions 自动:分析提交、确定下一个版本、更新 pyproject.toml/package.json、生成 CHANGELOG、创建 git 标签、创建 GitHub 发布。
PyPI 发布不会在此处发生(根据设计 - 参见 ADR-0027)。
步骤 3:本地 PyPI 发布(30 秒):
git pull origin main
./scripts/publish-to-pypi.sh
/usr/bin/env bash << 'GIT_EOF'
# 首次:将脚本从技能复制到您的项目(环境无关)
PLUGIN_DIR="${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/marketplaces/cc-skills/plugins/itp}"
cp "$PLUGIN_DIR/skills/pypi-doppler/scripts/publish-to-pypi.sh" scripts/
chmod +x scripts/publish-to-pypi.sh
# 在 semantic-release 创建 GitHub 发布之后
git pull origin main
# 使用捆绑脚本的本地副本进行发布
./scripts/publish-to-pypi.sh
GIT_EOF
捆绑脚本特性:CI 检测防护、仓库验证、Doppler 集成、构建 + 发布 + 验证工作流、清晰的错误消息。
不使用规范脚本进行手动发布:
/usr/bin/env bash << 'CONFIG_EOF'
# 从 Doppler 检索令牌
PYPI_TOKEN=$(doppler secrets get PYPI_TOKEN \
--project claude-config \
--config prd \
--plain)
# 构建包
uv build
# 发布到 PyPI
UV_PUBLISH_TOKEN="${PYPI_TOKEN}" uv publish
CONFIG_EOF
警告:手动发布会绕过 CI 检测防护和仓库验证。除非有特定原因,否则请使用规范脚本。
| 主题 | 参考 |
|---|---|
| CI 检测 | CI 检测强制执行 |
| 凭证管理 | Doppler 与令牌管理 |
| 故障排除 | 故障排除指南 |
| TestPyPI 测试 | TestPyPI 测试 |
| mise 任务集成 | mise 任务集成 |
docs/architecture/decisions/0027-local-only-pypi-publishing.md - 仅限本地发布的架构决策docs/architecture/decisions/0028-skills-documentation-alignment.md - 技能与 ADR-0027 的对齐docs/development/PUBLISHING.md - 完整的发布工作流指南semantic-release - 版本管理自动化(无发布)mise-tasks - 具有依赖管理的任务编排release-workflow-patterns.md - DAG 模式和反模式scripts/publish-to-pypi.sh - 带有 CI 防护的参考实现discover_uv() 检查 PATH、直接安装、版本管理器(优先级顺序)最后更新:2025-12-03 策略:工作区范围的仅限本地 PyPI 发布(ADR-0027) 取代:无(创建时即符合 ADR-0027)
每周安装次数
58
仓库
GitHub 星标数
24
首次出现
2026年1月24日
安全审计
安装于
opencode55
claude-code54
gemini-cli54
codex53
github-copilot52
cursor52
Use this skill when:
This skill supports LOCAL machine publishing ONLY.
publishCmd in semantic-release configurationuv build in prepareCmd)scripts/publish-to-pypi.sh on local machineSee : ADR-0027, docs/development/PUBLISHING.md
This skill provides local-only PyPI publishing using Doppler for secure credential management. It integrates with the workspace-wide release workflow where:
| Script | Purpose |
|---|---|
scripts/publish-to-pypi.sh | Local PyPI publishing with CI detection guards |
Usage : Copy to your project's scripts/ directory:
/usr/bin/env bash << 'DOPPLER_EOF'
# Environment-agnostic path
PLUGIN_DIR="${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/marketplaces/cc-skills/plugins/itp}"
cp "$PLUGIN_DIR/skills/pypi-doppler/scripts/publish-to-pypi.sh" scripts/
chmod +x scripts/publish-to-pypi.sh
DOPPLER_EOF
Install Doppler CLI :
brew install dopplerhq/cli/doppler
Authenticate with Doppler :
doppler login
Verify access toclaude-config project:
doppler whoami doppler projects
Create PyPI API token :
pypi-AgEIcHlwaS5vcmc..., ~180 characters)Store token in Doppler :
doppler secrets set PYPI_TOKEN='pypi-AgEIcHlwaS5vcmc...'
--project claude-config
--config prd
Verify token stored :
doppler secrets get PYPI_TOKEN
--project claude-config
--config prd
--plain
Pre-publish validation : Before publishing to PyPI, verify that the version has incremented from the previous release. Publishing without a version increment is invalid and wastes resources.
Autonomous check sequence :
pyproject.toml version against latest PyPI versionfeat: or fix: types."Step 1: Development & Commit (Conventional Commits):
git add .
git commit -m "feat: add new feature" # MINOR bump
git push origin main
Step 2: Automated Versioning (GitHub Actions - 40-60s):
GitHub Actions automatically: analyzes commits, determines next version, updates pyproject.toml/package.json, generates CHANGELOG, creates git tag, creates GitHub release.
PyPI publishing does NOT happen here (by design - see ADR-0027).
Step 3: Local PyPI Publishing (30 seconds):
git pull origin main
./scripts/publish-to-pypi.sh
/usr/bin/env bash << 'GIT_EOF'
# First time: copy script from skill to your project (environment-agnostic)
PLUGIN_DIR="${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/marketplaces/cc-skills/plugins/itp}"
cp "$PLUGIN_DIR/skills/pypi-doppler/scripts/publish-to-pypi.sh" scripts/
chmod +x scripts/publish-to-pypi.sh
# After semantic-release creates GitHub release
git pull origin main
# Publish using local copy of bundled script
./scripts/publish-to-pypi.sh
GIT_EOF
Bundled script features : CI detection guards, repository verification, Doppler integration, build + publish + verify workflow, clear error messages.
For manual publishing without the canonical script:
/usr/bin/env bash << 'CONFIG_EOF'
# Retrieve token from Doppler
PYPI_TOKEN=$(doppler secrets get PYPI_TOKEN \
--project claude-config \
--config prd \
--plain)
# Build package
uv build
# Publish to PyPI
UV_PUBLISH_TOKEN="${PYPI_TOKEN}" uv publish
CONFIG_EOF
WARNING : Manual publishing bypasses CI detection guards and repository verification. Use canonical script unless you have a specific reason not to.
| Topic | Reference |
|---|---|
| CI Detection | CI Detection Enforcement |
| Credential Management | Doppler & Token Management |
| Troubleshooting | Troubleshooting Guide |
| TestPyPI Testing | TestPyPI Testing |
| mise Task Integration | mise Task Integration |
docs/architecture/decisions/0027-local-only-pypi-publishing.md - Architectural decision for local-only publishingdocs/architecture/decisions/0028-skills-documentation-alignment.md - Skills alignment with ADR-0027docs/development/PUBLISHING.md - Complete release workflow guidesemantic-release - Versioning automation (NO publishing)mise-tasks - Task orchestration with dependency managementdiscover_uv() checks PATH, direct installs, version managers (priority order)Last Updated : 2025-12-03 Policy : Workspace-wide local-only PyPI publishing (ADR-0027) Supersedes : None (created with ADR-0027 compliance from start)
Weekly Installs
58
Repository
GitHub Stars
24
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubFailSocketPassSnykWarn
Installed on
opencode55
claude-code54
gemini-cli54
codex53
github-copilot52
cursor52
Azure Data Explorer (Kusto) 查询技能:KQL数据分析、日志遥测与时间序列处理
158,400 周安装
release-workflow-patterns.mdscripts/publish-to-pypi.sh - Reference implementation with CI guards