git-commit

Generates conventional commit messages by analyzing git diffs and staging changes.

Updated Sep 3, 2024
One-click install
npx skills add https://github.com/eminboydak/duckTerm --skill git-commit-eminboydak
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-commit
Source: https://github.com/eminboydak/duckTerm/tree/main/.agents/skills/git-commit
Command: npx skills add https://github.com/eminboydak/duckTerm --skill git-commit-eminboydak

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing consistent, meaningful commit messages is tedious and often skipped, leading to messy git histories that are hard to review, search, and automate against. ## Core Features & Use Cases - Diff-Based Message Generation: Analyzes staged or working-tree diffs to infer the correct conventional commit type, scope, and description. - Intelligent Staging: Groups and stages files logically before committing, while warning against committing secrets like .env files or credentials. - Conventional Commits Compliance: Supports all standard types (feat, fix, docs, refactor, etc.) plus breaking-change notation with ! and BREAKING CHANGE footers. - Use Case: After finishing a bug fix across three files, ask the assistant to commit your changes and it stages the files, inspects the diff, and creates a commit like fix(auth): correct token refresh logic. ## Quick Start Ask the assistant to commit my current changes with a conventional commit message.

Frequently Asked Questions about git-commit

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

FAQPage Schema
How do I write a conventional commit message?

A conventional commit follows the format `<type>[optional scope]: <description>`, using types like feat, fix, docs, refactor, or chore. Keep the description under 72 characters, in present tense and imperative mood, such as `feat(auth): add login endpoint`.

How to generate a commit message from a git diff automatically?

Analyze the staged diff with `git diff --staged` (or `git diff` for unstaged changes) to determine what changed, then map the change to a type and scope. This skill automates that analysis and produces the commit command for you.

How do I mark a breaking change in conventional commits?

Add an exclamation mark after the type or scope, like `feat!: remove deprecated endpoint`, or include a `BREAKING CHANGE:` footer in the commit body explaining what behavior changed.

What should I do if a git commit fails due to hooks?

Fix the issue reported by the hook and create a new commit rather than amending or bypassing it. Never use `--no-verify` to skip hooks unless explicitly requested, and never commit secrets like .env files or credentials.

Can I stage only specific files before committing?

Yes, stage individual files with `git add path/to/file`, patterns like `git add src/components/*`, or use `git add -p` for interactive hunk-level staging to group logical changes into separate commits.