git-workflow_skill

This skill automates a Git workflow with Conventional Commits, including staging, committing, PR creation, and merging to streamline collaborative development.
  • Shell

29

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill shunsukehayashi/miyabi-claude-plugins --skill git-workflow

  • SKILL.md7.0 KB

Overview

This skill automates a Git workflow that enforces Conventional Commits and streamlines staging, committing, PR creation, and merging. It provides ready-to-run shell patterns for standard commits, draft PR creation via GitHub CLI, and recommended merge strategies. The goal is consistent commit messages, predictable branch names, and safe merges across feature worktrees and main branches.

How this skill works

It inspects the current working tree, stages files, and constructs multi-line commit messages in Conventional Commits format using HEREDOCs. It can push branches, create draft PRs with a templated body using gh, and run configured merge commands (squash, merge, rebase) while optionally deleting the source branch. The skill also includes common error-handling steps for hooks, conflicts, wrong-branch commits, and secret removal.

When to use it

  • When preparing a commit and you want a Conventional Commits-compliant message
  • When opening a draft or final PR with a standardized title and body
  • When merging a completed feature branch following project merge strategy
  • When working in a git worktree and pushing/cleaning up feature branches
  • When resolving pre-commit hook failures, merge conflicts, or accidental commits

Best practices

  • Write commit messages with <type>(<scope>): <subject> and include body/footer using HEREDOC for multi-line content
  • Follow branch naming: <type>/<issue-number>-<brief-description> (e.g., feature/270-codegen-agent)
  • Prefer squash merges for most PRs to keep main history linear; use merge/rebase only when appropriate
  • Run tests, linters, and formatters before committing (cargo test, cargo clippy, cargo fmt)
  • Avoid committing secrets; if necessary, remove them from history and force-push with care
  • Create PRs with a clear summary, test plan, related issues, and quality metrics in the body

Example use cases

  • Stage changes and commit a new agent implementation with a Conventional Commits HEREDOC message
  • Create a draft PR with a checklist, tests summary, and 'Closes #issue' using gh pr create
  • Work in a git worktree for an issue, push the feature branch, and clean up after merge
  • Recover from an accidental commit to the wrong branch using git reset --soft and reapply on the correct branch
  • Handle a pre-commit hook change by amending the commit and force-pushing with lease

FAQ

Use squash merges by default for most PRs to keep main history concise; use merge for large multi-commit features and rebase for single-commit PRs.

How do I format a multi-line Conventional Commit message?

Use a HEREDOC in git commit -m "$(cat <<'EOF' ... EOF)" so the commit includes a subject, explanatory body, and footer like 'Closes #123'.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational