Skip to content
Back to skills

Git Commit

ASecurity

Generate and create clean git commits from staged changes. Use when the user asks to commit already staged work, generate a commit message from `git diff --cached`, or run a commit workflow that infers type, scope, subject, body, and risk from the staged diff.

  • 225 stars
  • 0 votes
  • 0 copies
  • 7 views
  • Added September 4, 2026
code-qualitybashrefactoringgitapisecurityperformancedocumentation

Works with

  • api

Security analysis

A100/100

Pro scans all 13 files and shows the line behind each finding

Scanned September 4, 2026

npx -y skills add NeverSight/skills_feed --skill git-commit --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Git Commit?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Git Commit
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/neversight-git-commit-learn-skills-dev/badge)](https://www.skillsdirectory.com/skills/neversight-git-commit-learn-skills-dev)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: git-commit
description: Generate and create clean git commits from staged changes. Use when the user asks to commit already staged work, generate a commit message from `git diff --cached`, or run a commit workflow that infers type, scope, subject, body, and risk from the staged diff.
---

# Git Commit

Generates a clean commit with a properly formatted message from staged changes.

## Usage

```bash
/git-commit
```

**Required before running**: Stage your code files with `git add <files>`

## Step 1: Analyze Staged Changes
Run these commands before composing the commit:

```bash
git diff --cached --stat
git diff --cached
```

If nothing is staged, stop and tell the user to stage files first.

## Step 2: Infer Commit Details
**Automatically determine from the diff:**

- **Change type**: Infer from file paths and diff content:
  - `docs/*.md`, `*.md` changes → `Docs`
  - `cmd/`, `internal/`, `pkg/` with new functionality → `Feature`
  - `fix`, `bug`, `hotfix` in messages → `Bugfix` or `Critical-Fix`
  - `refactor`, `rename`, `extract` → `Refactor`
  - `perf`, `optimize`, `faster` → `Perf`
  - Default to `Feature` if ambiguous

- **Scope**: Infer from the most relevant directory, package, module, or feature area. Keep it short and lowercase.

- **Summary**: Generate from the most meaningful changed files/functions. Focus on *what changed* not *how*.

- **Risk Analysis**: Evaluate:
  - Scope of changes (small = low risk, wide = higher risk)
  - Whether critical paths are affected (auth, payment, data)
  - If tests are included
  - Breaking API changes

## Step 3: Create Commit WITHOUT Co-Authored-By or Signed-off-by
Use plain `git commit` (without `-s` or `-a` flags):

```bash
git commit -m "[Type](scope): Subject

Body explaining the changes in detail.

- Specific key point derived from actual diff
- Another specific key point from the changes
- Technical implementation detail from the code

Risk: <risk_analysis from Step 2>"
```

**⚠️ CRITICAL: Replace placeholder bullets with actual content from the diff. Never use literal placeholders like "Key point 1" - extract specific details from what actually changed.**

**Important**: Do NOT use the Co-Authored-By line or Signed-off-by line. The commit should only contain the message body above.

## Available Types

**⚠️ Use EXACTLY these types (case-sensitive):**

| Type | Description |
|------|-------------|
| `Feature` | New feature or functionality |
| `Bugfix` | Bug fix |
| `Refactor` | Code refactoring without changing behavior |
| `Critical-Fix` | Critical/security bug fix |
| `Docs` | Documentation changes |
| `Perf` | Performance improvements |

## Commit Message Format

The generated commit follows this format:
```
[Type](scope): Subject

Body explaining the changes in detail.

- Specific key point from the diff
- Another specific key point from changes
- Concrete technical detail from code

Risk: <risk_analysis from Step 2>
```

**⚠️ Never use literal placeholders. Always extract real content from the diff.**

Files in this skill

  • SKILL.md3 KB
  • description_ar.txt420 B
  • description_cn.txt254 B
  • description_de.txt394 B
  • description_en.txt261 B
  • description_es.txt346 B
  • description_fr.txt373 B
  • description_it.txt311 B
  • description_ja.txt469 B
  • description_ko.txt341 B
  • description_ru.txt621 B
  • description_tw.txt260 B
  • stats.json68 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in code-quality →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.