Skip to content
Back to skills

Git Commits

ASecurity

Git commit best practices with conventional commits format and atomic commit principles. Use when committing code to ensure clear, meaningful commit history with proper type prefixes and semantic versioning support.

  • 15 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 27, 2026
developmentgogitapidatabaseperformancedocumentation

Works with

  • claude code
  • api

Security analysis

A100/100

Scanned May 27, 2026

npx -y skills add jpoutrin/product-forge --skill git-commits --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Git Commits?

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

Security grade badge for Git Commits
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jpoutrin-git-commits/badge)](https://www.skillsdirectory.com/skills/jpoutrin-git-commits)

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-commits
description: Git commit best practices with conventional commits format and atomic commit principles. Use when committing code to ensure clear, meaningful commit history with proper type prefixes and semantic versioning support.
user-invocable: false
---

# Git Commits Skill

This skill enforces git commit best practices and conventional commits format.

## Conventional Commits Format

```
<type>[optional scope]: <description>

[optional body]

[optional footer(s)]
```

## Commit Types

| Type | Description | Semver |
|------|-------------|--------|
| `feat` | New feature | MINOR |
| `fix` | Bug fix | PATCH |
| `docs` | Documentation only | - |
| `style` | Formatting, no code change | - |
| `refactor` | Code restructuring | - |
| `perf` | Performance improvement | PATCH |
| `test` | Adding tests | - |
| `chore` | Maintenance tasks | - |
| `ci` | CI configuration | - |
| `build` | Build system changes | - |

## Examples

### Feature
```
feat(auth): add OAuth2 login support

Implement OAuth2 flow with Google and GitHub providers.
Includes token refresh and secure storage.

Closes #123
```

### Bug Fix
```
fix(api): handle null response in user endpoint

The /users endpoint crashed when the database returned null.
Added proper null checking and error response.
```

### Breaking Change
```
feat(api)!: change response format for /users endpoint

BREAKING CHANGE: Response now returns array instead of object.
Migration guide available in docs/migrations/v2.md
```

## Atomic Commits

Each commit should:
1. Represent ONE logical change
2. Be independently revertible
3. Pass all tests
4. Be complete (not "WIP")

### Bad Example
```
git commit -m "Fix bugs and add features and update docs"
```

### Good Example
```
git commit -m "fix(auth): prevent session timeout on refresh"
git commit -m "feat(dashboard): add export to CSV button"
git commit -m "docs(api): update authentication examples"
```

## Commit Message Rules

1. **Type is required** and lowercase
2. **Description** starts lowercase, no period
3. **Imperative mood**: "add" not "added" or "adds"
4. **First line** under 72 characters
5. **Body** wraps at 72 characters
6. **Breaking changes** marked with `!` or footer

## Claude Code Commit Footer

When committing with Claude Code, include:

```
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
```

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.

Comments

Loading comments…

Newsletter

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