git-commit Skill
Automates the process of staging changes and creating commits using the conventional commit message format.
- GitHub Stars
- 45
- Dateien
- 1
- Letzter Commit
- 31. Mai 2026
- Lizenz
- MIT
- Erlaubte Tools
- 2
Was macht der git-commit Skill?
git-commit ist ein Agent Skill. Automates the process of staging changes and creating commits using the conventional commit message format.
Zusammenfassung erzeugt aus der SKILL.md des Skills.
Über den 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.
Was ein agent damit machen kann
- 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.
Geschrieben basierend auf dem SKILL.md des skills. Jeder use case wurde gegen ein zitat daraus geprüft.
So installierst du den git-commit Skill
Jeder Befehl kopiert den Skill-Ordner in das Skills-Verzeichnis des Clients. Starte den Client neu oder beginne eine neue Session, um ihn zu laden.Den git-commit Skill in Plugin installieren
/plugin marketplace add sequenzia/agent-alchemy /plugin install agent-alchemy-git-tools@agent-alchemy
Den git-commit Skill in Claude Code installieren
~/.claude/skills/git-commit/SKILL.md
$ npx degit sequenzia/agent-alchemy/claude/git-tools/skills/git-commit ~/.claude/skills/git-commitDen git-commit Skill in Claude Code (project) installieren
.claude/skills/git-commit/SKILL.md
$ npx degit sequenzia/agent-alchemy/claude/git-tools/skills/git-commit .claude/skills/git-commitDen git-commit Skill in Codex installieren
~/.agents/skills/git-commit/SKILL.md
$ npx degit sequenzia/agent-alchemy/claude/git-tools/skills/git-commit ~/.agents/skills/git-commitDen git-commit Skill in Gemini CLI installieren
~/.gemini/skills/git-commit/SKILL.md
$ npx degit sequenzia/agent-alchemy/claude/git-tools/skills/git-commit ~/.gemini/skills/git-commitDen git-commit Skill in Claude.ai installieren
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
Auf GitHub ansehenGit 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
Dateien in diesem Skill
1git-commit Skill-Fragen
Wie installiere ich den git-commit Skill in Claude Code?
Führe npx degit sequenzia/agent-alchemy/claude/git-tools/skills/git-commit ~/.claude/skills/git-commit aus. Claude Code lädt Skills aus ~/.claude/skills (alle Projekte) oder .claude/skills (ein Projekt) und nutzt einen Skill, wenn seine Beschreibung zur Aufgabe passt.
Welche Clients können den git-commit Skill nutzen?
Jeder Client, der das Agent Skills-Format liest: Claude Code, Codex, Gemini CLI und claude.ai (als ZIP hochladen). Skripte im Skill laufen nur dort, wo der Client Codeausführung erlaubt.
What format does the commit message follow?
It follows the conventional commit format, including a type, an optional scope, and a description.