本文へ移動
cccskills
無料GitHub で公開

github-pr-creation

Creates GitHub Pull Requests with automated validation and task tracking. Use when user wants to create PR, open pull request, submit for review, or check if ready for PR. Analyzes commits, validates task completion, generates Conventional Commits title and description, suggests labels. NOTE - for merging existing PRs, use github-pr-merge instead.

インストール方法を見る

含まれるファイル(2)

  • SKILL.md5.7 KB
  • references/pr_templates.md3.0 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

GitHub PR creation

Creates Pull Requests with task validation, test execution, and Conventional Commits formatting.

Current state

!git rev-parse --abbrev-ref HEAD 2>/dev/null !git log @{u}..HEAD --oneline 2>/dev/null || echo "(no upstream tracking)"

Core workflow

1. Confirm target branch

ALWAYS ask user before proceeding:

Creating PR from [current-branch] to [target-branch]. Correct?
Branch flowTypical target
feature/*develop
fix/*develop
hotfix/*main/master
developmain/master

2. Search for task documentation

Look for task/spec files that describe what this PR should accomplish. Common locations by tool:

Tool/ConventionPath
Spec2Ship (s2s).s2s/plans/*.md (look for active plan matching branch name or commits)
AWS Kiro.kiro/specs/*/tasks.md
Cursor.cursor/rules/*.md, .cursorrules
Trae.trae/rules/*.md
GitHub Issuesgh issue list --assignee @me --state open
Genericdocs/specs/, specs/, tasks.md, TODO.md

Extract task IDs, titles, descriptions, and requirements references when found.

3. Analyze commits

For each commit on this branch, identify type, scope, task references, and breaking changes. Map commits to documented tasks when task files exist.

4. Verify task completion

If task documentation exists:

  1. Identify main task from branch name (e.g., feature/task-2-* -> Task 2)
  2. Find all sub-tasks (e.g., Task 2.1, 2.2, 2.3)
  3. Check which sub-tasks are referenced in commits
  4. Report missing sub-tasks

If tasks incomplete, STOP and show status:

Task 2 INCOMPLETE: 1/3 sub-tasks missing
- Task 2.1: done
- Task 2.2: done
- Task 2.3: MISSING

Ask user whether to complete missing tasks or proceed anyway.

5. Run tests

Run the project test suite. Tests MUST pass before creating PR.

6. Determine PR type and generate title

Branch flowTitle prefix
feature/* -> developfeat(scope):
fix/* -> developfix(scope):
hotfix/* -> mainhotfix(scope):
develop -> mainrelease:
refactor/* -> developrefactor(scope):
chore/* -> developchore(scope):
ci/* -> developci(scope):
docs/* -> developdocs(scope):

Title format: <type>(<scope>): <description>

  • Type: dominant commit type from analysis (feat > fix > refactor > ci > chore)
  • Scope: most common scope from commits (kebab-case)
  • Description: imperative, lowercase, no period, max 50 chars

Breaking changes: if any commit contains BREAKING CHANGE: or ! after type:

  • Add breaking label if it exists in the project
  • Include a ## Breaking changes section in the PR body

7. Generate PR body

Use the appropriate template from references/pr_templates.md based on PR type and populate with gathered data.

8. Suggest labels

ALWAYS check available labels first:

gh label list

Match commit types to available project labels. The project may use different names than standard (e.g., "feature" instead of "enhancement").

Commit typeCommon label names
featfeature, enhancement
fixbug, bugfix
refactorrefactoring, tech-debt
docsdocumentation
cici/cd, infrastructure
securitysecurity
hotfixurgent, priority:high

If no matching label exists: suggest creating one. The user may have removed default labels, so offering to add relevant ones is appropriate.

9. Determine milestone

Check for open milestones:

gh api repos/$(gh repo view --json nameWithOwner -q '.nameWithOwner')/milestones \
  --jq '.[] | select(.state == "open") | "\(.number): \(.title)"'
  • If one active milestone exists: assign the PR to it (all work in progress belongs to the next release)
  • If multiple milestones exist: ask the user which one applies
  • If no milestones exist: skip (do not create one automatically)

10. Create PR

ALWAYS show title, body, labels, and milestone for user approval first.

gh pr create \
  --title "[title]" \
  --body "$(cat <<'EOF'
[body content]
EOF
)" \
  --base [base_branch] \
  --label "[label1]" --label "[label2]" \
  --milestone "[milestone-title]" \
  --reviewer "[username]"          # if teammates are known

Use --draft if the PR is not ready for merge review yet (work in progress, awaiting CI, or created only to trigger AI bot review on the branch).

Important rules

  • ALWAYS confirm target branch with user
  • ALWAYS run tests before creating PR
  • ALWAYS show PR content for approval before creating
  • ALWAYS check available labels with gh label list before suggesting
  • ALWAYS use HEREDOC for body to preserve formatting
  • ALWAYS add --label for each label separately (not comma-separated in one string)
  • ALWAYS check for open milestones and assign if one is active
  • NEVER create PR without user confirmation
  • NEVER modify repository files (read-only analysis)
  • NEVER create a milestone automatically - only assign existing ones
  • Use --draft for PRs not ready for merge review
  • Use --reviewer when teammates are known from team config or CODEOWNERS

References

  • references/pr_templates.md - PR body templates for all types (feature, release, bugfix, hotfix, refactoring, docs, CI/CD)

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Guide for creating Claude Code skills following Anthropic's official best practices. Use when user wants to create a new skill, build a skill, write SKILL.md, update an existing skill, or needs skill creation guidelines. Provides structure, frontmatter fields, naming conventions, and new features like dynamic context injection and subagent execution.

日本語の概要は準備中です。原文の説明を表示しています。

fvadicamo/dev-agent-skills722026年9月12日 更新

Creates, supersedes and validates decision records (ADRs) against the convention a collection already follows, instead of imposing a published one. Use when the user wants to record a decision, write an ADR, supersede an existing decision, audit or lint a decisions folder, check that an ADR index is in sync, or asks "why did we decide X". Deduces the filename scheme, section set and status vocabulary from the records already there; ships a validator with an exit code, so the audit is a check and not an opinion.

日本語の概要は準備中です。原文の説明を表示しています。

fvadicamo/dev-agent-skills722026年9月12日 更新

Creates git commits following Conventional Commits format with type/scope/subject. Use when user wants to commit changes, create commit, save work, or stage and commit. Enforces project-specific conventions from CLAUDE.md.

日本語の概要は準備中です。原文の説明を表示しています。

fvadicamo/dev-agent-skills722026年9月12日 更新

Merges GitHub Pull Requests after validating pre-merge checklist. Use when user wants to merge PR, close PR, finalize PR, complete merge, approve and merge, or execute merge. Runs pre-merge validation (tests, lint, CI, comments), confirms with user, merges with proper format, handles post-merge cleanup.

日本語の概要は準備中です。原文の説明を表示しています。

fvadicamo/dev-agent-skills722026年9月12日 更新

Handles PR review comments and feedback resolution. Use when user wants to resolve PR comments, handle review feedback, fix review comments, address PR review, check review status, respond to reviewer, verify PR readiness, review PR comments, analyze review feedback, evaluate PR comments, assess review suggestions, or triage PR comments. Fetches comments via GitHub CLI, classifies by severity, applies fixes with user confirmation, commits with proper format, replies to threads.

日本語の概要は準備中です。原文の説明を表示しています。

fvadicamo/dev-agent-skills722026年9月12日 更新

Prevents private infrastructure details (node hostnames, internal project names, local usernames and personal emails, absolute home paths, private and VPN IP ranges) from leaking into public repositories through commits, PRs, docs or release artifacts. Use when working in a public or soon-to-be-public repo, before commits or releases, when writing deployment docs for an OSS project, or when the user asks to "set up the privacy guard", "install privacy-guard", "check for leaks", "protect this public repo". Bootstraps a pre-commit hook backed by a gitignored local denylist plus gitleaks.

日本語の概要は準備中です。原文の説明を表示しています。

fvadicamo/dev-agent-skills722026年9月12日 更新

fvadicamo のスキルをすべて見る

このスキルの問題を報告する