git-commit skill
Automates the process of staging changes and creating commits using the conventional commit message format.
- GitHub 스타
- 45
- 파일
- 1
- 마지막 커밋
- 2026년 5월 31일
- 라이선스
- MIT
- 허용된 도구
- 2
git-commit skill은 무엇을 하나요?
git-commit은(는) agent skill입니다. Automates the process of staging changes and creating commits using the conventional commit message format.
skill의 SKILL.md에서 생성된 요약입니다.
git-commit skill 정보
Automating the staging and committing of code changes using the conventional commit format is what this skill enables for developers. When an agent receives instructions to save changes or commit work, it uses Bash to inspect the repository state and stage all files, including untracked ones. It then analyzes the staged diff to determine the appropriate type, such as feat, fix, or refactor, and constructs a structured message following specific rules like using the imperative mood and keeping descriptions under 72 characters.
An agent should load this skill whenever a user wants to finalize a task in a git repository. The process relies on executing git status, git add, and git diff commands to understand the context of the work. If a pre-commit hook prevents the commit from being created, the skill reports the specific failure so the user can address the issues. It produces a formal commit with a short hash and a standardized message, ensuring the project history remains clean and consistent.
agent가 수행할 수 있는 작업
- 1Commit all current workAsk the agent to save all your current progress and staged changes into a new git commit.
- 2Generate standardized commit messagesHave the agent analyze a diff to write a message that follows the conventional commit specification.
- 3Handle pre-commit hook errorsUse the agent to identify why a commit failed due to local repository hooks.
skill의 SKILL.md를 기반으로 작성되었습니다. 모든 사용 사례는 해당 문서의 인용구와 대조 확인되었습니다.
git-commit skill 설치 방법
각 명령은 skill 폴더를 클라이언트의 skills 디렉터리에 복사합니다. 클라이언트를 재시작하거나 새 세션을 시작하여 로드하세요.플러그인에 git-commit skill 설치
/plugin marketplace add sequenzia/agent-alchemy /plugin install agent-alchemy-git-tools@agent-alchemy
Claude Code에 git-commit skill 설치
~/.claude/skills/git-commit/SKILL.md
$ npx degit sequenzia/agent-alchemy/claude/git-tools/skills/git-commit ~/.claude/skills/git-commitClaude Code (project)에 git-commit skill 설치
.claude/skills/git-commit/SKILL.md
$ npx degit sequenzia/agent-alchemy/claude/git-tools/skills/git-commit .claude/skills/git-commitCodex에 git-commit skill 설치
~/.agents/skills/git-commit/SKILL.md
$ npx degit sequenzia/agent-alchemy/claude/git-tools/skills/git-commit ~/.agents/skills/git-commitGemini CLI에 git-commit skill 설치
~/.gemini/skills/git-commit/SKILL.md
$ npx degit sequenzia/agent-alchemy/claude/git-tools/skills/git-commit ~/.gemini/skills/git-commitClaude.ai에 git-commit skill 설치
npx degit sequenzia/agent-alchemy/claude/git-tools/skills/git-commit git-commit && zip -r git-commit.zip git-commit # claude.ai → Customize → Skills → + → Create skill → Upload a skill → git-commit.zip
SKILL.md
GitHub에서 보기Git Commit
Create a commit with a conventional commit message based on staged changes. Automatically stages all changes and analyzes the diff to generate an appropriate commit message.
Workflow
Execute these steps in order.
Step 1: Check Repository State
Check for changes to commit:
git status --porcelain
- If output is empty, report: "Nothing to commit. Working directory is clean." and stop.
- If changes exist, continue to Step 2.
Step 2: Stage All Changes
Stage all changes including untracked files:
git add .
Report: "Staged all changes."
Step 3: Analyze Changes
View the staged diff to understand what changed:
git diff --cached --stat
git diff --cached
Analyze the diff to determine:
- The type of change (feat, fix, docs, refactor, etc.)
- The scope (optional, based on affected files/modules)
- A concise description of what changed
Step 4: Construct Commit Message
Build a conventional commit message following this format:
<type>(<optional-scope>): <description>
[optional body]
Types:
feat- New featurefix- Bug fixdocs- Documentation onlystyle- Formatting, no code changerefactor- Code restructuring without behavior changetest- Adding or updating testschore- Maintenance tasksbuild- Build system or dependenciesci- CI configurationperf- Performance improvement
Rules:
- Use imperative mood ("add" not "added")
- Use lowercase
- No trailing period
- Keep description under 72 characters
- Add a body only for complex changes or breaking changes
- Do NOT add co-author, attribution, or "Generated with" lines
Step 5: Create Commit
Create the commit using a heredoc for proper formatting:
git commit -m "$(cat <<'EOF'
<commit message here>
EOF
)"
Step 6: Handle Result
On success:
- Report the commit hash: "Committed: {short_hash} - {message}"
On pre-commit hook failure:
- Report: "Pre-commit hook failed. The commit was NOT created."
- Explain what the hook reported
- Instruct: "Fix the issues above and run the commit command again. Do NOT use --amend as that would modify the previous commit."
Error Recovery
If the commit fails:
- Hook failure: Fix the reported issues, then stage and commit again (do NOT amend)
- Unstage changes:
git reset HEADto unstage without losing changes
Notes
- This command stages ALL changes including untracked files
- Pre-commit hooks run automatically; their failures mean no commit was created
- Always create a NEW commit after hook failure, never amend the previous commit
이 스킬의 파일
1git-commit skill 질문
Claude Code에 git-commit skill을 어떻게 설치하나요?
npx degit sequenzia/agent-alchemy/claude/git-tools/skills/git-commit ~/.claude/skills/git-commit를 실행합니다. Claude Code는 ~/.claude/skills(모든 프로젝트) 또는 .claude/skills(한 프로젝트)에서 skills를 로드하며, 설명이 작업과 일치할 때 skill을 사용합니다.
git-commit skill을 사용할 수 있는 클라이언트는 무엇인가요?
Agent Skills 형식을 읽는 모든 클라이언트(Claude Code, Codex, Gemini CLI, claude.ai(ZIP으로 업로드))가 사용할 수 있습니다. skill 내 스크립트는 클라이언트가 코드 실행을 허용하는 경우에만 실행됩니다.
What format does the commit message follow?
It follows the conventional commit format, including a type, an optional scope, and a description.