/cpr
Create commit, push, and open pull request
How it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/cpr
Context preview
What this command does when you run it.
Create commit, push, and open pull request
Command definition
cpr.mdallowed-tools: Bash(git status:*), Bash(git diff:*), Bash(git add:*), Bash(git commit:*), Bash(git push:*), Bash(git branch:*), Bash(gh pr create:*), Bash(git log:*)
name: "Cpr"
description: "Create commit, push, and open pull request"
author: "wcygan"
tags: ["tool"]
version: "1.0.0"
created_at: "2025-07-14T00:00:00Z"
updated_at: "2025-07-14T00:00:00Z"
Context
- Current git status: !`git status --porcelain`
- Current branch: !`git branch --show-current`
- Remote tracking: !`git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null || echo "No upstream branch"`
- Recent commits: !`git log --oneline -5`
Your task
PROCEDURE create_commit_push_pr():
STEP 1: Analyze current state
- IF no staged changes:
- Review unstaged changes: !`git diff --stat`
- Stage appropriate files: git add <files>
- ELSE:
- Review staged changes: !`git diff --cached --stat`
STEP 2: Create commit
- IF $ARGUMENTS provided:
- Use as commit message
- ELSE:
- Analyze changes: !`git diff --cached`
- Generate conventional commit message
- Execute: git commit -m "$(cat <<'EOF'
[Generated or provided message] EOF )"
STEP 3: Push to remote
- Current branch: !`git branch --show-current`
- IF no upstream branch:
- Push with upstream: git push -u origin [branch-name]
- ELSE:
- Push normally: git push
STEP 4: Create pull request
- Base branch: Determine from git config or default to main
- Generate PR title from commit message
- Create PR: gh pr create --title "[title]" --body "$(cat <<'EOF'
Summary
[Brief description of changes]
Changes
- [Key change 1]
- [Key change 2]
Test Plan
- [ ] Tests pass
- [ ] Manual testing completed
EOF )"
STEP 5: Return result
- Display PR URL
- Provide next steps if needed
Read more
allowed-tools: Bash(git status:*), Bash(git diff:*), Bash(git add:*), Bash(git commit:*), Bash(git push:*), Bash(git branch:*), Bash(gh pr create:*), Bash(git log:*) name: "Cpr" description: "Create commit, push, and open pull request" author: "wcygan" tags: ["tool"] version: "1.0.0" created_at: "2025-07-14T00:00:00Z" updated_at: "2025-07-14T00:00:00Z"
Context
- Current git status: !`git status --porcelain`
- Current branch: !`git branch --show-current`
- Remote tracking: !`git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null || echo "No upstream branch"`
- Recent commits: !`git log --oneline -5`
Your task
PROCEDURE create_commit_push_pr():
STEP 1: Analyze current state
- IF no staged changes:
- Review unstaged changes: !`git diff --stat`
- Stage appropriate files: git add <files>
- ELSE:
- Review staged changes: !`git diff --cached --stat`
STEP 2: Create commit
- IF $ARGUMENTS provided:
- Use as commit message
- ELSE:
- Analyze changes: !`git diff --cached`
- Generate conventional commit message
- Execute: git commit -m "$(cat <<'EOF'
[Generated or provided message] EOF )"
STEP 3: Push to remote
- Current branch: !`git branch --show-current`
- IF no upstream branch:
- Push with upstream: git push -u origin [branch-name]
- ELSE:
- Push normally: git push
STEP 4: Create pull request
- Base branch: Determine from git config or default to main
- Generate PR title from commit message
- Create PR: gh pr create --title "[title]" --body "$(cat <<'EOF'
Summary
[Brief description of changes]
Changes
- [Key change 1]
- [Key change 2]
Test Plan
- [ ] Tests pass
- [ ] Manual testing completed
EOF )"
STEP 5: Return result
- Display PR URL
- Provide next steps if needed
A lightweight (~46kB) and comprehensive CLI tool for managing Claude commands, configurations, and workflows.
Repo: kiliczsh/claude-cmd
Other commands on claude-cmd.
- /agent-browser-automation
Automate browser interactions for development testing using Puppeteer MCP
Open command - /agent-prep-merge
Prepare branches for merging across multiple worktrees and coordinate integration
Open command - /agent-persona-accessibility-expert
Transform into accessibility expert for WCAG compliance and inclusive design
Open command - /agent-persona-api-designer
Transform into an API design specialist who creates well-structured, developer-friendly APIs
Open command - /agent-persona-backend-specialist
Transform into backend specialist for scalable API and system design
Open command - /agent-persona-cloud-architect
Cloud architect persona for designing scalable, secure cloud infrastructure using modern cloud-native technologies
Open command

