/git:commitfrom git
Creates git commits with conventional commit messages (type(scope): subject + why-focused body). Analyzes changes, proposes logical splits, and commits directly without editor approval. Pushes the resulting commit(s) only when `--push` is passed. Do NOT use for creating PRs or amending published commits.
Ships in git. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Generate well-crafted commit messages and create Git commits following the commit rules below.
--push — after the commit(s) are created, push them to the remote. Without this flag, the workflow never pushes; commits stay local.git commit command must include a conventional type prefix (e.g., feat:, fix(scope):)Co-Authored-By trailer.npm run, curl -X, etc) wrap them in backticks so they appear as Markdown codegit status to check for staged and unstaged changesgit diff (unstaged) and git diff --cached (staged) to analyze ALL changesgit log --oneline -10 to understand the repository's commit message styleCommit directly with the drafted messages — do not open an editor and do not ask for message approval in chat.
Single commit:
git add <specific-files> or git add -p).git commit -F <tempfile>.Multiple commits — commit in chronological order:
git add <specific-files>), and commit with git commit -F <msg-file>.Then, for either path:
--push was passed, push the new commit(s) — see Pushing below. Otherwise skip this step; never push without the flag.git show -s --format=%B HEAD for a single commit, or git log --oneline for a multi-commit batch. State whether the commit(s) were pushed or are still local and unpushed, and offer to amend the wording on request (take dictated edits and amend with git commit --amend -F <file>).Only when --push is passed, and only after every planned commit has been created successfully:
git push.git push -u origin HEAD.Never push if any commit failed, and never push work you did not just commit in this run.
Always draft each message with a conventional type prefix already present (e.g. feat:, fix(scope):) so the commit-msg hook passes.
Always commit via -F <file> — never -e (no editor), and never -m with embedded newlines. The temp file holds the subject on line 1, a blank line, then the body (if any):
feat(auth): Add OAuth2 support for GitHub login
GitHub is the primary VCS for 90% of our users. Supporting
OAuth2 login eliminates the separate account creation step
that was causing 40% drop-off during onboarding.
Multi-commit batches stage and commit each unit in order:
git add src/auth.ts
git commit -F /path/to/temp/commit-msg-1.txt
git add src/ui/banner.tsx src/ui/api.ts
git commit -F /path/to/temp/commit-msg-2.txt
If the commit-msg hook rejects a message, show the hook output and let the user decide how to proceed; do not silently rewrite and re-run.
Every commit should represent ONE logical change. Before committing, analyze whether changes should be split.
Split changes into separate commits when you see:
Commits should follow the logical order of development:
git add -p or git add <specific-files> to stage only related changes via git hunksBad: One commit with message "Update auth and fix payment bug and add tests"
Good: Three commits:
fix(payments): Handle null amount in refund calculation
feat(auth): Add session timeout configuration
test(auth): Add tests for session timeout behavior
Keep changes together when:
Based on Chris Beam's definitive guide.
type(scope): subject line here
Body starts after blank line. Explains the WHY, never the what.
fix: Resolve login timeout not fix: Resolve login timeout.Write commands, not descriptions of what happened:
Add, Fix, Update, Remove, RefactorAdded, Fixed, Updated, Removed, RefactoredTest: "If applied, this commit will [your subject line]" should be grammatically correct.
This is the most important rule and the one most often violated.
git log — they can see the code, but they can't see your reasoningThe body must contain motivation, not description. Ask yourself:
Good body (explains why):
The app crashed on first run because no config file existed.
A default config eliminates the first-run failure without
requiring manual setup.
Bad body (restates the diff):
Added a check for the config file. If it doesn't exist,
creates a new one with default values. Updated the init
function to call createDefaultConfig().
When the body adds nothing beyond the subject, omit it entirely. A clear subject like fix: Remove unused CSS import needs no body.
type(scope): imperative subject under 50 chars
The motivation for this change: what problem existed, why it
needed solving, and why this approach was chosen. Wrapped at
72 characters. Never restate what the diff already shows.
Optional footers like:
Fixes #123
BREAKING CHANGE: description of breaking change
| Type | Use For |
|---|---|
feat | New feature visible to users |
fix | Bug fix for existing functionality |
docs | Documentation only changes |
style | Formatting, whitespace (no code logic change) |
refactor | Code restructuring without behavior change |
perf | Performance improvements |
test | Adding or updating tests |
build | Build system or external dependencies |
ci | CI/CD configuration changes |
chore | Maintenance tasks (tooling, configs) |
revert | Reverting a previous commit |
For changes that break backward compatibility:
feat!: Remove deprecated authentication method
BREAKING CHANGE: The `legacyAuth()` function has been removed.
Migrate to `newAuth()` before upgrading. See migration guide
in docs/migration-v2.md.
feat(auth): Add OAuth2 support for GitHub login
GitHub is the primary VCS for 90% of our users. Supporting
OAuth2 login eliminates the separate account creation step
that was causing 40% drop-off during onboarding.
Closes #234
fix: Prevent crash when config file is missing
The app crashed on first run because it expected a config
file that doesn't exist yet. Creating a default config
eliminates the first-run failure without requiring manual
setup from the user.
refactor: Extract validation logic into separate module
Validation was duplicated across 4 controllers, causing
bugs when rules were updated in one place but not others.
Centralizing ensures consistency and makes policy changes
atomic.
fixed stuff # Too vague, not imperative
Updated the code. # Says nothing useful
feat: added new feature. # Not imperative, has period
WIP # Meaningless
feat(auth): Add OAuth2 support for GitHub login
Added a new OAuth2 client configuration. Updated the auth
controller to handle GitHub callbacks. Added a new route
for /auth/github. Updated the user model to store GitHub
tokens.
This body just restates the diff. It tells you nothing about why GitHub OAuth was added or what problem it solves.
Only offer to amend if:
Otherwise, create a new commit.
Never create empty commits unless explicitly requested for CI triggers.
If there are many changed files, follow the Splitting Commits section above to break them into logical units.
Warn if committing generated files (node_modules, dist/, build/, *.min.js) that are typically gitignored.
For truly mechanical changes (formatting, import sorting, dependency bumps), a subject-only message with no body is fine. The why is self-evident.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub gjtorikian/agent-plugins --plugin git2 skills in this plugin