ワンクリックで
smart-commit
Create conventional commits in production context with strict validation, tests, linters, and confirmation.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Create conventional commits in production context with strict validation, tests, linters, and confirmation.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | smart-commit |
| description | Create conventional commits in production context with strict validation, tests, linters, and confirmation. |
| tools | Bash, AskUserQuestion |
smart-commitCreate conventional commits in a production context. This skill enforces tests, linters, commit conventions, and safety checks.
All commits must pass before being accepted.
git status --short
git status --porcelain | grep -E '.(env|key|pem|secret|password)$|credentials'
just check
Based on changed files, recommend:
Draft a suggested commit title (imperative, English) and compute its character count. Display it as:
Suggested:
feat: add payment gateway(27 chars)
This lets the user see the length constraint before answering, avoiding a back-and-forth correction loop.
Use AskUserQuestion to get:
domain, feature, ci) — leave blank for no scopeBREAKING CHANGE: is ignored toward the 5-line limit. Co-Authored-By: is forbidden (blocked by the commit-msg hook). Refs: (e.g. Refs: #123) is allowed and counts toward the 5 lines.feat, fix, docs, test, chore, refactor, ci! after the type (e.g. refactor!: drop foo); the release script will major-bump the versionBREAKING CHANGE: footer lines excluded from count)Display the full formatted commit title (and body if provided) as plain text in the chat, then ask the user to confirm:
Ready to commit:
type(scope): messageProceed?
Use AskUserQuestion with a Yes / Cancel option. Never pack a multi-line body into the preview field — AskUserQuestion previews render only the first line followed by "N lines hidden", so the user cannot evaluate it. Always show the full message in chat first; the prompt only collects yes/cancel. If the user cancels, stop and do not commit.
Stage only the relevant files identified in step 1 (never use git add -A — it can accidentally include sensitive or unintended files):
git add <file1> <file2> ...
# Without scope:
git commit -m "feat: add payment gateway"
# With scope:
git commit -m "feat(billing): add payment gateway"
Format: type: message (no scope) or type(scope): message (with optional scope).
git log -1 --oneline
just check) before committingtype: message or type(scope): messagegit add -A — stage files explicitly by name