Skip to content
Skills Library
Programming · Building & coding

commit

/commit

Commits the current work with a Conventional Commits message (`type(scope): summary`), with the scope taken from the changed workspace packages and the ticket placed according to project config. Uses the changeset summary as the message when the repo uses Changesets, and works on a gh-stack branch when the repo uses stacked PRs, otherwise on a plain branch. Decides between amending and a new commit. Use when the user types /commit, or asks to "commit this", "commit my changes", "write the commit message" or "amend the commit".

Licence
MIT
Last repository change
03.11.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 03.11.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

Commits the current work with a Conventional Commits message (`type(scope): summary`), with the scope taken from the changed workspace packages and the ticket placed according to project config. Uses the changeset summary as the message when the repo uses Changesets, and works on a gh-stack branch when the repo uses stacked PRs, otherwise on a plain branch. Decides between amending and a new commit. Use when the user types /commit, or asks to "commit this", "commit my changes", "write the commit message" or "amend the commit".

Triggers from the description

commit thiscommit my changeswrite the commit messageamend the commit
Original author description

Commits the current work with a Conventional Commits message (`type(scope): summary`), with the scope taken from the changed workspace packages and the ticket placed according to project config. Uses the changeset summary as the message when the repo uses Changesets, and works on a gh-stack branch when the repo uses stacked PRs, otherwise on a plain branch. Decides between amending and a new commit. Use when the user types /commit, or asks to "commit this", "commit my changes", "write the commit message" or "amend the commit".

How it works

  1. Config
  2. 1. Look at the change
  3. 2. Pick the branch
  4. 3. Write the message
  5. 4. New commit or amend
  6. 5. After the commit
Original SKILL.md headings · 115 lines, 815 words
SKILL.md preview
---
name: commit
description: Commits the current work with a Conventional Commits message (`type(scope): summary`), with the scope taken from the changed workspace packages and the ticket placed according to project config. Uses the changeset summary as the message when the repo uses Changesets, and works on a gh-stack branch when the repo uses stacked PRs, otherwise on a plain branch. Decides between amending and a new commit. Use when the user types /commit, or asks to "commit this", "commit my changes", "write the commit message" or "amend the commit".
---

# Commit

Commit the work in the working tree with a clear message, on the right branch.

## Config

Read `.claude/git-workflow.local.md` in the project root. It is YAML front matter only.
For each key below that is missing, ask the user once, then write it to that file
(create the file if needed) before you continue. Never guess a value.

| Key | Meaning | Example |
|---|---|---|
| `ticket_in` | Where the ticket reference goes: `trailer`, `branch` or `none` | `trailer` |
| `ticket_pattern` | Optional, default `[A-Z]+-[0-9]+`. Regex of a ticket key | `[A-Z]+-[0-9]+` |

Optional keys are never asked for: use the default in their meaning.

## 1. Look at the change

```bash
git status --short
git diff --stat
git diff --cached --stat
```

If nothing is staged, stage the files that belong to the task the user just finished. Leave unrelated files alone and mention them at the end. If the change covers two unrelated concerns, ask whether to split it before you commit.

## 2. Pick the branch

Check whether the repo uses gh-stack: `gh extension list` shows `github/gh-stack` and `gh stack view --json` succeeds on the current branch.

Requires (stack path only): the gh-stack GitHub CLI extension. If the repo uses stacked branches and `gh stack` is not installed, tell the user to run `gh extension install github/gh-stack`, then stop.

| Situation | Action |
|---|---|
| On the default branch, no stack | `git checkout -b <name>` with a name that reflects the change, or the ticket's branch name |
| On the default branch, repo uses stacks | `git checkout -b <name>` then `gh stack init <name>` |
| On a stack branch, the change belongs to it | Stay on it |
| On a stack branch, the change is a new concern | Go to the top of the stack, then `gh stack add <name>` |
| On a feature branch, no stack | Stay on it |

Follow the `stack` skill for every `gh stack` command. Never run one that opens a prompt.

## 3. Write the message

Format:

