commit-with-context
Installation
SKILL.md
Contains Shell Commands
This skill contains shell command directives (!`command`) that may execute system commands. Review carefully before installing.
Context
- Current status: !
git status --short - Staged changes: !
git diff --cached - Unstaged changes: !
git diff - Current branch: !
git branch --show-current - Recent commit messages: !
git log -5 --format='%h%n%s%n%b%n---'
Scope the commit
- Treat a non-empty index as the intended commit scope. Do not stage additional paths unless the user explicitly asks you to select changes from the worktree.
- When the index is empty, stage only paths that belong to the requested task after inspecting their contents, including relevant untracked files.
- Do not include unrelated or pre-existing changes. If the index mixes unrelated work, stop and report the conflict instead of silently restaging it.
- Do not modify source files while performing the commit workflow.