All skills
github avatar

/git-commit

@e24be77 official
by githubgithub/awesome-copilot40k stars
5,040

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

Use this Skill: https://skilld.dev/gh/github/awesome-copilot/git-commit

This session only. Nothing lands on disk.

SKILL.md

≈109 tokens always: the name and description. ≈675 when used: this file.

Git Commit with Conventional Commits

Overview

Create standardized, semantic git commits using the Conventional Commits specification. Analyze the actual diff to determine appropriate type, scope, and message.

Conventional Commit Format

<type>[optional scope]: <description>

[optional body]

[optional footer(s)]

Commit Types

Type Purpose
feat New feature
fix Bug fix
docs Documentation only
style Formatting/style (no logic)
refactor Code refactor (no feature/fix)
perf Performance improvement
test Add/update tests
build Build system/dependencies
ci CI/config changes
chore Maintenance/misc
revert Revert commit

Breaking Changes

# Exclamation mark after type/scope
feat!: remove deprecated endpoint

# BREAKING CHANGE footer
feat: allow config to extend other configs

BREAKING CHANGE: `extends` key behavior changed

Workflow

1. Analyze Diff

# If files are staged, use staged diff
git diff --staged

# If nothing staged, use working tree diff
git diff

# Also check status
git status --porcelain

2. Stage Files (if needed)

If nothing is staged or you want to group changes differently:

# Stage specific files
git add path/to/file1 path/to/file2

# Stage by pattern
git add *.test.*
git add src/components/*

# Interactive staging
git add -p

Never commit secrets (.env, credentials.json, private keys).

3. Generate Commit Message

Analyze the diff to determine:

  • Type: What kind of change is this?
  • Scope: What area/module is affected?
  • Description: One-line summary of what changed (present tense, imperative mood, <72 chars)

4. Execute Commit

# Single line
git commit -m "<type>[scope]: <description>"

# Multi-line with body/footer
git commit -m "$(cat <<'EOF'
<type>[scope]: <description>

<optional body>

<optional footer>
EOF
)"

Best Practices

  • One logical change per commit
  • Present tense: "add" not "added"
  • Imperative mood: "fix bug" not "fixes bug"
  • Reference issues: Closes #123, Refs #456
  • Keep description under 72 characters

Git Safety Protocol

  • NEVER update git config
  • NEVER run destructive commands (--force, hard reset) without explicit request
  • NEVER skip hooks (--no-verify) unless user asks
  • NEVER force push to main/master
  • If commit fails due to hooks, fix and create NEW commit (don't amend)

Source: SKILL.md on GitHub

No alerts16d5 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    The skill provides a workflow for creating semantic Git commits. It includes security best practices such as avoiding the commitment of secrets and preventing destructive Git operations.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW · No issues

  • Runlayer7mo

    1 file scanned · No issues

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at e24be77. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 19 hours ago.

Activeupdated 8 months ago
What it can do
Runs commands
All 1 allowed tools
Bash
  • Git/VCS
  • conventional-commits
  • commit-messages
  • staging
  • bash
  • semantic-versioning

README badge

README badge for github/awesome-copilot/git-commit

Creates standardized git commits using the Conventional Commits specification by analyzing diffs to auto-detect type, scope, and generate messages. Supports intelligent file staging, interactive overrides, and breaking change footers for semantic versioning.

Generated from the current SKILL.md.

Does this skill auto-stage files or do I need to stage them manually?
The skill can intelligently stage files for logical grouping if nothing is already staged, but it analyzes whatever diff exists (staged or working tree) and prompts you before committing. You retain control over what gets staged.
What happens if my commit message doesn't follow Conventional Commits format?
The skill is designed to generate and enforce Conventional Commits format automatically by analyzing the diff and detecting the type, scope, and description. It will not create non-conforming messages.
Does this skill handle breaking changes?
Yes. The skill supports breaking changes via an exclamation mark after the type/scope (e.g., `feat!:`) or a BREAKING CHANGE footer in the commit body.
Will this skill run git hooks or skip validation?
The skill respects git hooks by default and will not skip them with --no-verify unless you explicitly request it. If a hook fails, it will prompt you to fix and create a new commit rather than amend.

Generated from the current SKILL.md. These answers refresh after source changes.