create-pull-request
БесплатноБез исполняемых скриптовНе проверенCreate a GitHub pull request following project conventions. Use when the user asks to create a PR, submit changes for review, or open a pull request. Handles…
от warpdotdev★ 821 звезда на GitHubОб этом скилле
Create Pull Request
This skill guides you through creating a well-structured GitHub pull request that follows project conventions and best practices.
Prerequisites Check
Before proceeding, verify the following:
1. Check if gh CLI is installed
gh --version
If not installed, inform the user:
The GitHub CLI (
gh) is required but not installed. Please install it:
- macOS:
brew install gh- Other: https://cli.github.com/
2. Check if authenticated with GitHub
gh auth status
If not authenticated, guide the user to run gh auth login.
3. Check for related skills
Before creating a PR, check if any skills are available that relate to code review, CI, or testing. These should be invoked first as prerequisites.
Look for skills with descriptions containing:
- "review" (e.g., code review, PR review, web-design-guidelines)
- "CI" or "ci-fix" (e.g., fixing CI failures)
- "testing" or "test" (e.g., running tests, webapp-testing)
If such skills exist, invoke them before proceeding with PR creation. For example:
- If a
ci-fixskill exists and CI is failing, use it to diagnose and fix issues - If a
web-design-guidelinesskill exists for UI changes, use it to review the changes - If a testing skill exists, use it to ensure tests pass
Only proceed with PR creation after these prerequisite skills have been satisfied.
4. Verify clean working directory
git status
If there are uncommitted changes, ask the user whether to:
- Commit them as part of this PR
- Stash them temporarily
- Discard them (with caution)
Check for Existing PR
Before gathering context, check if a PR already exists for the current branch:
gh pr list --head $(git branch --show-current) --json number,title,url
If a PR already exists:
- Display the existing PR details (number, title, URL)
- Ask the user if they want to:
- View the existing PR:
gh pr view - Update the existing PR (push more commits and the PR will update automatically)
- Close the existing PR and create a new one
- View the existing PR:
Only proceed with creating a new PR if no PR exists for this branch.
Gather Context
1. Identify the current branch
git branch --show-current
Ensure you're not on main or master. If so, ask the user to create or switch to a feature branch.
2. Find the base branch
git remote show origin | grep "HEAD branch"
This is typically main or master.
3. Analyze recent commits relevant to this PR
git log origin/main..HEAD --oneline --no-decorate
Review these commits to understand:
- What changes are being introduced
- The scope of the PR (single feature/fix or multiple changes)
- Whether commits should be squashed or reorganized
4. Review the diff
git diff origin/main..HEAD --stat
This shows which files changed and helps identify the type of change.
Information Gathering
Gather the following information from available context (commit messages, branch names, changed files):
Information to Extract
Related Issue Number: Look for patterns like
#123,fixes #123, orcloses #123in:- Commit messages
- Branch name (e.g.,
fix/issue-123,feature/123-new-login) - If found, include it in the PR title and/or description
- If not found, proceed without it
Description: What problem does this solve? Why were these changes made?
- Infer from commit messages and diff
- Describe the changes made
Type of Change: Bug fix, new feature, breaking change, refactor, cosmetic, documentation, or workflow
- Determine from commit messages and changed files
Test Procedure: How was this tested? What could break?
- Mention test files if they were modified
- Describe testing approach if evident from changes
Intelligent PR Title Generation
The PR title should be descriptive and meaningful. Avoid generic titles like:
- "initial commit"
- "fix"
- "update"
- "changes"
Instead, create a title that clearly summarizes the changes. Consider these approaches:
1. Conventional Commits Format
Check if the project uses conventional commits by analyzing:
- Commit messages for patterns like
feat:,fix:,docs:,refactor:,test:,chore: - Branch name prefixes like
feat/,fix/,docs/
If conventional commits are detected, use the appropriate prefix for the PR title:
feat: Add user authentication with OAuthfix: Resolve memory leak in data processingdocs: Update API documentation for v2 endpointsrefactor: Simplify error handling logictest: Add integration tests for payment flowchore: Update dependencies to latest versions
Include issue number if found:
feat: Add user authentication with OAuth (#123)fix(auth): Resolve memory leak in data processing (fixes #456)
2. Descriptive Summary
If not using conventional commits, create a clear, action-oriented title:
- Good: "Add pagination to sea
Установить create-pull-request в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл create-pull-request?
Create a GitHub pull request following project conventions. Use when the user asks to create a PR, submit changes for review, or open a pull request. Handles commit analysis, branch management, and PR creation using the gh CLI tool.
Как установить скилл create-pull-request?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл create-pull-request запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic