Create a Conventional Commit safely. Guards against committing to main, validates format, stages and commits. Chains to push-and-pr when user mentions push. Triggers: "commit", "/commit", "закоммить", "сделай коммит", "коммит и пуш", "commit and push"
One commit — one purpose. Split different concerns into separate commits.
Never commit secrets: tokens, keys, .env, database dumps, PII
Prefer feature branches (feat/<name>, fix/<name>, chore/<name>) over committing to main
Algorithm
Guard: git status — if clean, stop ("Nothing to commit"). If branch is main — ask user (AskUserQuestion): "You're on main. Commit directly or create a feature branch?" If user says branch — help create one and switch.
Header:
If argument provided — use it (validate format).
Otherwise — inspect changes, generate a Conventional Commit header.
Stage & Commit: git add -A → git commit -m "<header>" (add body/footer if multi-concern change warrants it).
Output: Committed "<header>".
Chain to push: if the original user request contains any of and push, и пуш, + pr, and pr, и пр, сделай пр, push it — immediately execute the push-and-pr skill algorithm without re-asking for confirmation (except the merge step inside push-and-pr). Otherwise — briefly suggest /push-and-pr on the next line and stop.