Skip to content
Back to skills

Commit Helper

ASecurity

Write clear, conventional commit messages. Use when the user asks to commit changes, needs help with commit messages, or when following Conventional Commits specification is required.

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 14, 2026
ai-agentsgobashrefactoringgitapiperformancedocumentation

Works with

  • claude code
  • api

Security analysis

A100/100

Scanned October 14, 2026

npx -y skills add peopleforrester/claude-dotfiles --skill commit-helper --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Commit Helper?

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

Security grade badge for Commit Helper
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/peopleforrester-commit-helper/badge)](https://www.skillsdirectory.com/skills/peopleforrester-commit-helper)

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: commit-helper
description: |
  Write clear, conventional commit messages. Use when the user asks to commit
  changes, needs help with commit messages, or when following Conventional
  Commits specification is required.
license: MIT
compatibility: Claude Code 2.1+
metadata:
  author: peopleforrester
  version: "1.0.0"
  tags:
    - git
    - commits
    - workflow
---

# Commit Helper

Write clear, meaningful commit messages following conventions.

## When to Use

- User asks to commit changes
- Help writing commit messages
- Following Conventional Commits
- Preparing commits for PR

## Conventional Commits Format

```
<type>(<scope>): <subject>

<body>

<footer>
```

### Type (Required)

| Type | Use For |
|------|---------|
| `feat` | New feature |
| `fix` | Bug fix |
| `docs` | Documentation only |
| `style` | Formatting, whitespace (not CSS) |
| `refactor` | Code change that neither fixes nor adds |
| `perf` | Performance improvement |
| `test` | Adding or fixing tests |
| `build` | Build system or dependencies |
| `ci` | CI configuration |
| `chore` | Maintenance tasks |
| `revert` | Reverting previous commit |

### Scope (Optional)

The area of the codebase:

```
feat(auth): add OAuth login
fix(api): resolve timeout issue
docs(readme): update installation steps
```

### Subject (Required)

- Imperative mood: "add" not "added" or "adds"
- Lowercase first letter
- No period at end
- Max 50 characters

### Body (Optional)

- Explain "what" and "why", not "how"
- Wrap at 72 characters
- Blank line between subject and body

### Footer (Optional)

- Breaking changes: `BREAKING CHANGE: description`
- Issue references: `Fixes #123`, `Closes #456`

## Examples

### Simple Feature

```
feat: add user profile page
```

### Feature with Scope

```
feat(auth): add password reset functionality
```

### Bug Fix with Issue Reference

```
fix(cart): resolve incorrect total calculation

The cart total was not including the shipping cost
when calculating the final amount.

Fixes #234
```

### Breaking Change

```
feat(api)!: change authentication to OAuth 2.0

BREAKING CHANGE: The /auth/login endpoint now requires
OAuth 2.0 credentials instead of username/password.

Migration guide: https://docs.example.com/oauth-migration
```

### Refactoring

```
refactor(utils): extract date formatting to separate module

Moved date formatting functions from utils.ts to
dates.ts for better organization and reusability.
```

### Multiple Changes

If commits have unrelated changes, split them:

```bash
# Bad: one commit with unrelated changes
git commit -m "fix: login bug and add profile page"

# Good: separate commits
git commit -m "fix(auth): resolve login timeout issue"
git commit -m "feat(profile): add user profile page"
```

## Commit Message Process

### 1. Check What Changed

```bash
git status
git diff --staged
```

### 2. Determine the Type

- Added something new? → `feat`
- Fixed a bug? → `fix`
- Only documentation? → `docs`
- Code reorganization? → `refactor`

### 3. Identify the Scope

What area of the code?
- `auth`, `api`, `ui`, `db`, `config`, etc.
- Skip if change is global

### 4. Write the Subject

- Start with verb: add, fix, update, remove, refactor
- Be specific but concise
- Focus on what, not how

### 5. Add Body if Needed

Include body when:
- Change is complex
- Context helps future readers
- Non-obvious decisions were made

## Good vs Bad Examples

### Subject Line

```
# Bad
fix: fixed the bug
feat: new feature added
update: updated some stuff

# Good
fix(cart): resolve race condition in checkout
feat(search): add fuzzy matching support
refactor(api): extract validation to middleware
```

### Body

```
# Bad (how, not why)
Changed the function to use a loop instead of recursion
and added a cache variable.

# Good (why)
The recursive implementation was causing stack overflow
on large datasets. Switched to iterative approach with
memoization to handle inputs up to 100k items.
```

## Commit Workflow

```bash
# Stage specific files
git add src/auth/login.ts src/auth/login.test.ts

# Write commit message
git commit -m "fix(auth): resolve session timeout issue

Sessions were expiring immediately due to incorrect
timestamp comparison. Fixed by using UTC timestamps.

Fixes #189"
```

## Amending Commits

```bash
# Amend last commit message
git commit --amend -m "new message"

# Add forgotten files to last commit
git add forgotten-file.ts
git commit --amend --no-edit
```

**Warning**: Don't amend commits that have been pushed.

## Commit Message Template

Create `.gitmessage` template:

```
# <type>(<scope>): <subject>
#
# <body>
#
# <footer>

# Types: feat, fix, docs, style, refactor, perf, test, build, ci, chore
# Scope: auth, api, ui, db, etc. (optional)
# Subject: imperative, lowercase, no period, max 50 chars
# Body: what and why, wrap at 72 chars
# Footer: BREAKING CHANGE:, Fixes #, Closes #
```

Configure git:

```bash
git config --global commit.template ~/.gitmessage
```

## Quality Checklist

- [ ] Type is appropriate for the change
- [ ] Subject is imperative mood ("add" not "added")
- [ ] Subject is under 50 characters
- [ ] Subject doesn't end with period
- [ ] Body explains why, not how (if included)
- [ ] Breaking changes are marked
- [ ] Related issues are referenced

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.