{"id":"create-release-checklist","name":"create-release-checklist","summary":"Rパッケージ用のリリースチェックリストとGitHubのイシューを作成します。ユーザーがRパッケージの「リリースチェックリストを作成」や「リリースを開始する」と尋ねた際に使います。","body":"# Create an R Package Release Checklist\n\nGenerate a release checklist for an R package and create the corresponding\nGitHub issue.\n\n## Overview\n\nThis skill guides you through creating a R package release checklist issue on\nGitHub by:\n\n- Determining the current version and prompting for release type.\n- Generating an initial checklist.\n- Prompting the user for additional customization.\n- Creating a GitHub issue from the final checklist.\n\n## Prerequisites\n\n- The working directory must be an R package with a `DESCRIPTION` file at the\n  root.\n- The `usethis` R package must be available.\n\nAnd to enable automatic issue creation:\n\n- The `gh` CLI must be installed and authenticated.\n- The R package must be associated with a GitHub repository.\n\n## Workflow\n\n### Step 1: Validation\n\nFirst, check that the prerequisites are available (in this order for\nefficiency):\n\n1. Check that the working directory contains a file called `DESCRIPTION`. If\n   not, inform the user that this must be run from an R package root directory\n   and stop.\n2. Use `Rscript -e 'utils::packageVersion(\"usethis\")'` to check if the `usethis`\n   package is installed. If not, instruct the user to install it with\n   `install.packages(\"usethis\")`, then stop.\n3. Determine the GitHub URL for the repository, if one exists. First try\n   `gh repo view --json url`. If that fails, diagnose the error:\n   - If `gh` is not installed, try running `git remote -v` to find a GitHub URL.\n   - If the local repo does not have a GitHub remote, suggest the user connect\n     the package to GitHub using `usethis::use_github()`. Offer to run this\n     command for the user; if they decline, continue without a GitHub URL.\n   - If `gh` is installed but not authenticated and the repo has a GitHub\n     remote, suggest that the user run `gh auth login`.\n\nIf any check fails, inform the user of the specific issue with clear\ninstructions on how to fix it, then stop the workflow. Do not proceed to the\nnext step until all prerequisites are met.\n\n### Step 2: Initialization\n\nNext, you need to determine the current package's name and version. Read the\n`DESCRIPTION` file and extract the `Version:` and `Package:` fields from it.\n\nThen, check if a `NEWS.md` file exists. If it does, read the first section\n(typically the most recent unreleased changes) to understand what kind of\nchanges have been made. Use this to suggest an appropriate release type:\n\n- If the NEWS mentions \"breaking changes\", \"breaking\", \"BREAKING\", or similar\n  language, suggest a **Major** release.\n- If the NEWS mentions only \"bug fixes\", \"fixes\", \"patch\", or similar language\n  with no new features, suggest a **Patch** release.\n- Otherwise (new features, improvements, enhancements), suggest a **Minor**\n  release.\n\nDisplay the current version to the user and ask them what type of release this\nshould be using the AskUserQuestion tool. Make the suggested release type the\nfirst option with \"(Recommended)\" appended to the label:\n\nQuestion: \"What type of release is this?\"\nHeader: \"Release type\"\nOptions (with recommended option first):\n- Major (X.0.0) - Breaking changes (add \"(Recommended)\" if suggested)\n- Minor (x.X.0) - New features but without breaking changes (add \"(Recommended)\" if suggested)\n- Patch (x.x.X) - Bug fixes only (add \"(Recommended)\" if suggested)\n\nCalculate the new version by manipulating the current version according to the\nuser's answer. For example:\n\n- Current version `1.2.3` + Major release → `2.0.0`\n- Current version `1.2.3` + Minor release → `1.3.0`\n- Current version `1.2.3` + Patch release → `1.2.4`\n- Current version `0.2.1.9000` + Patch release → `0.2.2`\n- Current version `0.2.1.9003` + Minor release → `0.3.0`\n\nNote: If the current version ends in `.9xxx` (R-style development versions),\nstrip that suffix before calculating the new version.\n\nDisplay: \"Preparing release checklist for ${PACKAGE_NAME} ${CURRENT_VERSION} →\n${NEW_VERSION}\".\n\n### Step 3: Checklist Generation\n\nGenerate an initial checklist using the `scripts/generate_checklist.R` script\nincluded with this skill:\n\n```bash\n# If the GitHub URL is known:\nRscript \"${SKILL_DIR}/scripts/generate_checklist.R\" \"${NEW_VERSION}\" \"${GITHUB_URL}\"\n\n# Otherwise:\nRscript \"${SKILL_DIR}/scripts/generate_checklist.R\" \"${NEW_VERSION}\"\n```\n\n(Where `${SKILL_DIR}` represents the directory where this skill is installed.)\n\nIgnore any \"Setting active project...\" lines in the output.\n\nRead the generated checklist (which is Markdown) and display it to the user.\n\n### Step 4: User Customization\n\nUse the AskUserQuestion tool to ask:\n\nQuestion: \"Would you like to customize the checklist before creating the issue?\"\nHeader: \"Customize?\"\nOptions:\n- No, create the issue as-is\n- Yes, let me customize it\n\nIf the user wants to customize the checklist, enter an iterative refinement loop:\n\n1. Ask: \"Suggest items that should be added or any items that can be safely\n   removed, or confirm that there are no more changes requested.\"\n2. Based on the user's feedback, update the checklist (add items, remove items,\n   reword items, etc.). Keep the checklist in Markdown format with proper\n   checkbox syntax (`- [ ]` for tasks).\n3. Display the updated checklist to the user.\n4. Ask: \"Does this look good or do you have more suggestions?\"\n5. If the user has more suggestions, go back to step 2. If the user confirms it\n   looks good, exit the loop and proceed to Step 5.\n\nThe checklist should be maintained as a Markdown string throughout this process\nso it can be easily passed to the GitHub issue creation command.\n\n### Step 5: GitHub Issue Creation\n\nThe final checklist should be formatted as Markdown with proper sections and\ncheckboxes.\n\n**If `gh` is available and authenticated**, use it to create the GitHub issue\nyourself, passing the checklist content directly via stdin:\n\n```bash\ngh issue create \\\n  --title \"Release ${PACKAGE_NAME} ${NEW_VERSION}\" \\\n  --body-file - <<'EOF'\n[checklist content here]\nEOF\n```\n\nThen show the user:\n\n- A success message with the issue URL.\n- The suggestion \"You can now use the 'do-release-checklist' skill to walk\n  through the checklist tasks.\" (Note: This is a companion skill that helps\n  guide users through executing the checklist items. If this skill doesn't exist\n  yet in your repository, you may omit this suggestion.)\n\n**If `gh` is not available**, display the checklist to the user with\ninstructions to manually create a GitHub issue:\n\n- Show the suggested issue title: \"Release ${PACKAGE_NAME} ${NEW_VERSION}\"\n- Show the full checklist content formatted as Markdown.\n- Instruct the user to copy the content and create the issue manually at their\n  repository's issues page.\n\n## Error Handling\n\nIf the GitHub issue creation fails (when using `gh`), check for common issues:\n\n- **Authentication errors**: Ensure `gh auth status` shows the user is logged in.\n  Suggest running `gh auth login` if needed.\n- **Repository permissions**: The user must have write access to create issues.\n  Check with `gh repo view` to verify they have the correct permissions.\n- **Network errors**: If there are connectivity issues, suggest retrying the\n  command or checking their internet connection.\n- **Invalid Markdown**: If the issue body has formatting errors, verify the\n  checklist Markdown is properly formatted with valid syntax.\n\nIf the issue creation fails, preserve the checklist content and offer to:\n\n- Retry the command.\n- Display the checklist for manual issue creation instead.","author":"@posit-dev","ownerProfile":null,"authorContacts":null,"sourceUrl":"https://github.com/posit-dev/skills/tree/main/open-source/create-release-checklist","license":"MIT","category":"productivity","lang":"en","tokens":1737,"stars":0,"calls30d":2,"claimed":false,"visibility":"public","origin":"crawler","version":"0.1.0","createdAt":"2026-08-22","updatedAt":"2026-08-22","files":[{"path":"scripts/generate_checklist.R","size":1209,"sha256":"59bb6a72b7cd6fe5c489ccdc1984b9a942b91cf22470037a24e7bca1cbb7820a"}],"requires":{"mcp":[],"tools":["Read","Bash","AskUserQuestion"]},"safety":{"flags":[],"scannedAt":"2026-08-22","hasScripts":false,"networkEndpoints":[]}}