关于
This Claude Skill automates the complete release process for R packages, handling version bumping, NEWS.md updates, git tagging, and GitHub release creation. It's designed for use when a package is ready for a patch, minor, or major release, or after CRAN acceptance. The skill also sets up the subsequent development version immediately 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 the full version release cycle for an R package.
When to Use
- Ready to release a new version (bug fix, feature, or breaking change)
- After CRAN acceptance, creating a corresponding GitHub release
- Setting up post-release development version
Inputs
- Required: Package with changes ready for release
- Required: Release type: patch (0.1.0 -> 0.1.1), minor (0.1.0 -> 0.2.0), or major (0.1.0 -> 1.0.0)
- Optional: Whether to submit to CRAN (default: no, use
submit-to-cranskill separately)
Procedure
Step 1: Determine Version 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 |
Got: The correct bump type (patch, minor, or major) is determined based on the nature of changes since the last release.
If fail: If unsure, review git log since the last tag and classify each change. Any breaking API change requires a major bump.
Step 2: Update Version
usethis::use_version("minor") # or "patch" or "major"
This updates the Version field in DESCRIPTION and adds a heading to NEWS.md.
Got: DESCRIPTION version updated. NEWS.md has a new section header for the release version.
If fail: If usethis::use_version() is not available, manually update the Version field in DESCRIPTION and add a # packagename x.y.z heading to NEWS.md.
Step 3: Update NEWS.md
Fill in the release notes under the new version 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 for traceability.
Got: NEWS.md contains a complete summary of user-facing changes organized by category, with issue/PR numbers for traceability.
If fail: If changes are hard to reconstruct, use git log --oneline v<previous>..HEAD to list all commits since the last release and categorize them.
Step 4: Final Checks
devtools::check()
devtools::spell_check()
urlchecker::url_check()
Got: devtools::check() returns 0 errors, 0 warnings, and 0 notes. Spell check and URL check find no issues.
If fail: Fix all errors and warnings before releasing. Add false-positive words to inst/WORDLIST for the spell checker. Replace broken URLs.
Step 5: Commit Release
git add DESCRIPTION NEWS.md
git commit -m "Release packagename v0.2.0"
Got: A single commit containing the version bump in DESCRIPTION and the updated NEWS.md.
If fail: If other uncommitted changes are present, stage only DESCRIPTION and NEWS.md. Release commits should contain only version-related changes.
Step 6: Tag the Release
git tag -a v0.2.0 -m "Release v0.2.0"
git push origin main --tags
Got: Annotated tag v0.2.0 created and pushed to the remote. git tag -l shows the tag locally; git ls-remote --tags origin confirms it on the remote.
If fail: If push fails, check that you have write access. If the tag already exists, verify it points to the correct commit with git show v0.2.0.
Step 7: Create GitHub Release
gh release create v0.2.0 \
--title "packagename v0.2.0" \
--notes-file NEWS.md
Or use:
usethis::use_github_release()
Got: GitHub release created with release notes visible on the repository's Releases page.
If fail: If gh release create fails, ensure the gh CLI is authenticated (gh auth status). If usethis::use_github_release() fails, create the release manually on GitHub.
Step 8: Set Development Version
After release, bump to development version:
usethis::use_dev_version()
This changes version to 0.2.0.9000 indicating development.
git add DESCRIPTION NEWS.md
git commit -m "Begin development for next version"
git push
Got: DESCRIPTION version is now 0.2.0.9000 (development version). NEWS.md has a new heading for the development version. Changes are pushed to the remote.
If fail: If usethis::use_dev_version() is not available, manually change the version to x.y.z.9000 in DESCRIPTION and add a # packagename (development version) heading to NEWS.md.
Validation
- Version in DESCRIPTION matches intended release
- NEWS.md has complete, accurate release notes
-
R CMD checkpasses - Git tag matches version (e.g.,
v0.2.0) - GitHub release exists with release notes
- Post-release development version set (x.y.z.9000)
Pitfalls
- Forgetting to push tags:
git pushalone doesn't push tags. Use--tagsorgit push origin v0.2.0 - NEWS.md format: Use markdown headers matching the pkgdown/CRAN expected format
- Tagging wrong commit: Always tag after the version-bump commit, not before
- CRAN version already exists: CRAN won't accept a version that's already been published. Always increment.
- Development version in release: Never submit a
.9000version to CRAN
Related Skills
submit-to-cran- CRAN submission after version releasecreate-github-release- general GitHub release creationsetup-github-actions-ci- triggers pkgdown rebuild on releasebuild-pkgdown-site- documentation site reflects new version
GitHub 仓库
Frequently asked questions
What is the release-package-version skill?
release-package-version is a Claude Skill by pjt222. Skills package instructions and resources that Claude loads on demand, so Claude can perform release-package-version-related tasks without extra prompting.
How do I install release-package-version?
Use the install commands on this page: add release-package-version to Claude Code as a plugin, or clone its repository into your skills directory, then restart Claude so it picks up the skill.
What category does release-package-version belong to?
release-package-version is in the Meta category, tagged general.
Is release-package-version free to use?
Yes. release-package-version is listed on AIMCP and free to install. It runs inside Claude, so no separate service account is required to use the skill itself.
相关推荐技能
Content Collections 是一个 TypeScript 优先的构建工具,可将本地 Markdown/MDX 文件转换为类型安全的数据集合。它专为构建博客、文档站和内容密集型 Vite+React 应用而设计,提供基于 Zod 的自动模式验证。该工具涵盖从 Vite 插件配置、MDX 编译到生产环境部署的完整工作流。
这个Claude Skill为开发者提供完整的Polymarket预测市场开发支持,涵盖API调用、交易执行和市场数据分析。关键特性包括实时WebSocket数据流,可监控实时交易、订单和市场动态。开发者可用它构建预测市场应用、实施交易策略并集成实时市场预测功能。
该Skill帮助开发者创建OpenCode插件,用于接入命令、文件、LSP等25+种事件。它提供了插件结构、事件API规范和JavaScript/TypeScript实现模式,适合需要拦截操作、扩展功能或自定义事件处理的场景。开发者可通过它快速构建响应式模块来增强OpenCode AI助手的能力。
SGLang是一个专为LLM设计的高性能推理框架,特别适用于需要结构化输出的场景。它通过RadixAttention前缀缓存技术,在处理JSON、正则表达式、工具调用等具有重复前缀的复杂工作流时,能实现极速生成。如果你正在构建智能体或多轮对话系统,并追求远超vLLM的推理性能,SGLang是理想选择。
