Przejdź do treści
Biblioteka skilli
Programowanie · Automatyzacja

git-commit

/git-commit

Wykonuje commit: wykrywa typ i zakres zmian, tworzy gałąź przy main, generuje komunikat Conventional Commits i pozwala poprawić pola.

Repozytorium
md ↗
Licencja
MIT
Ostatnia zmiana repozytorium
13.11.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 13.11.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Wykonuje commit: wykrywa typ i zakres zmian, tworzy gałąź przy main, generuje komunikat Conventional Commits i pozwala poprawić pola.

Oryginalny opis (EN)

Execute git commit with conventional commit message analysis, intelligent staging, and message generation. Use when user asks to commit changes, create a git commit, or mentions "/commit". Supports: (1) Auto-detecting type and scope from changes, (2) Creating a feature branch when on main/master before committing, (3) Generating conventional commit messages from diff, (4) Interactive commit with optional type/scope/description overrides, (5) Intelligent file staging for logical grouping

Jak działa

  1. Overview
  2. Conventional Commit Format
  3. Commit Types
  4. Breaking Changes
  5. Host shell
  6. Workflow
  7. Best Practices
  8. Git Safety Protocol
  9. Project Notes (doocs/md)
Sekcje z nagłówków SKILL.md, w oryginale · 184 linii, 734 słów
Podgląd SKILL.md
---
name: git-commit
description: 'Execute git commit with conventional commit message analysis, intelligent staging, and message generation. Use when user asks to commit changes, create a git commit, or mentions "/commit". Supports: (1) Auto-detecting type and scope from changes, (2) Creating a feature branch when on main/master before committing, (3) Generating conventional commit messages from diff, (4) Interactive commit with optional type/scope/description overrides, (5) Intelligent file staging for logical grouping'
license: MIT
---

# Git Commit with Conventional Commits

## Overview

Create standardized, semantic git commits using the Conventional Commits specification. Analyze the actual diff to determine appropriate type, scope, and message.

## Conventional Commit Format

```
<type>[optional scope]: <description>

[optional body]

[optional footer(s)]
```

## Commit Types

| Type       | Purpose                        |
| ---------- | ------------------------------ |
| `feat`     | New feature                    |
| `fix`      | Bug fix                        |
| `docs`     | Documentation only             |
| `style`    | Formatting/style (no logic)    |
| `refactor` | Code refactor (no feature/fix) |
| `perf`     | Performance improvement        |
| `test`     | Add/update tests               |
| `build`    | Build system/dependencies      |
| `ci`       | CI/config changes              |
| `chore`    | Maintenance/misc               |
| `revert`   | Revert commit                  |

## Breaking Changes

```
# Exclamation mark after type/scope
feat!: remove deprecated endpoint

# BREAKING CHANGE footer
feat: allow config to extend other configs

BREAKING CHANGE: `extends` key behavior changed
```

## Host shell

Do **not** assume Bash. Cursor on Windows uses PowerShell, where `&&`, `$(cat <<'EOF')`, and POSIX `[ -z ... ]` fail.

- Prefer **separate git invocations** over chained one-liners.
- If you must chain: PowerShell uses `;` (or separate calls). Bash/zsh may use `&&`.
- Examples below show Bash and PowerShell when the syntax differs.

## Workflow

### 1. Analyze Diff

```bash
# If files are staged, use staged diff
git diff --staged

# If nothing staged, use working tree diff
git diff

# Also check status
git status --porcelain
```

From the diff, determine the commit **type** and a short **description** (needed for branch naming in step 2).

### 2. Ensure Feature Branch

If the current branch is `main` or `master`, create a feature branch **before** staging or committing.

```bash
git branch --show-current
```

**Branch naming** — documented prefixes in `CONTRIBUTING.md`: `feat/`, `fix/`, `docs/`. For other commit types, use the commit type as prefix (e.g. `chore/`):

```
<type>/<kebab-case-description>
```

| Commit type | Branch prefix | Example |
| ----------- | ------------- | ------- |
| `feat`      | `feat/`       | `feat/custom-shortcuts` |
| `fix`       | `fix/`        | `fix/upload-timeout` |
| `docs`      | `docs/`       | `docs/contributing-guide` |
| other types | `<type>/`     | `chore/add-create-pr-skill` (aligns with commit type; not listed in CONTRIBUTING.md) |

