Commit, push, open a PR
Scanned 6/5/2026
Install via CLI
openskills install channingwalton/dotfiles---
name: push
allowed-tools: Bash(git *), Bash(gh *), Bash(devtool *)
description: Commit, push, open a PR
---
## Context
- Current git status: !`git status`
- Changed files (stat): !`git diff HEAD --stat`
- Diff (capped to 6k): !`git diff HEAD | head -c 6000`
- Current branch: !`git branch --show-current`
- Recent commit messages (for style matching): !`git log --oneline -10`
## Your task
Based on the above changes:
1. If there are no changes to commit, stop and tell the user.
2. If on main, create a new branch with a descriptive name based on the changes. Before `git checkout -b <name>`, run `git branch --list <name>` and `gh pr list --head <name> --state all` — if the branch exists locally or the name has a closed PR, surface that to the user and ask whether to archive (rename), force-push, or pick a new name. Never silently overwrite.
3. Stage all relevant changes (never stage files that likely contain secrets like .env, credentials.json, etc.).
4. Create a single commit with a concise, conventional commit message. End the message with:
`Co-Authored-By: Claude <noreply@anthropic.com>`
5. Push the branch to origin with `-u`.
6. Create a pull request using `gh pr create` with a short title and a body containing:
- `## Summary` with 1-3 bullet points
- `## Test plan` with a checklist
7. Print the PR URL to the user.
No comments yet. Be the first to comment!