GI

git-commit

Automates git staging and generates conventional commit messages by analyzing code diffs.

Install

mkdir -p .claude/skills/git-commit && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/546" && unzip -o skill.zip -d .claude/skills/git-commit && rm skill.zip

Installs to .claude/skills/git-commit

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Execute git commit with conventional commit message analysis, intelligent staging, and message generation. Use when user asks to commit changes, create a git commit, or mentions "/commit". Supports: (1) Auto-detecting type and scope from changes, (2) Generating conventional commit messages from diff, (3) Interactive commit with optional type/scope/description overrides, (4) Intelligent file staging for logical grouping
422 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Beginner

Key capabilities

  • →Analyze diffs to determine commit type and scope
  • →Stage files intelligently for logical grouping
  • →Format commit messages according to Conventional Commits specification
  • →Handle breaking change indicators in commit messages

How it works

It analyzes the current git diff and status to suggest a conventional commit message, including type, scope, and description. It also supports interactive staging to group related changes before committing.

Inputs & outputs

You give it
Uncommitted changes in a git repository
You get back
A git commit with a conventional commit message

When to use git-commit

  • →Generate commit messages from diff
  • →Stage logical groups of files
  • →Format commits per Conventional Commits

About this skill

Git Commit with Conventional Commits

Make Git commits that follow the Conventional Commits 1.0.0 specification. Get the type, the scope, and the summary from the diff.

Message Format

<type>(<scope>): <summary>

<body>

<footer>
  • The scope, the body, and the footer are optional. Without a scope, write <type>: <summary>.
  • Write the summary in the imperative mood: "add", not "added" or "adds".
  • Keep the first line at 72 characters or less. Do not put a period at the end.
  • In the body, tell what changed and why.
  • Write each footer as Token: value or Token #value, for example Refs: #456 or Closes #123. Conventional Commits accepts the two forms, but Git reads only Token: value as a trailer. In a token, use - in place of a space.

Types

Conventional Commits defines only feat and fix. The other types come from the Angular convention (@commitlint/config-conventional). If the repository has its own list, use that list.

TypeUse it for
featA new feature
fixA bug fix
docsDocumentation only
styleFormatting only, with no change to the logic
refactorA code change that is not a feature or a fix
perfA performance improvement
testNew or changed tests
buildThe build system or the dependencies
ciThe CI configuration
choreOther maintenance
revertA revert of an earlier commit

Breaking Changes

Put ! before the colon, or add a BREAKING CHANGE: footer. Write the token in uppercase. BREAKING-CHANGE: is also correct.

feat(api)!: remove the v1 endpoints

BREAKING CHANGE: Clients must use the v2 endpoints.

Workflow

1. Read the repository rules

Find the commit rules before you write a message:

  • A commitlint configuration, for example commitlint.config.js or .commitlintrc.json.
  • CONTRIBUTING.md.
  • The recent messages: git log --oneline -10.

If a repository rule is different from this skill, use the repository rule.

2. Examine the changes

git status --porcelain
git diff --staged
git diff

If there are no changes, run the checks at the start of step 3. If they find MERGE_HEAD, continue. If not, tell the user what git status --long shows. Do not make an empty commit.

3. Stage the files

First, check for an operation in progress. Run each command alone. Do not chain them with &&. In a subdirectory, run every command in this step as git -C <root> .... git rev-parse --show-toplevel prints the root.

git rev-parse -q --verify --symbolic-full-name MERGE_HEAD
git rev-parse -q --verify --symbolic-full-name CHERRY_PICK_HEAD
git rev-parse -q --verify --symbolic-full-name REVERT_HEAD
git diff --name-only --diff-filter=U --no-relative
git status --long

A rev-parse command prints a ref name if its operation is in progress. If not, the command prints nothing and exits with status 1. The git diff command lists unmerged files. It finds conflicts that have no ref, for example from git stash pop. git status --long shows the other cases.

If an operation is in progress or there are unmerged files, do not unstage files. Do not split the commit. The index holds the result of the operation. If you unstage a file, Git drops the changes of the other side or removes a conflict entry.

  • Stop and tell the user if git status --long shows "rebase in progress", "You are in the middle of an am session", "Cherry-pick currently in progress", or "Revert currently in progress".
  • Run git status --porcelain=v2. A line that starts with u shows an unmerged file. You can resolve the file only if all these conditions are true:
    • The line starts with u UU N... or u AA N....
    • Each mode on the line is 100644, 100755, or 000000.
    • git diff --no-relative does not show Binary files differ for the file.
  • Ask the user how to resolve all other unmerged files. Git cannot find conflict markers in these files. git add --resolved and the checks below stage these files without a warning. Stage each of these files only after the user resolves it: git add -- <path>.
  • With Git 2.56 or later, stage the files that you can resolve with git add --resolved -- <paths>.
  • With older Git, check those files and stage them:
git diff --check -- path/to/file1 path/to/file2
git add -- path/to/file1 path/to/file2
  • Stage the files only if git diff --check finds no "leftover conflict marker" line. Ignore whitespace warnings from the other branch.
  • Then, with any Git version, run git diff --name-only --no-relative and git ls-files --others --exclude-standard. They list edits in other files. Skip the files that are still unmerged.
  • Show these paths to the user. Ask if they belong to the commit. Stage only the approved paths with git add -- <paths>.
  • Git quotes some paths, for example paths with non-ASCII characters. git add fails for a quoted path. Ask the user about these files.

