git-commit skill
Automates the process of staging changes and creating commits using the conventional commit message format.
- GitHub yıldızları
- 45
- Dosyalar
- 1
- Son commit
- 31 May 2026
- Lisans
- MIT
- İzin verilen araçlar
- 2
git-commit skill ne işe yarar?
git-commit bir agent skill'dir. Automates the process of staging changes and creating commits using the conventional commit message format.
Özet, skill'in SKILL.md dosyasından oluşturuldu.
git-commit skilli hakkında
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.
Bir agent bununla neler yapabilir
- 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'in SKILL.md dosyasından yazılmıştır. Her kullanım durumu oradaki bir alıntı ile kontrol edilir.
git-commit skill nasıl kurulur
Her komut, skill klasörünü istemcinin skills dizinine kopyalar. Yüklemek için istemciyi yeniden başlatın veya yeni bir oturum başlatın.git-commit skill'ini Eklenti uygulamasına kur
/plugin marketplace add sequenzia/agent-alchemy /plugin install agent-alchemy-git-tools@agent-alchemy
git-commit skill'ini Claude Code uygulamasına kur
~/.claude/skills/git-commit/SKILL.md
$ npx degit sequenzia/agent-alchemy/claude/git-tools/skills/git-commit ~/.claude/skills/git-commitgit-commit skill'ini Claude Code (project) uygulamasına kur
.claude/skills/git-commit/SKILL.md
$ npx degit sequenzia/agent-alchemy/claude/git-tools/skills/git-commit .claude/skills/git-commitgit-commit skill'ini Codex uygulamasına kur
~/.agents/skills/git-commit/SKILL.md
$ npx degit sequenzia/agent-alchemy/claude/git-tools/skills/git-commit ~/.agents/skills/git-commitgit-commit skill'ini Gemini CLI uygulamasına kur
~/.gemini/skills/git-commit/SKILL.md
$ npx degit sequenzia/agent-alchemy/claude/git-tools/skills/git-commit ~/.gemini/skills/git-commitgit-commit skill'ini Claude.ai uygulamasına kur
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'da görüntüleGit 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
Bu becerideki dosyalar
1git-commit skill soruları
git-commit skill'ini Claude Code uygulamasına nasıl kurarım?
npx degit sequenzia/agent-alchemy/claude/git-tools/skills/git-commit ~/.claude/skills/git-commit komutunu çalıştırın. Claude Code, skill'leri ~/.claude/skills (tüm projeler) veya .claude/skills (tek proje) konumundan yükler ve açıklaması görevle eşleştiğinde skill'i kullanır.
git-commit skill'ini hangi istemciler kullanabilir?
Agent Skills biçimini okuyan her istemci: Claude Code, Codex, Gemini CLI ve claude.ai (ZIP olarak yükleyin). Skill içindeki betikler yalnızca istemcinin kod çalıştırmaya izin verdiği yerlerde çalışır.
What format does the commit message follow?
It follows the conventional commit format, including a type, an optional scope, and a description.