commit-work
Commit work as TICKET-123: short description; conventional commits only when a change has no ticket.
npx skills@latest add abijith-suresh/skills --skill commit-workTurn the current diff into commits, one intent per commit. A change that
belongs to a Jira ticket is committed as TICKET-123: short description with
no conventional-commit type. Only a change with no ticket uses the conventional
format. Ticketed and non-ticket changes can mix in one split; each commit
carries the format its own change needs. Do not push, and do not commit on
main, master, develop, or the remote default branch unless the user
explicitly overrides this guardrail. Execute the split without asking.
Steps
-
Check
git branch --show-currentagainst the remote default fromgit symbolic-ref refs/remotes/origin/HEAD --short. If it is the default or a shared integration branch, stop and ask for a feature branch. -
Resolve the ticket. Use the key from the branch, MR, or conversation. Ask for it only when none of them has one.
-
Read
git statusandgit diff HEAD; read every changed file, tracked and untracked. Commit only what the requested work covers; leave scratch and working files out unless the user names them. Scan the diff for secrets, tokens, and private details; if any appear, stop and ask before committing anything. -
Group the changes by intent. Separate a feature from the refactor that made room for it, a fix from unrelated cleanup, generated files from hand-written code, and unrelated modules with different reasons to change. Untracked new files group with the intent they belong to. When in doubt, split.
-
For each group:
Terminal window git add <files>git commit -m "TICKET-123: imperative summary"Stage explicit paths; never
git add .orgit add -A. When the change belongs to a ticket, the key leads the subject and nothing else classifies the commit:UI-214: search results keep the chosen filing order. No conventional-commit type in a ticketed subject. When the change has no ticket, usetype(scope?): imperative summarywith types read from what the repo enforces, falling back tofeat,fix,docs,refactor,perf,test,build,ci, andchore. Keep every subject imperative, lowercase, and without a trailing period. Add a body only when the why is not obvious, and never restate the subject. If a message needsandto join unrelated ideas, split the commit.feat(web): reduce re-renders on the results tableinvents a type for ticketed work.UI-381: keep result rows mounted while filters changeleads with the ticket the reader can look up.When a pre-commit or commit-msg hook rejects a commit, fix the failure, re-stage the files, and commit again with a fresh message. Never amend, and never skip hooks with
--no-verify. Never addCo-Authored-Byor “Generated with” footers; attribution lives outside commit messages. -
Verify before reporting. Re-read
git statusandgit log --oneline, then report the commits you made, name any staged or unstaged changes that remain and why, and tell the user to runmrnext when the work is ready.