If there is no operation and no unmerged file, put one logical change in each commit. If the staged files contain more than one change, first unstage the files of the other changes. Then stage the files for this change:

git reset -q -- path/to/other-file1 path/to/other-file2
git add -- path/to/file1 path/to/file2
git add -- '*.test.*'
git add -- src/components/
  • Put a glob in quotes. Without quotes, the shell expands the glob and does not find the files in subdirectories.
  • Do not use git add -p or git add -i. These commands wait for input from a person.
  • Examine the list of staged files with git diff --staged --name-only. Do not commit secrets, for example .env files, credentials.json, or private keys.

4. Write the message

Get each part from the diff:

  • Type: The kind of change.
  • Scope: The module or the area that the change affects.
  • Summary: What changed, in one line.

5. Commit

When step 3 finds MERGE_HEAD, CHERRY_PICK_HEAD, or REVERT_HEAD, run git commit --no-edit with no paths and no --cleanup option. This keeps the message that Git prepared. Do not write a new -m message. The message can keep the Conflicts: comment lines from Git. Do not remove them.

In all other cases:

Give each paragraph with a different -m option. Git puts a blank line between the paragraphs. This command works in Bash, PowerShell, and other shells.

git commit -m "feat(auth): add token refresh"
git commit -m "fix(parser): accept empty input" -m "An empty file caused a crash." -m "Closes: #123"

For a long message, write the message to a temporary file. Then run git commit -F <file>.

6. Make sure that the commit is correct

git log -1 --stat --first-parent
git status --porcelain

Safety Rules

  • Do not change the Git configuration.
  • Do not use --no-verify unless the user tells you to. Hooks can be in .git/hooks or in the Git configuration.
  • If a hook fails, Git does not make the commit. Fix the problem, stage the files again, and run the same git commit command again. Do not use --amend, because it changes the previous commit.
  • Do not change the commit history unless the user tells you to. Do not use git reset --hard, git rebase, or the experimental git history command.
  • Do not push unless the user tells you to. Do not force push to the default branch.

When not to use it

  • →When committing secrets like API keys or credentials
  • →When updating git config through the commit process
  • →When running destructive git commands without explicit user request

Limitations

  • →It does not support committing secrets
  • →It does not update git config
  • →It does not run destructive commands without explicit request

How it compares

This skill automates the generation and formatting of conventional commit messages based on code changes, providing a structured approach compared to manually crafting commit messages.

Compared to similar skills

git-commit side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
git-commit (this skill)119moReviewBeginner
run-nx-generator56moReviewIntermediate
morph-search910moReviewBeginner
upgrading-expo37moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

meeting-minutes

github

Generate concise, actionable meeting minutes for internal meetings. Includes metadata, attendees, agenda, decisions, action items (owner + due date), and follow-up steps.

41210

penpot-uiux-design

github

Comprehensive guide for creating professional UI/UX designs in Penpot using MCP tools. Use this skill when: (1) Creating new UI/UX designs for web, mobile, or desktop applications, (2) Building design systems with components and tokens, (3) Designing dashboards, forms, navigation, or landing pages, (4) Applying accessibility standards and best practices, (5) Following platform guidelines (iOS, Android, Material Design), (6) Reviewing or improving existing Penpot designs for usability. Triggers: "design a UI", "create interface", "build layout", "design dashboard", "create form", "design landing page", "make it accessible", "design system", "component library".

27145

excalidraw-diagram-generator

github

Generate Excalidraw diagrams from natural language descriptions. Use when asked to "create a diagram", "make a flowchart", "visualize a process", "draw a system architecture", "create a mind map", or "generate an Excalidraw file". Supports flowcharts, relationship diagrams, mind maps, and system architecture diagrams. Outputs .excalidraw JSON files that can be opened directly in Excalidraw.

1879

markdown-to-html

github

Convert Markdown files to HTML similar to `marked.js`, `pandoc`, `gomarkdown/markdown`, or similar tools; or writing custom script to convert markdown to html and/or working on web template systems like `jekyll/jekyll`, `gohugoio/hugo`, or similar web templating systems that utilize markdown documents, converting them to html. Use when asked to "convert markdown to html", "transform md to html", "render markdown", "generate html from markdown", or when working with .md files and/or web a templating system that converts markdown to HTML output. Supports CLI and Node.js workflows with GFM, CommonMark, and standard Markdown flavors.

1662

powerbi-modeling

github

Power BI semantic modeling assistant for building optimized data models. Use when working with Power BI semantic models, creating measures, designing star schemas, configuring relationships, implementing RLS, or optimizing model performance. Triggers on queries about DAX calculations, table relationships, dimension/fact table design, naming conventions, model documentation, cardinality, cross-filter direction, calculation groups, and data model best practices. Always connects to the active model first using power-bi-modeling MCP tools to understand the data structure before providing guidance.

1161

prd

github

Generate high-quality Product Requirements Documents (PRDs) for software systems and AI-powered features. Includes executive summaries, user stories, technical specifications, and risk analysis.

1161

Search skills

Search the agent skills registry