Rules for `<kebab-case-description>`:

- Lowercase, words separated by hyphens
- Derived from the commit description (drop scope, articles, punctuation)
- Keep it short (2–5 words), e.g. `add create pr skill` → `add-create-pr-skill`

```bash
# Example: chore commit about adding create-pr skill
git checkout -b chore/add-create-pr-skill
```

Do **not** commit directly on `main` or `master`. If the user explicitly asks to commit on the default branch, confirm before proceeding.

### 3. Stage Files (if needed)

If nothing is staged or you want to group changes differently:

```bash
# Stage specific files
git add path/to/file1 path/to/file2

# Stage by pattern
git add *.test.*
git add src/components/*
```

Do **not** run `git add -p` (interactive; agents cannot complete it). Stage explicit paths instead.

**Never commit secrets** (.env, credentials.json, private keys).

### 4. Generate Commit Message

Analyze the diff to determine:

- **Type**: What kind of change is this?
- **Scope**: What area/module is affected?
- **Description**: One-line summary of what changed (present tense, imperative mood, <72 chars)

### 5. Execute Commit

Single line (any shell):

```bash
git commit -m "<type>[scope]: <description>"
```

Multi-line with body/footer:

```bash
# Bash / zsh
git commit -m "$(cat <<'EOF'
<type>[scope]: <description>

<optional body>

<optional footer>
EOF
)"
```

```powershell
# PowerShell
git commit -m @"
<type>[scope]: <description>

<optional body>

<optional footer>
"@
```

## Best Practices

- One logical change per commit
- Present tense: "add" not "added"
- Imperative mood: "fix bug" not "fixes bug"
- Reference issues: `Closes #123`, `Refs #456`
- Keep description under 72 characters

## Git Safety Protocol

- NEVER update git config
- NEVER run destructive commands (--force, hard reset) without explicit request
- NEVER skip hooks (--no-verify) unless user asks
- NEVER force push to main/master
- If commit fails due to hooks, fix and create NEW commit (don't amend)

## Project Notes (doocs/md)

- Commit messages and PR titles must be in **English** (see `AGENTS.md` and `CONTRIBUTING.md`)
- Branch naming: `feat/`, `fix/`, `docs/` per `CONTRIBUTING.md`; for other commit types use `<type>/` prefix; never commit on `main`/`master` — create a branch first (step 2)
- Pre-commit runs `eslint --fix` via lint-staged; if the hook modifies files, fix and create a new commit instead of amending

Wersje

RepozytoriumWynikLicencja
Ta strona · doocs/md100MIT
devantler-tech/ksail100MIT
marcusrbrown/systematic100MIT
dev-soprasteriano/alf100MIT
github/awesome-copilot100MIT
bastidood/skills100MPL-2.0
atretyak1985/swarmery100Apache-2.0
mgiovani/cc-arsenal100MIT
doocs/leetcode100CC-BY-SA-4.0

Migawka bazy z 13.11.2026 · wersja paczki cec6def45cfb (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100commit
    Wykonuje git commit z analizą konwencji conventional commits, inteligentnym dodawaniem plików do staging i generowaniem komunikatu.
  • 100commit
    Analizuje diffy i staging, a następnie generuje komunikaty conventional commit wyjaśniające, dlaczego zmiana powstała, z automatycznym typem i zakresem.
  • 100git-commit-only
    Tworzy jeden lokalny commit Git bez pushowania: generuje typ, zakres i komunikat Conventional Commit z diffa, obsługuje zakres zmian i pisze wieloczęściową treść dla nietrywialnych zmian.
  • 100create-commit-message
    Generuje komunikat Conventional Commit ze zmian przygotowanych w git, gdy trzeba napisać lub sformatować commit.
  • 100git-commit-workflow
    Opisuje konwencje komunikatów conventional commit, dodawania plików i grupowania zmian oraz automatycznego wykrywania powiązanych zgłoszeń.
  • 100commit
    Analizuje zmiany w staging i pisze komunikat conventional commit.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.