git-commit

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

Updated Jun 11, 2026
One-click install
npx skills add https://github.com/marcocpt/trae_skills --skill git-commit-marcocpt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-commit
Source: https://github.com/marcocpt/trae_skills/tree/main/git-commit
Command: npx skills add https://github.com/marcocpt/trae_skills --skill git-commit-marcocpt

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing consistent, meaningful git commit messages is tedious and often results in vague or inconsistent history. This Skill analyzes your actual code changes and produces standardized Conventional Commits messages automatically. ## Core Features & Use Cases - Automatic Type and Scope Detection: Inspects the staged or working-tree diff to determine whether the change is a feat, fix, refactor, docs update, or another conventional type. - Intelligent File Staging: Groups and stages related files into logical commits, while warning against committing secrets like .env files or credentials. - Conventional Message Generation: Produces properly formatted messages with type, scope, description, body, and footers including BREAKING CHANGE annotations. - Use Case: After finishing a bug fix across three files, ask the assistant to commit your changes and it will stage the files, analyze the diff, and create a commit like "fix(auth): handle expired token refresh". ## Quick Start Commit my current changes with a conventional commit message based on the diff.

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", such as "feat(auth): add login endpoint". Common types include feat, fix, docs, refactor, test, and chore, with an optional body and footer for details like BREAKING CHANGE.

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

Analyze the output of git diff --staged or git diff to identify what changed, then map the change to a conventional type and scope. This Skill automates that analysis and produces an imperative, present-tense description under 72 characters.

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.

Can I commit only some of my changed files in git?

Yes, stage specific files with git add path/to/file before committing, or use git add -p for interactive hunk-level staging. This lets you group related changes into separate logical commits.

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

Fix the issue reported by the hook and create a new commit rather than amending or bypassing with --no-verify. Skipping hooks should only happen when the user explicitly requests it.