Claude Code Skill (Slash Command): push-and-pull-request.md

A Claude Code skill (slash command) to open a PR after committing all outstanding changes and pushing them.

Prompts Chat Republished on Sep 15 0 Bookmarks 0 Copies
Bookmark 0

Prompt template

Format
Yaml
Outputs
result (text)
---
allowed-tools: Bash(git add:*), Bash(git status:*), Bash(git commit:*), Bash(git push:*), Bash(gh pr create:*)
description: Commit and push everything then open a PR request to main
---

## Context

- Current git status: !`git status`
- Current git diff (staged and unstaged changes): !`git diff HEAD`
- Current branch: !`git branch --show-current`
- Recent commits: !`git log --oneline -10`

## Your task

1. Review the existing changes and then create a git commit following the conventional commit format. If you think there are more than one distinct change you can create multiple commits. If there are no outstanding changes proceed to 2.
2. Push all commits.
3. Open a PR to main following the conventional formats.

What you'll create

The workflow considers the working diff, branch and recent history. Distinct concerns may become separate commits before the PR is created.

Frequently asked questions

Must all unrelated concerns be forced into one commit?

No. The source permits multiple commits for distinct changes.

Comments

Tried this prompt? Share what you made, compare results, or ask a question

Up to 4 results. Images up to 2 MB; MP4, WebM, or MOV videos up to 4 MB each