commit
SKILL.md
Commit current work
Instructions
-
Check Status: Run the following commands to understand the current state:
git status --shortgit diff --statgit log --oneline -3
-
Analyze Changes:
- Review the output to understand what has changed.
- If
git diffdoesn't provide enough info (e.g., new files), read the files or use your working memory. - Determine if the work should be split into multiple logical commits.
-
Stage Changes:
- New/modified files:
git add <file1> <file2> ... - Deleted files:
git add -u <path>(plaingit addfails on paths no longer on disk) - Mixed (new + deleted): combine both commands, or use
git add -ufor deletions thengit addfor new files
- New/modified files:
-
Commit:
- For each logical change, write a commit message in the following format:
- Short title description (< 80 characters)
- 2~3 bullet points (< 80 characters) with a quick description
- For single-line messages:
git commit -m "subject line" - For multi-line messages (sandbox-safe, NEVER use heredoc):
mkdir -p "$TMPDIR" && printf '%s\n' "subject line" "" "- bullet 1" "- bullet 2" > "$TMPDIR/commit_msg.txt" && git commit -F "$TMPDIR/commit_msg.txt"
- For each logical change, write a commit message in the following format:
Important Notes
- Prepend
GIT_EDITOR=trueto all git commands you run, especially the ones looking at diffs, to avoid blocking. - If you're at the start of the session, use subagents to summarize changes made by others if needed.
- Only commit work when instructed or when a task is complete.
Optional: Ask me if I would like to push the commit.
Weekly Installs
10
Repository
yulonglin/dotfilesGitHub Stars
3
First Seen
Mar 1, 2026
Security Audits
Installed on
opencode10
gemini-cli10
codebuddy10
github-copilot10
codex10
kimi-cli10