git-commit-push-pr
БесплатноБез исполняемых скриптовНе проверенEnd-to-end commit-to-PR workflow. Use when the user says "create pr", "commit and pr", "push and pr", or wants to go from uncommitted changes to an open PR.
от laurigates★ 61 звезда на GitHubОб этом скилле
When to Use This Skill
| Use this skill when... | Use X instead when... |
|---|---|
| Going from uncommitted changes to an open PR in one step | Creating commits only with no push or PR (/git:commit) |
| Auto-detecting issues, committing, pushing, and opening a PR together | Pushing existing commits to a remote without opening a PR (/git:push) |
| Running the full commit-push-PR pipeline non-interactively | Opening a PR from already-pushed commits (/git:pr) |
Context
- Pre-commit config: !
find . -maxdepth 1 -name ".pre-commit-config.yaml" - Current branch: !
git branch --show-current - Git status: !
git status --porcelain=v2 --branch - Unstaged changes: !
git diff --numstat - Staged changes: !
git diff --cached --numstat - Recent commits: !
git log --format='%h %s' --max-count=10 - Git remotes: !
git remote -v
Available labels and open issues are fetched during execution (requires a configured git remote).
Parameters
Parse these parameters from the command (all optional):
$1: Remote branch name to push to (e.g.,feat/auth-oauth2). If not provided, auto-generate from first commit type. Ignored with--direct.--push: Automatically push after commits--direct: Push current branch directly to same-named remote (e.g.,git push origin main). Mutually exclusive with--pr.--pr/--pull-request: Create pull request after pushing (implies --push, uses feature branch pattern)--draft: Create as draft PR (requires --pr)--issue <num>: Link to specific issue number (requires --pr)--no-commit: Skip commit creation (assume commits already exist)--range <start>..<end>: Push specific commit range instead of all commits--labels <label1,label2>: Apply labels to the created PR (requires --pr)--skip-issue-detection: Skip automatic issue detection (use when --issue is provided or for trivial changes)
Your task
IMPORTANT: Execute all steps continuously without pausing to ask for confirmation between steps. This is a complete workflow — commit, push, and PR creation flow as a single operation. Do not stop after committing to ask whether to push or create a PR; proceed through all applicable steps.
Step 1: Verify State and Prepare Branch
- Check for changes: Confirm there are staged or unstaged changes to commit (unless --no-commit)
- Prepare branch:
- If
--direct: any branch is valid, stay on current branch - If on main/master: create a local feature branch before committing. Auto-generate the name from the changes (e.g.,
fix/handle-timeout-edge-case,feat/add-oauth-support). Usegit checkout -b <branch-name>. - If already on a feature branch: stay on it
- If
Step 2: Auto-Detect Related Issues (unless --skip-issue-detection or --issue provided)
Follow references/issue-detection.md to match the staged changes against open issues and pick Refs for the commit (Step 3) and Fixes / Closes / Refs for the PR body (Step 5b).
Step 3: Create Commits (unless --no-commit)
- Analyze changes and detect if splitting into multiple PRs is appropriate
- Group related changes into logical commits
- Stage changes: Use
git add -ufor modified files,git add <file>for new files - Run pre-commit hooks if configured:
pre-commit run - Handle pre-commit modifications: Stage any files modified by hooks with
git add -u - Create commit with conventional commit message format
- Include detected issue references from Step 2 in the commit message footer as
Refs #N:- Add high-confidence matches automatically
- Include medium-confidence matches if confirmed
- Never a closing keyword in a commit message.
Fixes #Nthere closes the issue when the commit lands on the default branch, whatever the PR body says, and under squash withCOMMIT_MESSAGESevery branch commit message lands in the squash body. The closing keyword goes in the PR body (Step 5b); theno-closing-keywordscommit-msg hook rejects it in a commit.
- ALWAYS include GitHub issue references in commit messages (
Refs #N): Keyword catalogue (closing, reference-only, cross-repo, multiple issues): references/workflow-guidance.md.
Step 4: Push to Remote (if --push or --pr)
If --direct: Push current branch to same-named remote:
# Direct push to current branch
git push origin HEAD
Otherwise (feature branch — created in Step 1 or pre-existing):
# Push the current feature branch and set upstream
git push -u origin $(git branch --show-current)
Step 5: Create PR (if --pr)
5a. Identify post-merge follow-up actions.
Before creating the PR, scan commit messages, diff context, and any conversation context for actions that must happen after the PR is merged:
| Signal | Examples |
|---|---|
| Commit mess |
Установить git-commit-push-pr в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Bash(git status *)Bash(git diff *)Bash(git log *)Bash(git add *)Bash(git commit *)Bash(git push *)Bash(git branch *)Bash(git remote *)Bash(gh pr *)Bash(gh label *)Bash(gh repo *)Bash(gh issue *)Bash(pre-commit *)Bash(python3 *)Bash(find *)ReadEditGrepGlobTodoWritemcp__github__create_pull_requestmcp__github__list_issuesmcp__github__get_issueВложенные файлы
FAQ
Что делает скилл git-commit-push-pr?
End-to-end commit-to-PR workflow. Use when the user says "create pr", "commit and pr", "push and pr", or wants to go from uncommitted changes to an open PR.
Как установить скилл git-commit-push-pr?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл git-commit-push-pr запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic