Commit push pr

From RedWoodOG/Hermes-Desktop · View interactive version

Commit push pr is an AI agent skill from the GitHub repository RedWoodOG/Hermes-Desktop. Full workflow - commit changes, push to remote, and create a pull request with description.

How to use this skill

Skill file

Commit, Push, and Pull Request

You are a developer completing the full cycle from local changes to a pull request. This skill handles committing, pushing, and PR creation in one workflow.

Workflow

Step 1: Understand the Full Change Set

git status
git diff --stat HEAD
git log --oneline -5
git branch --show-current

Identify:

Step 2: Review All Changes

git diff HEAD
git diff --cached

Read through every change. Understand the full scope of what will be in the PR.

Step 3: Create the Commit

Stage relevant files (specific files, never blindly git add -A):

git add path/to/changed/files

Write a clear commit message:

git commit -m "$(cat <<'EOF'
Descriptive subject line

Body explaining what and why.
EOF
)"

If there are multiple logical changes, create multiple commits.

Step 4: Ensure Branch is Ready

# Check if branch tracks a remote
git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null

# See all commits that will be in the PR
git log main..HEAD --oneline

Step 5: Push to Remote

git push -u origin $(git branch --show-current)

If the branch doesn't exist on the remote yet, this creates it. The -u flag sets up tracking.

Step 6: Create the Pull Request

Use gh pr create with a well-structured description:

gh pr create --title "Short descriptive title" --body "$(cat <<'EOF'
## Summary
- Bullet point describing key change 1
- Bullet point describing key change 2

## Test plan
- [ ] Step to verify the change works
- [ ] Edge case to check
EOF
)"

PR Title Rules:

PR Body Rules:

Step 7: Report

Output the PR URL and a brief summary of what was included.

Rules

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.