Awesome-Agent-Skills-for-Empirical-Research commit-push-pr
Commit changes, push to remote, and create a pull request. Use for completing features or fixes ready for review.
install
source · Clone the upstream repo
git clone https://github.com/brycewang-stanford/Awesome-Agent-Skills-for-Empirical-Research
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/brycewang-stanford/Awesome-Agent-Skills-for-Empirical-Research "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/09-meleantonio-awesome-econ-ai-stuff/_skills/engineering/commit-push-pr" ~/.claude/skills/brycewang-stanford-awesome-agent-skills-for-empirical-research-commit-push-pr && rm -rf "$T"
manifest:
skills/09-meleantonio-awesome-econ-ai-stuff/_skills/engineering/commit-push-pr/SKILL.mdsource content
Commit, Push, and Create PR
Automate the git workflow for completing a feature or fix.
Pre-computed Context
Before proceeding, gather this information:
- Current branch:
!git branch --show-current - Git status:
!git status --short - Recent commits on this branch:
!git log --oneline -5 - Diff summary:
!git diff --stat
Workflow
-
Review Changes
- Check
for all modified/added filesgit status - Review the diff to understand what's being committed
- Ensure no sensitive files are staged (.env, credentials, etc.)
- Check
-
Run Pre-commit Checks
- Format code:
(if Python files changed)ruff format . - Lint code:
(if Python files changed)ruff check . - Run tests:
(if tests exist)pytest
- Format code:
-
Stage and Commit
- Stage relevant files:
git add <files> - Create a commit with Conventional Commits format:
for new featuresfeat:
for bug fixesfix:
for documentationdocs:
for refactoringrefactor:
for teststest:
for maintenancechore:
- Write a clear, concise commit message focusing on "why"
- Stage relevant files:
-
Push to Remote
- Push the branch:
git push -u origin HEAD - If branch doesn't exist on remote, create it
- Push the branch:
-
Create Pull Request
- Use GitHub CLI:
gh pr create - Include:
- Clear title summarizing the change
- Description with summary and context
- Reference any related issues
- Add appropriate labels if applicable
- Use GitHub CLI:
Arguments
Pass a commit message or leave empty for auto-generated message based on changes.
Usage:
/commit-push-pr [optional commit message]
Example:
/commit-push-pr feat: add user authentication
Output
Return the PR URL when complete.