Skip to content
Skills Library
Programming · Automation

git-commit

/git-commit

Commit staged changes with conventional commit message. Use when user says "commit changes", "commit this", "save my changes", or wants to create a git commit.

Licence
MIT
Last repository change
31.05.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 31.05.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Commit staged changes with conventional commit message. Use when user says "commit changes", "commit this", "save my changes", or wants to create a git commit.

Triggers from the description

commit changescommit thissave my changes
Original author description

Commit staged changes with conventional commit message. Use when user says "commit changes", "commit this", "save my changes", or wants to create a git commit.

How it works

  1. Workflow
  2. Error Recovery
  3. Notes
  4. Integration Notes
Original SKILL.md headings · 137 lines, 524 words
SKILL.md preview
---
name: git-commit
description: Commit staged changes with conventional commit message. Use when user says "commit changes", "commit this", "save my changes", or wants to create a git commit.
dependencies: []
---

# 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:

```bash
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:

```bash
git add .
```

Report: "Staged all changes."

---

### Step 3: Analyze Changes

View the staged diff to understand what changed:

```bash
git diff --cached --stat
```

```bash
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 feature
- `fix` - Bug fix
- `docs` - Documentation only
- `style` - Formatting, no code change
- `refactor` - Code restructuring without behavior change
- `test` - Adding or updating tests
- `chore` - Maintenance tasks
- `build` - Build system or dependencies
- `ci` - CI configuration
- `perf` - 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:

```bash
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 HEAD` to 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

## Integration Notes

**What this component does:** Automates git commit creation with conventional commit message format based on staged changes analysis.

**Capabilities needed:**
- Shell command execution (for git commands)
- User interaction / prompting (for commit message confirmation if needed)

**Adaptation guidance:**
- This skill stages all changes with `git add .` then analyzes the diff to generate a conventional commit message
- The bash commands are standard git operations that work in any shell environment
- Pre-commit hook handling is described — adapt to your harness's hook support

Versions

RepositoryScoreLicence
This page · sequenzia/agent-alchemy100MIT
devantler-tech/ksail100MIT
marcusrbrown/systematic100MIT
dev-soprasteriano/alf100MIT
github/awesome-copilot100MIT
doocs/md100MIT
bastidood/skills100MPL-2.0
atretyak1985/swarmery100Apache-2.0
mgiovani/cc-arsenal100MIT

Database snapshot: 13.11.2026 · package version 3a81bfd38b66 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100conventional-commit
    Write a Conventional Commits message for the staged changes. Use when the user asks to commit, write a commit message, or summarize staged changes for git.
  • 100commit
    Analyze staged changes and write a conventional commit message. Use when staged changes are ready to commit or a message needs wording.
  • 100create-commit-message
    Generate a Conventional Commit message from staged git changes when the user asks to write a commit message, create a commit, or format a commit
  • 100commit
    Create a git commit with an auto-generated conventional message from staged changes. Use for 'commit', 'save my work', or 'make a commit'. Does not push or open PRs; use `create-pr` for PR-only flow and `ship` for verify+push+merge.
  • 100commit
    Create a git commit after completing a task. Use this skill after finishing a logical unit of work to commit changes with a detailed conventional commit message. Always confirms with user before applying the commit. Never pushes to remote. Triggers include: "commit this",…
  • 100git-commit-writer-free
    Generate conventional commit messages from staged git changes. Use when the user asks to write commit message, generate commit, what should my commit say, or after the user runs git add and wants a commit message for staged files.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.