git-commit

star 4

Create a well-formatted git commit with conventional commit message format and ticket reference

f4irline By f4irline schedule Updated 2/3/2026

name: git-commit description: Create a well-formatted git commit with conventional commit message format and ticket reference

Git Commit

Create a git commit following the conventional commits specification with Linear ticket reference.

Commit Message Format

{type}({scope}): {description}

{body}

Refs: {ticket-id}

Type

Type Description
feat New feature
fix Bug fix
refactor Code refactoring
docs Documentation only
test Adding/updating tests
chore Maintenance, deps, tooling
perf Performance improvement
style Code style (formatting, semicolons)
ci CI/CD changes

Scope

Optional, indicates the component affected:

  • api - Backend API changes
  • mobile - Mobile app changes
  • infra - Infrastructure/Terraform changes
  • shared - Shared libraries/utilities
  • Or a specific feature name

Description

  • Imperative mood ("add" not "added")
  • No period at the end
  • Max 72 characters
  • Lowercase first letter

Body

  • Explain WHAT and WHY (not how)
  • Wrap at 72 characters
  • Separate from subject with blank line

Steps

  1. Get authenticated identity for commit attribution (recommended):

    • If a GitHub MCP server is available, call the get_authenticated_user tool (GitHub App) or get_me tool (PAT/official MCP)
    • This returns the bot/user identity (name and email) to use for commits
    • If the tool is unavailable or fails, proceed with default git config (graceful fallback)
  2. Stage changes:

    git add -A
    

    Or stage specific files if making focused commits:

    git add path/to/file1 path/to/file2
    
  3. Review staged changes:

    git diff --staged --stat
    
  4. Create commit:

    If authenticated identity was retrieved, use environment variables to set both author and committer:

    GIT_AUTHOR_NAME="{name}" GIT_AUTHOR_EMAIL="{email}" GIT_COMMITTER_NAME="{name}" GIT_COMMITTER_EMAIL="{email}" git commit -m "{type}({scope}): {description}" -m "{body}" -m "Refs: {ticket-id}"
    

    Example with bot identity:

    GIT_AUTHOR_NAME="my-app[bot]" GIT_AUTHOR_EMAIL="123456+my-app[bot]@users.noreply.github.com" GIT_COMMITTER_NAME="my-app[bot]" GIT_COMMITTER_EMAIL="123456+my-app[bot]@users.noreply.github.com" git commit -m "feat(api): add endpoint" -m "Add new endpoint for user authentication" -m "Refs: STU-15"
    

    If no authenticated identity (fallback), use standard commit:

    git commit -m "{type}({scope}): {description}" -m "{body}" -m "Refs: {ticket-id}"
    

Examples

Feature Commit

feat(api): add user authentication endpoint

Implement JWT-based authentication with refresh tokens.
Includes rate limiting and brute force protection.

Refs: STU-15

Bug Fix Commit

fix(mobile): resolve login timeout issue

Increase timeout from 5s to 30s for slow networks.
Add retry logic with exponential backoff.

Refs: STU-23

Test Commit

test(api): add integration tests for auth endpoints

Cover login, logout, and token refresh flows.
Add edge cases for invalid credentials.

Refs: STU-15

Validation

Before committing:

  1. Ensure all tests pass
  2. Ensure linting passes
  3. Review the diff to confirm changes are intentional

After committing:

git log -1 --oneline

Report the commit hash to confirm success.

Install via CLI
npx skills add https://github.com/f4irline/bbqparty-ai --skill git-commit
Repository Details
star Stars 4
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator