com um clique
commit-push-pr
Validate code, commit, push, and create PR if needed
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Menu
Validate code, commit, push, and create PR if needed
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Baseado na classificação ocupacional SOC
| name | commit-push-pr |
| description | Validate code, commit, push, and create PR if needed |
This skill ensures code quality, commits, pushes, and creates a PR if one doesn't exist.
cd backend && cargo fmt --check
If this fails, run cargo fmt to auto-fix, then re-check.
cd backend && cargo clippy --workspace --all-targets --all-features -- -D warnings
If clippy fails, fix the issues before proceeding. Do NOT commit code with clippy warnings.
cd backend && cargo test --workspace
If tests fail, fix the failing tests before proceeding. Do NOT commit code with failing tests.
git status
Review what will be committed. If there are no changes to commit, skip to Step 8 (PR creation).
git add -A
Ask the user for a commit message, or generate one based on the changes.
IMPORTANT: Never include:
git push origin HEAD
If push fails due to upstream changes:
git pull --rebase origin HEAD && git push origin HEAD
gh pr list --head $(git branch --show-current) --state open
If a PR already exists for this branch, inform the user and provide the PR URL. Done.
Get the current branch and base branch:
CURRENT_BRANCH=$(git branch --show-current)
Create the PR:
gh pr create --title "PR title here" --body "$(cat <<'EOF'
## Summary
- Brief description of changes
## Test plan
- [ ] Tests pass
- [ ] Lints pass
EOF
)"
PR Title: Generate from the commit message or ask user.
PR Body: Include:
Do NOT include "Generated with Claude Code" or similar.
Provide the PR URL to the user.
If ANY step fails (fmt, clippy, or tests):
# Full validation
cd backend && cargo fmt --check && cargo clippy --workspace --all-targets --all-features -- -D warnings && cargo test --workspace
# Check for existing PR
gh pr list --head $(git branch --show-current) --state open
# Create PR
gh pr create --title "Title" --body "Body"
Quickly commit, push, and create a PR while leaving validation to GitHub checks
Quickly commit and push local changes while leaving validation to GitHub checks
Step-by-step guide for adding new pages to the Yew frontend
Step-by-step guide for adding new OAuth integrations to Lightfriend
Step-by-step guide for modifying database schema using Diesel migrations
Run formatting and linting checks on the codebase