branch-commit

Generates branch names and commit messages grounded in the actual git diff.

6|Updated Jul 10, 2026
One-click install
npx skills add https://github.com/Mozurok/fhorja.dev --skill branch-commit-mozurok
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: branch-commit
Source: https://github.com/Mozurok/fhorja.dev/tree/main/.claude/skills/branch-commit
Command: npx skills add https://github.com/Mozurok/fhorja.dev --skill branch-commit-mozurok

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Commit messages and branch names are often written from memory or a vague task summary, producing generic entries like "update task" that hide what actually changed. This Skill inspects the real git diff and produces a branch name and a concise commit message that name the actual paths and behaviors changed, with an optional --apply mode that creates the commit after explicit in-turn confirmation. ## Core Features & Use Cases - Diff-grounded naming: Reads git diff, git diff --staged, or git diff <base>...HEAD and derives the commit subject from real paths and hunks, never from the task summary alone. - Conventional Commits output: Returns a subject line of at most 72 characters with an optional two-line body, preferring feat:, fix:, docs:, and similar prefixes when they fit the diff. - Multi-concern detection: Flags diffs that span unrelated scopes and recommends splitting into separate commits or escalating to a full PR package. - Guarded --apply mode: Creates the commit only in Agent mode with a human present, after displaying the exact staged content and receiving same-turn confirmation, then records pre- and post-commit HEAD values for audit. - Use Case: You just finished a slice of work with staged changes. Run the command to get a branch name and commit message that accurately describe the diff, then use --apply to commit exactly what was shown. ## Quick Start Ask the assistant to run branch-commit on my current staged changes and suggest a branch name and commit message based on the real diff.

Frequently Asked Questions about branch-commit

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

FAQPage Schema
How do I write a commit message based on the actual git diff?▼

Run branch-commit with a real diff source such as git diff, git diff --staged, or git diff <base>...HEAD. It reads the paths and hunks and produces a Conventional Commits style subject of at most 72 characters that names what actually changed.

How do I generate a branch name from my current changes?▼

The command inspects the diff and current branch from git branch --show-current, then suggests one branch name matching the diff scope. If the existing branch already reflects the work, it recommends keeping it instead of renaming.

Can branch-commit create the commit automatically?▼

Yes, with the --apply flag, but only in Agent mode with a human present. It displays the exact commit message, git status, and staged diff first, then requires same-turn confirmation and commits only the explicitly listed paths.

When should I not use branch-commit?▼

Avoid it when no diff exists yet, since naming from a task summary alone is the failure mode it prevents, and when you need a complete PR package with structured delivery, which is the job of pr-package.

What happens if my diff covers multiple unrelated changes?▼

The command flags the multi-concern diff explicitly instead of merging it into one vague commit. It recommends either staging the concerns as separate commits or running pr-package for a structured delivery.