commit-pr-workflow

Executes commit, push, and pull request workflows following repository conventions.

Updated Apr 8, 2017
One-click install
npx skills add https://github.com/localmin/dotfiles --skill commit-pr-workflow-localmin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: commit-pr-workflow
Source: https://github.com/localmin/dotfiles/tree/main/coding-agents/skills/commit-pr-workflow
Command: npx skills add https://github.com/localmin/dotfiles --skill commit-pr-workflow-localmin

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Committing, pushing, and creating pull requests involves many environment-specific conventions—commit granularity, message formats, review gates, and branch-vs-direct-commit policies—that are easy to get wrong or execute out of order. This Skill encodes the correct sequence so each phase runs exactly as the repository's rules require. ## Core Features & Use Cases - Phased execution: Commit and push are separate phases; it runs only the phase requested and stops, never auto-pushing after a commit. - Repository policy detection: Determines whether a repo uses direct commits to the default branch or a branch-plus-PR workflow by inspecting CLAUDE.md, README, and git history. - Pre-push review gate: Enforces code review and security review before pushing, including secret scanning of all tracked files on public repositories. - Use Case: After finishing a feature, ask for a commit; the Skill splits changes into logical units, writes an English commit message with the correct Co-Authored-By trailer, and stops. Later, ask for a push; it runs the review gate, creates a branch if needed, and opens a PR via gh with a properly formatted body. ## Quick Start Commit my current changes following the repository conventions, then stop before pushing.

Frequently Asked Questions about commit-pr-workflow

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I commit and push changes following repository conventions?

Request each phase separately: ask for a commit to have changes split into logical units with a properly formatted English message, then ask for a push to trigger the review gate and remote upload. The workflow never auto-pushes after committing.

How do I create a GitHub pull request with the gh CLI?

Create a working branch first if on the default branch, push with git push -u origin <branch>, then run gh pr create. Pass the PR body via --body-file from a temporary file to avoid shell quoting errors from backticks and quotes in the body text.

Should I commit directly to the default branch or use a pull request?

Determine the repository's policy by checking its CLAUDE.md, README, CONTRIBUTING, and git history for merge commits or past PRs. If the policy is unclear, ask rather than guessing, since the two workflows require different push procedures.

Why does pushing to an existing branch not trigger CI?

If the pull request for that branch is already merged or closed, pushing new commits does not update the PR and no pull_request event fires, so CI never runs. Check PR state with gh pr view --json state and open a fresh PR from a new branch if it is closed.

What should I check before pushing to a public repository?

Confirm visibility with gh repo view --json visibility, then scan all tracked files—not just the diff—for credentials using git ls-files and git grep. Also verify exclusion sources with git check-ignore -v, since global gitignore rules do not protect other machines.