---
name: ase-repo-commit
argument-hint: "[--help|-h]"
description: >
Determine commit message for staged Git changes. Use when the user
asks to "give", "write", "craft", "suggest", or "propose" a "commit
message", or wants to know how to "describe" or "phrase" the staged
changes for a commit.
user-invocable: true
disable-model-invocation: false
effort: medium
allowed-tools:
- "Bash(git diff *)"
- "Bash(git ls-files *)"
---
@${CLAUDE_SKILL_DIR}/../../meta/ase-control.md
@${CLAUDE_SKILL_DIR}/../../meta/ase-skill.md
@${CLAUDE_SKILL_DIR}/../../meta/ase-getopt.md
Git Commit
$ARGUMENTS
Help to *craft* a *concise commit message* for the
currently staged Git changes.
1.
Run the following command to find out the overview of what changes
are currently staged in the Git *index* for commit, capturing its
output into :
`git diff --cached --stat`
Only output the following , then expand the following
hint, and then *STOP* immediately:
⧉ **ASE**: ✪ skill: **ase-repo-commit**, ▶ status: **no changes to commit**
Nothing is staged -- use `git add -p` or `/ase-repo-stage` to stage the intended changes first.
Then capture the staged changes themselves into : if
reports a total of up to about 1000 changed lines, run `git diff
--cached`, otherwise run `git diff --cached -- ` only for
the (up to) 5 files with the most changed lines, and rely on
for the remaining files.
2.
Craft a commit in the following format:
`: `
The known s (kept deliberately in sync with the intent groups
of the `ase-repo-diff` and `ase-repo-changelog` skills) and their
usual corresponding kind of change are:
- `FEATURE`: new functionality or configuration
- `IMPROVEMENT`: improved functionality or configuration
- `BUGFIX`: corrected functionality or configuration
- `UPDATE`: updated functionality or configuration
- `CLEANUP`: cleaned up functionality or configuration
- `REFACTOR`: refactored functionality or configuration
The rules for generating are:
- Use a maximum of 60-80 characters
- Use imperative mood ("add" not "added")
- Use *no* period at the end
- Use *no* Markdown formatting
- Never add `Co-Authored-By` trailers to commit messages
- Derive it *exclusively* from and , and never from
the recollection of edits of the session, as these may be still
unstaged or belong to a parallel session
- Never include secrets, tokens, credentials, or internal URLs
Set to a comma-separated list of the spanned s.
Set to empty.
Output this crafted commit message with the following :
Commit Message:
****
Do *not* output any further explanation.
Finally, give the closing hint by expanding the following (which,
depending on the configured , may expand into
nothing and hence emit no output at all):
The staged changes mix -- consider splitting them into separate commits with `/ase-repo-dissect --sequential` or `/ase-repo-stage`.
The `CHANGELOG.md` changes are still unstaged -- use `git add -p CHANGELOG.md` or `/ase-repo-stage --entry` to stage them before committing.
The staged changes do not touch `CHANGELOG.md` -- use `/ase-repo-changelog` to update its entries before committing.