release-package-version
关于
This skill automates the complete release cycle for R packages, handling version bumps, NEWS.md updates, git tagging, and GitHub releases. It's designed for releasing patch, minor, or major versions and can create a matching GitHub release after CRAN acceptance. The process also sets up the subsequent development version increment post-release.
快速安装
Claude Code
推荐npx skills add pjt222/agent-almanac -a claude-code/plugin add https://github.com/pjt222/agent-almanacgit clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/release-package-version在 Claude Code 中复制并粘贴此命令以安装该技能
技能文档
Release Package Version
Execute full ver release cycle for R pkg.
Use When
- Ready to release new ver (bug fix, feature, breaking)
- After CRAN accept → matching GH release
- Set up post-release dev ver
In
- Required: Pkg w/ changes ready
- Required: Release type: patch (0.1.0 → 0.1.1), minor (0.1.0 → 0.2.0), major (0.1.0 → 1.0.0)
- Optional: Submit to CRAN? (default no, use
submit-to-cranseparate)
Do
Step 1: Determine Bump
Follow semantic versioning:
| Change Type | Version Bump | Example |
|---|---|---|
| Bug fixes only | Patch | 0.1.0 -> 0.1.1 |
| New features (backward compatible) | Minor | 0.1.0 -> 0.2.0 |
| Breaking changes | Major | 0.1.0 -> 1.0.0 |
→ Correct bump (patch/minor/major) determined by changes since last release.
If err: unsure → review git log since last tag + classify each change. Any breaking API → major.
Step 2: Update Ver
usethis::use_version("minor") # or "patch" or "major"
Updates Version in DESCRIPTION + adds heading to NEWS.md.
→ DESCRIPTION ver updated. NEWS.md has new section header for release ver.
If err: usethis::use_version() not available → manual update Version in DESCRIPTION + add # packagename x.y.z heading to NEWS.md.
Step 3: Update NEWS.md
Fill release notes under new ver heading:
# packagename 0.2.0
## New Features
- Added `new_function()` for processing data (#42)
- Support for custom themes in `plot_results()` (#45)
## Bug Fixes
- Fixed crash when input contains all NAs (#38)
- Corrected off-by-one error in `window_calc()` (#41)
## Minor Improvements
- Improved error messages for invalid input types
- Updated documentation examples
Use issue/PR numbers → traceability.
→ NEWS.md has complete summary of user-facing changes by category, w/ issue/PR numbers.
If err: changes hard reconstruct → git log --oneline v<previous>..HEAD lists all commits since last release + categorize.
Step 4: Final Checks
devtools::check()
devtools::spell_check()
urlchecker::url_check()
→ devtools::check() returns 0 errors, 0 warnings, 0 notes. Spell + URL clean.
If err: fix all errs + warns before release. Add false-positives to inst/WORDLIST. Replace broken URLs.
Step 5: Commit Release
git add DESCRIPTION NEWS.md
git commit -m "Release packagename v0.2.0"
→ Single commit w/ ver bump in DESCRIPTION + updated NEWS.md.
If err: other uncommitted changes → stage only DESCRIPTION + NEWS.md. Release commits = ver-related only.
Step 6: Tag Release
git tag -a v0.2.0 -m "Release v0.2.0"
git push origin main --tags
→ Annotated tag v0.2.0 created + pushed. git tag -l local; git ls-remote --tags origin confirms remote.
If err: push fails → check write access. Tag exists → verify points to correct commit git show v0.2.0.
Step 7: GitHub Release
gh release create v0.2.0 \
--title "packagename v0.2.0" \
--notes-file NEWS.md
Or:
usethis::use_github_release()
→ GH release created w/ notes visible on Releases page.
If err: gh release create fails → ensure gh auth (gh auth status). usethis::use_github_release() fails → create manual on GH.
Step 8: Set Dev Ver
After release, bump to dev:
usethis::use_dev_version()
Changes ver to 0.2.0.9000 → indicates dev.
git add DESCRIPTION NEWS.md
git commit -m "Begin development for next version"
git push
→ DESCRIPTION ver = 0.2.0.9000. NEWS.md has new heading for dev ver. Pushed.
If err: usethis::use_dev_version() not available → manual change to x.y.z.9000 in DESCRIPTION + add # packagename (development version) heading to NEWS.md.
Check
- Ver in DESCRIPTION matches intended
- NEWS.md complete + accurate
-
R CMD checkpasses - Git tag matches ver (e.g.
v0.2.0) - GH release exists w/ notes
- Post-release dev ver set (x.y.z.9000)
Traps
- Forget push tags:
git pushalone no push tags. Use--tagsorgit push origin v0.2.0 - NEWS.md format: Markdown headers matching pkgdown/CRAN format
- Tag wrong commit: Always tag after ver-bump commit, not before
- CRAN ver already exists: CRAN won't accept dup. Always increment.
- Dev ver in release: Never submit
.9000to CRAN
→
submit-to-cran— CRAN submission after releasecreate-github-release— general GH release creationsetup-github-actions-ci— triggers pkgdown rebuild on releasebuild-pkgdown-site— docs site reflects new ver
GitHub 仓库
相关推荐技能
llamaguard
其他LlamaGuard是Meta推出的7-8B参数内容审核模型,专门用于过滤LLM的输入和输出内容。它能检测六大安全风险类别(暴力/仇恨、性内容、武器、违禁品、自残、犯罪计划),准确率达94-95%。开发者可通过HuggingFace、vLLM或Sagemaker快速部署,并能与NeMo Guardrails集成实现自动化安全防护。
cost-optimization
其他这个Claude Skill帮助开发者优化云成本,通过资源调整、标记策略和预留实例来降低AWS、Azure和GCP的开支。它适用于减少云支出、分析基础设施成本或实施成本治理策略的场景。关键功能包括提供成本可视化、资源规模调整指导和定价模型优化建议。
quantizing-models-bitsandbytes
其他这个Skill使用bitsandbytes库量化大语言模型,能在GPU内存有限时通过8位或4位量化减少50-75%内存占用,同时保持精度损失最小。它支持INT8、NF4、FP4等多种量化格式,可与HuggingFace Transformers无缝集成,适用于需要部署更大模型或加速推理的场景。还提供QLoRA训练和8位优化器支持,让开发者能轻松实现高效模型压缩。
dispatching-parallel-agents
其他该Skill用于并行处理3个以上无依赖关系的独立故障,可为每个问题域分派专属Claude代理同时执行调查修复。它通过并发处理多个独立问题显著提升故障排查效率,特别适用于测试文件、子系统等无共享状态的场景。
