lucianghinda

commit-message

4
1
# Install this skill:
npx skills add lucianghinda/agentic-skills --skill "commit-message"

Install specific skill from multi-skill repository

# Description

Generate high-quality git commit messages following Conventional Commits and Chris Beams' Seven Rules. Infers WHY from context and provides clear guidance on structure, scope, and body content.

# SKILL.md


name: commit-message
description: Generate high-quality git commit messages following Conventional Commits and Chris Beams' Seven Rules. Infers WHY from context and provides clear guidance on structure, scope, and body content.


Git Commit Message Generator

Generate structured git commit messages following industry best practices.

Workflow

  1. Get context (optional):
  2. Analyze as much context as possible:

    • Git diff output
    • Recent commit history
    • Issue tracker references
    • Requirements or problems being solved
    • Branch context
  3. Choose message type:

  4. feat: New feature
  5. fix: Bug fix
  6. docs: Documentation
  7. style: Code formatting (no logic change)
  8. refactor: Refactoring (no behavior change)
  9. perf: Performance improvement
  10. test: Test additions/changes
  11. build: Build system/dependencies
  12. ci: CI configuration
  13. chore: Maintenance tasks
  14. revert: Revert previous commit

  15. Consider scope (optional):

  16. Noun describing section of codebase
  17. Example: (api), (ui), (auth)
  18. Format: <type>(<scope>)

  19. Write subject line (required):

  20. Concise summary (≤50 characters, or ≤70 for Sentry)
  21. Imperative mood: "Add", "Fix", "Update", "Remove"
  22. Present tense: "Add feature" not "Added feature"
  23. Capitalized first letter
  24. No period at end

  25. Write body (optional but recommended):

  26. WHY: Explain motivation, problem, or user impact
  27. WHAT: Describe what changed (briefly—code already shows HOW)
  28. 1–3 sentences max
  29. Separate from subject with blank line
  30. Wrap at 72 characters

  31. Add footer (if applicable):

  32. Issue references: Fixes SENTRY-123, Closes #456
  33. Breaking changes: BREAKING CHANGE: API endpoints now require auth
  34. AI attribution: Co-Authored-By: <AI Name> <email>

Format

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

<body>

<footer>

Header: Required. All lines ≤ 100 chars.

Body: Optional. Use it to explain WHY the change was made—infer from context or requirements when possible. Be brief.

Scope (optional): Noun describing a section.

Commit Types

Type Purpose
feat New feature
fix Bug fix
ref Refactoring (no behavior change)
perf Performance improvement
docs Documentation only
test Test additions or corrections
build Build system or dependencies
ci CI configuration
chore Maintenance tasks
style Code formatting (no logic change)
meta Repository metadata
license License changes

Subject Line

  • Imperative mood: "Add", "Fix", "Update"
  • Present tense: "Add feature" not "Added feature"
  • Capitalized first letter
  • Maximum 70 characters (or 50 for standard)
  • No period at end

Body Guidelines

  • WHY: Explain motivation, problem, or user impact
  • WHAT changed: The actual code change (brief)
  • Avoid: Implementation details (code already shows HOW)
  • Explain tradeoffs when relevant
  • Reference issues at the bottom:
  • Fixes SENTRY-123
  • Fixes #123
  • Refs GH-123
  • Refs LINEAR-ABC-123

AI Attribution

When changes were primarily generated by an AI coding agent, include:

Co-Authored-By: <AI Name> <email>

Important: Do NOT add phrases like "Generated by AI", "Written with Claude", or similar in subject/body. Only use the Co-Authored-By footer line.

Examples

Simple Fix

fix(auth): Handle null response in user endpoint

The API could return null for deleted accounts, causing a crash.
Add null check before accessing user properties.

Fixes SENTRY-5678

Feature

feat(alerts): Add Slack thread replies for alert updates

When an alert is updated or resolved, post a reply to the
original Slack thread. This keeps related notifications grouped together.

Refs GH-1234

Refactor

ref(validation): Extract common validation logic to shared module

Move duplicate validation code from three endpoints into a shared
validator class. No behavior change.

Breaking Change

feat(api)!: Remove deprecated v1 endpoints

Remove all v1 API endpoints that were deprecated in version 23.1.
Clients should migrate to v2 endpoints.

BREAKING CHANGE: v1 endpoints no longer available
Fixes SENTRY-9999

Based On

  • gc-ai - Conventional Commits with Chris Beams' Seven Rules and Sentry conventions
  • getsentry/skills - Sentry's commit message conventions with issue references

# Supported AI Coding Agents

This skill is compatible with the SKILL.md standard and works with all major AI coding agents:

Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.