```
type(scope): imperative summary

Optional body: why the change was made, in plain sentences.

Refs: ORD-123
```

**Type.** `feat` for new behaviour, `fix` for a bug, `refactor`, `perf`, `test`, `docs`, `build`, `ci`, or `chore` for upkeep such as dependency bumps.

**Scope.** Take it from the changed workspace packages. Read the `name` field of the `package.json` nearest to each changed file and drop the npm scope (`@acme/storefront` becomes `storefront`).
- One package changed: use its name.
- Two or three packages: join them with commas, for example `feat(storefront,checkout): ...`.
- More than three, or a change only at the repo root: leave the scope out.
- Not a monorepo: use the top-level folder of the change, or leave the scope out.

**Summary.** Imperative mood, lower case after the colon, no full stop, at most 72 characters for the whole first line.

**Changesets.** If the repo has a `.changeset/` folder and this change added a changeset file, reuse its summary as the commit summary, rewritten in the imperative if needed. If the change touches a published package and has no changeset, run the `changeset` skill first.

**Ticket.** Find the ticket key with `ticket_pattern` in the branch name, then in the user's request.
- `trailer`: add `Refs: <ticket>` as the last line, after a blank line. With no ticket found, ask once. If the user has none, leave the trailer out.
- `branch`: the ticket lives in the branch name only. Do not repeat it in the message.
- `none`: no ticket anywhere.

Examples:

```
feat(storefront): let customers save a delivery note

Refs: ORD-482
```

```
fix(checkout): keep the coupon when the cart is reloaded
```

```
chore(catalog,search): update date-fns to 4.1.0
```

## 4. New commit or amend

| Situation | Action |
|---|---|
| Repo uses stacks and the branch already holds its one commit, which this work continues | `git commit --amend`, keep the subject unless the scope of the branch changed |
| Repo uses stacks and the branch has no commit of its own yet | New commit |
| The last commit is already pushed and other people may have pulled it, outside a stack | New commit |
| Plain branch, the work is a separate step | New commit |
| The user asked to amend | Amend |

Count a branch's own commits with `git rev-list --count <parent>..HEAD`, where the parent is the branch below it in the stack or the default branch.

Pass the message with a heredoc so the trailer survives:

```bash
git commit -F - <<'EOF'
feat(storefront): let customers save a delivery note

Refs: ORD-482
EOF
```

## 5. After the commit

Show `git log --oneline -1` and the branch name. On a stack, offer `gh stack submit --auto`. Do not push unless the user asks.

Versions

RepositoryScoreLicence
This page · ShepardVasNormandy/claude-skills100MIT
rmsaitam/skill-git-conventions100MIT
opsmill/infrahub100Apache-2.0
kdlbs/kandev100AGPL-3.0
vinta/hal-9000100MIT
restarter/lets-workflow100MIT
mickeyyaya/evolve-loop100Apache-2.0
friendlyinternet/nuxt-crouton100MIT
yonatangross/orchestkit100MIT

Database snapshot: 13.11.2026 · package version 8a9b9d0cfd72 (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-commits
    Use when the user asks to commit, create a commit, write a commit message, or runs /commit or /conventional-commits in any git repository - commit, commitar, mensagem de commit, conventional commits.
  • 100commit-message
    Write a Conventional Commits message and commit the current changes in Spotcraft. Use when a step is finished and verified, or when the user asks for a commit. The agent commits and pushes its branch; it merges and tags only when the user asks.
  • 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.
  • 96conventional-commit
    Write a Conventional Commits v1.0.0 message for the current changes. Use when writing or checking a commit message or PR title.
  • 90Conventional Commits
    This skill should be used when the user asks to 'write commit message', 'create conventional commit', 'format git commit', 'follow commit conventions', 'structure commit message'. Provides Conventional Commits patterns for consistent, machine-readable commit messages.
  • 100creating-commits
    Create well-structured git commits with clear, conventional commit messages. Use this skill whenever the user asks to commit changes, "commit this", "save my work", "make a commit", "write a commit message", or after completing a coding task when changes need to be committed.…

Feedback and reports

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