commit-and-pr

Automate Git commits and pull request creation with branch-based workflows.

Updated Jun 5, 2024
One-click install
npx skills add https://github.com/trysmr/dotfiles --skill commit-and-pr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: commit-and-pr
Source: https://github.com/trysmr/dotfiles/tree/main/.claude/skills/commit-and-pr
Command: npx skills add https://github.com/trysmr/dotfiles --skill commit-and-pr

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires github-cli.

What problem does it solve?

This Skill automates the entire Git commit and Pull Request (PR) workflow, from staging changes to pushing and creating a PR with the correct base branch and template. It reduces manual steps, ensures compliance with project standards, and saves developers significant time.

Core Features & Use Cases

  • Automated Commit & Push: Guides through staging changes, crafting clear commit messages, and pushing to the remote repository.
  • Intelligent PR Creation: Automatically determines the correct base branch (main or staging) for the PR and applies a standardized PR body template.
  • Use Case: After completing a feature or bugfix, simply instruct the AI to "commit my changes and create a pull request." The AI will handle the Git commands, branch strategy, and PR details, allowing you to move on to the next task.

Quick Start

Commit all my changes with the message "feat: Implement user authentication" and create a pull request.

Frequently Asked Questions about commit-and-pr

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

FAQPage Schema
How do I automate Git commits and pull requests in my workflow?

Automating Git commits and pull requests streamlines your workflow by handling staging, commit message creation, and PR setup automatically. This Skill manages the entire process—from reading repository state and enforcing branch prefixes to pushing changes and creating PRs with the correct base branch, eliminating manual steps and ensuring consistency.

Can I enforce branch naming conventions like feature/ and bugfix/ automatically?

Yes. This Skill enforces branch prefixes (feature/, bugfix/, refactor/, chore/) as part of its commit workflow, ensuring all branches follow your project standards. It validates branch names before committing, preventing inconsistencies across your repository.

How do I avoid committing sensitive files when pushing changes?

This Skill automatically detects and avoids staging sensitive files during the commit process, protecting credentials and configuration secrets. It reads your repository state and applies safeguards before constructing the commit.

What's the best way to create pull requests with standardized templates?

This Skill applies standardized PR body templates and automatically determines the correct base branch (main or staging) for your pull request. It removes the manual overhead of template formatting and branch selection, ensuring every PR follows your project conventions.

Does this work with GitHub for pull request creation?

Yes. This Skill integrates with GitHub CLI to create pull requests automatically. It uses GitHub's infrastructure to handle PR creation, template application, and base branch targeting after your changes are pushed.

Can I review changes before committing?

Yes. This Skill prompts you for approval before executing git commit and git push, allowing you to review the staged changes, commit message, and branch details. You retain control and can reject the operation if needed.