From dd-modules
仅当用户主动调用 /cocoapods-release 或明确要求发布当前 CocoaPods 项目版本时使用;负责更新 VERSION/CHANGELOG、创建 release commit/tag,并按根目录 PODSPEC 列表执行 pod repo push。该 skill 有远端发布副作用,禁止自动触发。
How this skill is triggered — by the user, by Claude, or both
Slash command
/dd-modules:cocoapods-release <version|patch|minor|major><version|patch|minor|major>The summary Claude sees in its skill listing — used to decide when to auto-load this skill
用于在当前仓库执行本地发布流程:更新 `VERSION`、由 AI 更新 `CHANGELOG.md`、创建 release commit、创建并推送 Git tag,然后直接运行本 Skill 内置的 `assets/pod-push-all.sh`,按根目录 `PODSPEC` 文件列出的顺序发布 podspec。默认发布到 `BoostApplePods`,如需其它私有 specs repo,可在执行脚本时使用 `POD_REPO=<repo-name>` 覆盖。
用于在当前仓库执行本地发布流程:更新 VERSION、由 AI 更新 CHANGELOG.md、创建 release commit、创建并推送 Git tag,然后直接运行本 Skill 内置的 assets/pod-push-all.sh,按根目录 PODSPEC 文件列出的顺序发布 podspec。默认发布到 BoostApplePods,如需其它私有 specs repo,可在执行脚本时使用 POD_REPO=<repo-name> 覆盖。
只在以下场景使用:
/cocoapods-release ...。不要在普通代码修改、changelog 修改、版本号讨论或 CI/CD 咨询中自动触发真实发布。
用户调用参数为:$ARGUMENTS
支持:
x.y.z:显式目标版本,例如 4.0.2。x.y.z.n:兼容历史四段版本,例如 2.8.0.16。patch:当前 VERSION 最后一段 +1。minor:当前 VERSION 中间段 +1,后续段归零。major:当前 VERSION 首段 +1,后续段归零。版本必须匹配:^[0-9]+(\.[0-9]+){2,3}$。
Tag 名必须等于 VERSION,不要添加 v 前缀。
仓库根目录必须提供 PODSPEC 文件,用于声明本次需要发布的 podspec 以及发布顺序。
规则:
VPNNetwork 或 VPNNetwork.podspec 两种写法。# 开头的行会被忽略。示例:
VPNNetwork
VPNNEHeartbeat
VPNNetworkiOS
在修改任何文件前,先执行这些检查:
定位仓库根目录。
读取 VERSION 和 CHANGELOG.md。
读取根目录 PODSPEC,解析需要发布的 podspec 列表;至少解析到 1 个 podspec,不能有重复项,且发布计划中列出数量、文件名和顺序。
运行 git status --short,工作区必须干净。
根据参数计算目标版本,并确认目标版本合法且高于当前版本。
检查本地不存在目标版本 tag。
检查远端 origin 不存在目标版本 tag。
检查 PODSPEC 中列出的 podspec 文件都存在。
检查 PODSPEC 中列出的 podspec 都包含动态版本行:
s.version = `scripts/version.sh`
检查 PODSPEC 中列出的 podspec 的 source tag 使用 :tag => s.version。
检查 scripts/version.sh 存在。
检查本 Skill 内置脚本 .claude/skills/cocoapods-release/assets/pod-push-all.sh 存在且可执行;如果不存在或不可执行,停止发布并提示用户处理,不要在只读检查阶段自动修改权限。
如果任一检查失败,停止发布并向用户说明原因。
只读检查通过后,修改任何文件前必须询问用户确认。确认内容应包含 PODSPEC 文件解析出的 podspec 列表及顺序:
准备发布当前 CocoaPods 项目 <target-version>:
1. 更新 VERSION
2. 根据 git log 更新 CHANGELOG.md
3. 创建 release commit
4. 创建 tag <target-version>
5. push commit 和 tag 到 origin
6. 直接执行 .claude/skills/cocoapods-release/assets/pod-push-all.sh 发布 PODSPEC 中列出的 <podspec-count> 个 podspec(脚本会使用 --allow-warnings、--skip-import-validation、--skip-tests、--use-modular-headers):
1. <podspec-name>.podspec
2. <podspec-name>.podspec
请确认是否继续?
未得到明确确认前,不要修改文件、不要提交、不要创建 tag、不要 push、不要执行 pod 发布。
确认后:
将 VERSION 改为目标版本,只保留版本号和结尾换行。
找到上一个 tag:
VERSION 对应 tag。收集变更:
git log <previous-tag>..HEAD --oneline --no-mergesgit diff --stat <previous-tag>..HEAD由 AI 总结用户可理解的 changelog,不机械复制 commit hash。
在 CHANGELOG.md 的 # Change Log 标题后插入:
## <target-version> - <YYYY-MM-DD>
- ...
release commit 只能包含:
VERSIONCHANGELOG.md不要提交 podspec 的临时版本替换。
提交信息使用:
chore(release): <target-version>
提交前检查 staged 文件只包含 VERSION 和 CHANGELOG.md。
release commit 创建后,执行远端副作用前必须再次确认:
release commit 已创建。
接下来会执行远端副作用操作:
1. git tag -a <target-version> -m "Release <target-version>"
2. git push origin HEAD
3. git push origin <target-version>
4. .claude/skills/cocoapods-release/assets/pod-push-all.sh <target-version>
确认后会发布到远端 Git 仓库和 configured pod repo;这些远端副作用不会自动回滚。
是否继续?
未得到明确确认前,不要创建 tag、不要 push、不要执行 pod 发布。
第二次确认后,按顺序执行;内置脚本必须在本地 tag 创建且远端 tag push 成功后运行:
git tag -a <target-version> -m "Release <target-version>"
git push origin HEAD
git push origin <target-version>
.claude/skills/cocoapods-release/assets/pod-push-all.sh <target-version>
如果需要发布到非默认 specs repo,最后一步改为:
POD_REPO=<repo-name> .claude/skills/cocoapods-release/assets/pod-push-all.sh <target-version>
如果 .claude/skills/cocoapods-release/assets/pod-push-all.sh 运行失败:
pod repo push,不要尝试修改代码、修改 podspec、调整脚本、重排 PODSPEC、补发依赖、删除 tag、重新 tag、force push 或执行其它修复动作。PODSPEC 发布顺序、先把被依赖的 pod 排到前面、确认私有 specs repo 已包含依赖版本、必要时由用户手动执行 pod repo update 后重试。发布结束后检查:
git status --short 为空;如果不为空,区分是否为脚本未恢复的 podspec 临时修改或其它文件变更,只报告现状并询问用户,不要擅自清理。
VERSION 等于目标版本。
CHANGELOG.md 包含目标版本条目。
本地 tag 存在。
远端 tag 存在。
PODSPEC 中列出的所有 podspec 的 s.version 都恢复为:
s.version = `scripts/version.sh`
assets/pod-push-all.sh 输出显示 PODSPEC 中列出的所有 podspec 发布成功。
最后用简短中文汇总发布结果和任何需要用户手动确认的事项。
npx claudepluginhub yudongdongcoder/dd-plugins --plugin dd-modulesCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.