Commit Flow
Use when the user asks to commit, stage, or prepare changes for a commit.
Steps
- Run doc-gen — activate/run the
gen-docsskill first to update documentation based on code changes. - Check current changes — run
git statusandgit diff(orgit diff --cached) to see exactly what changed. - Review code — read modified/added files to understand what is actually needed.
- Stage necessary code only — read files directly; add files that contain real, needed changes. For any file that looks unrelated, temporary, or unclear, ask the user: "Should I stage
<file>? It contains<brief summary>" — do not assume. - Base message on code change — derive the commit message from the actual diff/content (e.g.,
feat: add docs for skills a). - Confirm with user — show proposed message, doc-gen result, and staged files; ask for approval (
yes/approve) before committing. - Commit code — run
git commitwith the approved message, then show a brief summary of what was committed. - Ask about push — ask the user if they want to push (
git push).
Rules
- Use
git,read_file,write_file, and file tools directly within this flow — do not ask for permission for each tool call. - If unsure whether a change is needed, ask: "Should I stage
<file>? It contains<brief summary>" - Run
gen-docsbefore committing. - Suggest a commit message derived from the actual diff (format example:
feat: add docs for skills a). - Confirm with user (
yes/approve) beforegit commitand beforegit push; other steps proceed directly.