create-release-checklist by posit-dev/skills
npx skills add https://github.com/posit-dev/skills --skill create-release-checklist为 R 包生成发布清单并创建相应的 GitHub issue。
此技能通过以下步骤指导您在 GitHub 上创建 R 包发布清单 issue:
DESCRIPTION 文件的 R 包。usethis R 包。要启用自动 issue 创建,还需满足:
gh CLI。首先,检查前提条件是否满足(为提高效率,按此顺序检查):
DESCRIPTION 的文件。如果没有,通知用户必须从 R 包根目录运行此命令,然后停止。Rscript -e 'utils::packageVersion("usethis")' 检查是否安装了 包。如果没有,指导用户使用 安装,然后停止。广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
usethisinstall.packages("usethis")gh repo view --json url。如果失败,诊断错误:
gh,尝试运行 git remote -v 来查找 GitHub URL。usethis::use_github() 将包连接到 GitHub。询问用户是否要运行此命令;如果用户拒绝,则在没有 GitHub URL 的情况下继续。gh 但未认证,并且仓库有 GitHub 远程仓库,建议用户运行 gh auth login。如果任何检查失败,请向用户说明具体问题并提供清晰的修复说明,然后停止工作流程。在所有前提条件满足之前,不要继续下一步。
接下来,需要确定当前包的名称和版本。读取 DESCRIPTION 文件并从中提取 Version: 和 Package: 字段。
然后,检查是否存在 NEWS.md 文件。如果存在,读取第一部分(通常是最近未发布的更改)以了解进行了哪些类型的更改。使用此信息来建议合适的发布类型:
向用户显示当前版本,并使用 AskUserQuestion 工具询问他们这应该是什么类型的发布。将建议的发布类型设为第一个选项,并在标签后附加"(推荐)":
问题:"这是什么类型的发布?" 标题:"发布类型" 选项(推荐选项在前):
根据用户的回答,通过操作当前版本来计算新版本。例如:
1.2.3 + 主要发布 → 2.0.01.2.3 + 次要发布 → 1.3.01.2.3 + 补丁发布 → 1.2.40.2.1.9000 + 补丁发布 → 0.2.20.2.1.9003 + 次要发布 → 0.3.0注意:如果当前版本以 .9xxx 结尾(R 风格的开发版本),在计算新版本之前去掉此后缀。
显示:"正在为 ${PACKAGE_NAME} ${CURRENT_VERSION} → ${NEW_VERSION} 准备发布清单"。
使用此技能附带的 scripts/generate_checklist.R 脚本生成初始清单:
# 如果已知 GitHub URL:
Rscript "${SKILL_DIR}/scripts/generate_checklist.R" "${NEW_VERSION}" "${GITHUB_URL}"
# 否则:
Rscript "${SKILL_DIR}/scripts/generate_checklist.R" "${NEW_VERSION}"
(其中 ${SKILL_DIR} 代表此技能安装的目录。)
忽略输出中的任何 "Setting active project..." 行。
读取生成的清单(Markdown 格式)并显示给用户。
使用 AskUserQuestion 工具询问:
问题:"在创建 issue 之前,您想自定义清单吗?" 标题:"自定义?" 选项:
如果用户想要自定义清单,则进入迭代优化循环:
- [ ])。在整个过程中,清单应保持为 Markdown 字符串,以便轻松传递给 GitHub issue 创建命令。
最终清单应格式化为具有适当章节和复选框的 Markdown。
如果 gh 可用且已认证,使用它自行创建 GitHub issue,通过 stdin 直接传递清单内容:
gh issue create \
--title "Release ${PACKAGE_NAME} ${NEW_VERSION}" \
--body-file - <<'EOF'
[checklist content here]
EOF
然后向用户显示:
如果 gh 不可用,则向用户显示清单,并附上手动创建 GitHub issue 的说明:
如果 GitHub issue 创建失败(使用 gh 时),检查常见问题:
gh auth status 显示用户已登录。如果需要,建议运行 gh auth login。gh repo view 检查他们是否具有正确的权限。如果 issue 创建失败,请保留清单内容并提供以下选项:
每周安装量
91
仓库
GitHub 星标数
205
首次出现
2026年2月10日
安全审计
安装于
opencode84
github-copilot84
claude-code83
codex82
gemini-cli82
kimi-cli81
Generate a release checklist for an R package and create the corresponding GitHub issue.
This skill guides you through creating a R package release checklist issue on GitHub by:
DESCRIPTION file at the root.usethis R package must be available.And to enable automatic issue creation:
gh CLI must be installed and authenticated.First, check that the prerequisites are available (in this order for efficiency):
DESCRIPTION. If not, inform the user that this must be run from an R package root directory and stop.Rscript -e 'utils::packageVersion("usethis")' to check if the usethis package is installed. If not, instruct the user to install it with install.packages("usethis"), then stop.gh repo view --json url. If that fails, diagnose the error:
gh is not installed, try running git remote -v to find a GitHub URL.usethis::use_github(). Offer to run this command for the user; if they decline, continue without a GitHub URL.gh is installed but not authenticated and the repo has a GitHub remote, suggest that the user run gh auth login.If any check fails, inform the user of the specific issue with clear instructions on how to fix it, then stop the workflow. Do not proceed to the next step until all prerequisites are met.
Next, you need to determine the current package's name and version. Read the DESCRIPTION file and extract the Version: and Package: fields from it.
Then, check if a NEWS.md file exists. If it does, read the first section (typically the most recent unreleased changes) to understand what kind of changes have been made. Use this to suggest an appropriate release type:
Display the current version to the user and ask them what type of release this should be using the AskUserQuestion tool. Make the suggested release type the first option with "(Recommended)" appended to the label:
Question: "What type of release is this?" Header: "Release type" Options (with recommended option first):
Calculate the new version by manipulating the current version according to the user's answer. For example:
1.2.3 + Major release → 2.0.01.2.3 + Minor release → 1.3.01.2.3 + Patch release → 1.2.40.2.1.9000 + Patch release → 0.2.20.2.1.9003 + Minor release → 0.3.0Note: If the current version ends in .9xxx (R-style development versions), strip that suffix before calculating the new version.
Display: "Preparing release checklist for ${PACKAGE_NAME} ${CURRENT_VERSION} → ${NEW_VERSION}".
Generate an initial checklist using the scripts/generate_checklist.R script included with this skill:
# If the GitHub URL is known:
Rscript "${SKILL_DIR}/scripts/generate_checklist.R" "${NEW_VERSION}" "${GITHUB_URL}"
# Otherwise:
Rscript "${SKILL_DIR}/scripts/generate_checklist.R" "${NEW_VERSION}"
(Where ${SKILL_DIR} represents the directory where this skill is installed.)
Ignore any "Setting active project..." lines in the output.
Read the generated checklist (which is Markdown) and display it to the user.
Use the AskUserQuestion tool to ask:
Question: "Would you like to customize the checklist before creating the issue?" Header: "Customize?" Options:
If the user wants to customize the checklist, enter an iterative refinement loop:
- [ ] for tasks).The checklist should be maintained as a Markdown string throughout this process so it can be easily passed to the GitHub issue creation command.
The final checklist should be formatted as Markdown with proper sections and checkboxes.
Ifgh is available and authenticated, use it to create the GitHub issue yourself, passing the checklist content directly via stdin:
gh issue create \
--title "Release ${PACKAGE_NAME} ${NEW_VERSION}" \
--body-file - <<'EOF'
[checklist content here]
EOF
Then show the user:
Ifgh is not available, display the checklist to the user with instructions to manually create a GitHub issue:
If the GitHub issue creation fails (when using gh), check for common issues:
gh auth status shows the user is logged in. Suggest running gh auth login if needed.gh repo view to verify they have the correct permissions.If the issue creation fails, preserve the checklist content and offer to:
Weekly Installs
91
Repository
GitHub Stars
205
First Seen
Feb 10, 2026
Security Audits
Gen Agent Trust HubWarnSocketPassSnykPass
Installed on
opencode84
github-copilot84
claude-code83
codex82
gemini-cli82
kimi-cli81
Skills CLI 使用指南:AI Agent 技能包管理器安装与管理教程
43,100 周安装