name: commit-conventional description: Write a Conventional Commits message for the current staged diff. Subject ≤50 chars, body only when "why" isn't obvious.
commit-conventional
Mirrors the caveman-commit pattern but runs inside opencode so the remote agent doesn't depend on a Claude-Code plugin.
Process:
- Read the staged diff:
git diff --staged. - Pick the right type:
feat:new user-visible behaviorfix:bug fixrefactor:no behavior changedocs:docs onlytest:test-only changeschore:deps, build, toolingperf:perf without behavior change
- Subject: imperative mood, ≤50 chars, no trailing period.
Form:
<type>(<scope>): <subject>— scope optional. - Body: include ONLY if the "why" isn't obvious from the diff. Wrap at 72. No "this commit does X" filler.
- Output the message and nothing else — no preamble like "Here's your commit:".
Do not actually run git commit — return the message text only;
the user pipes it.