본문으로 건너뛰기
Skillpedia
일반 코딩33k · #8761

git-commit-helper

하는 일

이 스킬은 AI 에이전트가 코드 변경에 대해 설명이 분명한 커밋 메시지를 쓰도록 돕습니다. 모든 메시지를 직접 쓰지 않고도 명확한 기록을 원하는 개발자를 위한 것입니다.

사용하는 경우

  • ✓변경 사항의 커밋 메시지 작성을 도와 달라고 요청할 때.
  • ✓커밋하기 전에 스테이징된 변경 사항을 검토하고 싶을 때.
  • ✓커밋 메시지가 컨벤셔널 커밋 형식을 따르기를 원하는 경우.

스킬 링크

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/git-commit-helper/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/git-commit-helper/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“제 스테이징된 변경 사항을 보고 커밋 메시지를 써 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 스테이징된 변경 사항을 살펴보고 무엇이 바뀌었는지 요약합니다. 그다음 타입, 범위, 설명 형식으로 메시지를 쓰며, 세부 사항을 위한 선택적 본문을 덧붙일 수 있습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Git Commit Helper

Quick start

Analyze staged changes and generate commit message:

# View staged changes
git diff --staged

# Generate commit message based on changes
# (Claude will analyze the diff and suggest a message)

Commit message format

Follow conventional commits format:

<type>(<scope>): <description>

[optional body]

[optional footer]

Types

  • feat: New feature
  • fix: Bug fix
  • docs: Documentation changes
  • style: Code style changes (formatting, missing semicolons)
  • refactor: Code refactoring
  • test: Adding or updating tests
  • chore: Maintenance tasks

Examples

Feature commit:

feat(auth): add JWT authentication

Implement JWT-based authentication system with:
- Login endpoint with token generation
- Token validation middleware
- Refresh token support

Bug fix:

fix(api): handle null values in user profile

Prevent crashes when user profile fields are null.
Add null checks before accessing nested properties.

Refactor:

refactor(database): simplify query builder

Extract common query patterns into reusable functions.
Reduce code duplication in database layer.

Analyzing changes

Review what's being committed:

# Show files changed
git status

# Show detailed changes
git diff --staged

# Show statistics
git diff --staged --stat

# Show changes for specific file
git diff --staged path/to/file

Commit message guidelines

DO:

  • Use imperative mood ("add feature" not "added feature")
  • Keep first line under 50 characters
  • Capitalize first letter
  • No period at end of summary
  • Explain WHY not just WHAT in body

DON'T:

  • Use vague messages like "update" or "fix stuff"
  • Include technical implementation details in summary
  • Write paragraphs in summary line
  • Use past tense

Multi-file commits

When committing multiple related changes:

refactor(core): restructure authentication module

- Move auth logic from controllers to service layer
- Extract validation into separate validators
- Update tests to use new structure
- Add integration tests for auth flow

Breaking change: Auth service now requires config object

Scope examples

Frontend:

  • feat(ui): add loading spinner to dashboard
  • fix(form): validate email format

Backend:

  • feat(api): add user profile endpoint
  • fix(db): resolve connection pool leak

Infrastructure:

  • chore(ci): update Node version to 20
  • feat(docker): add multi-stage build

Breaking changes

Indicate breaking changes clearly:

feat(api)!: restructure API response format

BREAKING CHANGE: All API responses now follow JSON:API spec

Previous format:
{ "data": {...}, "status": "ok" }

New format:
{ "data": {...}, "meta": {...} }

Migration guide: Update client code to handle new response structure

Template workflow

  1. Review changes: git diff --staged
  2. Identify type: Is it feat, fix, refactor, etc.?
  3. Determine scope: What part of the codebase?
  4. Write summary: Brief, imperative description
  5. Add body: Explain why and what impact
  6. Note breaking changes: If applicable

Interactive commit helper

Use git add -p for selective staging:

# Stage changes interactively
git add -p

# Review what's staged
git diff --staged

# Commit with message
git commit -m "type(scope): description"

Amending commits

Fix the last commit message:

# Amend commit message only
git commit --amend

# Amend and add more changes
git add forgotten-file.js
git commit --amend --no-edit

Best practices

  1. Atomic commits - One logical change per commit
  2. Test before commit - Ensure code works
  3. Reference issues - Include issue numbers if applicable
  4. Keep it focused - Don't mix unrelated changes
  5. Write for humans - Future you will read this

Commit message checklist

  • Type is appropriate (feat/fix/docs/etc.)
  • Scope is specific and clear
  • Summary is under 50 characters
  • Summary uses imperative mood
  • Body explains WHY not just WHAT
  • Breaking changes are clearly marked
  • Related issue numbers are included
자주 묻는 질문

컨벤셔널 커밋 형식은 무엇인가요?

feat, fix, docs, refactor 같은 타입으로 시작하고, 짧은 설명이 뒤따르는 메시지 형식입니다.

어떤 타입을 지원하나요?

feat, fix, docs, style, refactor, test, chore를 다룹니다.

커밋도 대신 해 주나요?

스킬은 메시지 작성에 중점을 두므로, 언제 커밋할지는 사용자가 정합니다.

상세 정보

작성자의 원본 설명

Generate descriptive commit messages by analyzing git diffs. Use when the user asks for help writing commit messages or reviewing staged changes.

repo: davila7/claude-code-templates

인기도

GitHub 스타
33k
순위
#8761
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