MCPInstall

git-commit

Use this skill when the user wants to make a Git commit or split changes into more than one commit. Also use it when the user types "/commit" or asks for a conventional commit. The skill examines the diff, stages the related files, writes a Conventional Commits message, and runs git commit. Do not use it when the user wants only a commit message and no commit. Do not use it to push, open a pull request, rebase, or change the commit history.

Installs
47.4K
Last 24h
+112
Trending rank
#1857
Security
Pass

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/github/awesome-copilot --skill git-commit
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads git-commit automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

Security audits

Independent scans of the skill's instructions and bundled files.

Gen Agent Trust Hub PassSAFE ·This skill provides a secure and standardized workflow for creating git commits following the Conventional Commits specification. It includes proactive safety measures to prevent the disclosure of secrets and restricts the use of destructive git commands.
Socket PassNo alerts
Snyk PassLOW ·Risk: LOW · No issues
Runlayer PassNONE ·1 file scanned · No issues
ZeroLeaks PassNONE ·Score: 93/100 · 2 sections analyzed

SKILL.md

The instructions your agent reads when the skill is triggered.

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, tell the user. Do not make an empty commit.

3. Stage the files

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.
  • After you resolve a merge conflict, use git add --resolved. This command stages only the resolved files. If a file still has conflict markers, the command stops.
  • 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

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
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.

FAQ

What does the git-commit skill do?

Use this skill when the user wants to make a Git commit or split changes into more than one commit. Also use it when the user types "/commit" or asks for a conventional commit. The skill examines the diff, stages the related files, writes a Conventional Commits message, and runs git commit. Do not use it when the user wants only a commit message and no commit. Do not use it to push, open a pull request, rebase, or change the commit history.

How do I install git-commit?

Run npx skills add https://github.com/github/awesome-copilot --skill git-commit in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/git-commit/ (personal) or .claude/skills/git-commit/ (project).

Which AI agents can use git-commit?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is git-commit safe to install?

Security partners have reviewed it: Gen Agent Trust Hub passed; Socket passed; Snyk passed; Runlayer passed; ZeroLeaks passed. As with any skill, read the SKILL.md and bundled scripts before installing.

Who maintains git-commit?

It is published by github in github/awesome-copilot, and it is an official skill from the maker of the technology it covers. It has 47,435 recorded installs.

More from github/awesome-copilot

View all →

excalidraw-diagram-generator

github/awesome-copilot

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.

OfficialDocs & Writing31.9K installs

multi-stage-dockerfile

github/awesome-copilot

Create optimized multi-stage Dockerfiles for any language or framework

Official29.8K installs

documentation-writer

github/awesome-copilot

Diátaxis Documentation Expert. An expert technical writer specializing in creating high-quality software documentation, guided by the principles and structure of the Diátaxis technical documentation authoring framework.

OfficialDocs & Writing27.9K installs

prd

github/awesome-copilot

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

Official24.1K installs

refactor

github/awesome-copilot

Surgical code refactoring to improve maintainability without changing behavior. Covers extracting functions, renaming variables, breaking down god functions, improving type safety, eliminating code smells, and applying design patterns. Less drastic than repo-rebuilder; use for gradual improvements.

OfficialCode Quality & Workflow22.4K installs

java-springboot

github/awesome-copilot

Get best practices for developing applications with Spring Boot.

OfficialBackend & APIs21.4K installs

Popular code quality & workflow skills

View category →

Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.

handoff

mattpocock/skills

Compact the current conversation into a handoff document for another agent to pick up.

diagnosing-bugs

mattpocock/skills

Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.

code-review

mattpocock/skills

Review the changes since a fixed point (commit, branch, tag, or merge-base) along two axes: Standards (does the code follow this repo's documented coding standards?) and Spec (does the code match what the originating issue/spec asked for?). Runs both reviews in parallel sub-agents and reports them side by side. Use when the user wants to review a branch, a PR, work-in-progress changes, or asks to "review since X".

implement

mattpocock/skills

Implement a piece of work based on a spec or set of tickets.

wayfinder

mattpocock/skills

Plan a huge chunk of work (more than one agent session can hold) as a shared map of decision tickets on your issue tracker, and resolve them one at a time until the way to the destination is clear.