name: commit
about: AI-generated commit message
args:
- name: path
short: 'p'
expect: string
help: 'Path to git repository (default: current directory)'
default: .
actions:
- tag: tag_changed_files
run: cmd
expect: list<string>
check: .+
action: cd {path|resolve} && git diff --name-only --relative
- tag: tag_file_diff
run: cmd
expect: list<string>
action: |
cd {path}
if [ -f "{tag_changed_files}" ]; then
git diff -- "{tag_changed_files}"
fi
- tag: tag_file_summary
run: llm_small
expect: list<string>
action: |
[Task]
Summarize the git diff below in strictly ONE sentence (max 10 words).
Start with an action verb (Add, Fix, Refactor, Change).
Write strictly in English.
[Diff]
{tag_file_diff}
- tag: tag_commit_message
run: llm_medium
expect: string
action: |
[Task]
Summarize all summaries below into ONE short conventional commit message (max 10 words).
Allowed types: feat, fix, docs, refactor, test, chore.
Format strictly: <type>: <commit> (NO parentheses or scopes).
[Summaries]
{tag_file_summary|join:uniq}
- tag: tag_commit
run: cmd
expect: string
confirm: true
action: cd {path} && git add . && git commit -m '{tag_commit_message}'