skills/commit/SKILL.md
Stages files, generates a conventional commit message from the diff, and commits. Use this skill whenever the user asks to commit, save changes, make a commit, stage and commit, or says things like "commit this", "commit my changes", "save my work to git", or "create a commit". Also trigger when the user uses shorthand like /commit.
npx skillsauth add switch-dimension/switch-dimension-skills commitInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Stage changes, generate a clear commit message, and commit — all in one step.
Run these in parallel:
git status — see what's changed (never use -uall)git diff and git diff --cached — see staged and unstaged changesgit log --oneline -5 — match the repo's commit styleBefore staging, scan for files that should not be committed:
.env, .env.*credentials.json, secrets.*, *.pem, *.keyIf found, warn the user and exclude them from staging. Only commit them if the user explicitly confirms.
git add <specific-files> over git add . when there are fewer than 10 files, to keep things explicit.Use conventional commits format:
<type>(<optional scope>): <short summary>
<optional body — what and why, not how>
Types: feat, fix, docs, style, refactor, test, chore, build, ci, perf
Rules for the message:
Examples:
feat(auth): add JWT token refresh on expiry
fix: prevent duplicate entries in search results
The deduplication filter was applied after pagination,
causing duplicates when results spanned page boundaries.
chore: update dependencies and lock file
Use a heredoc to preserve formatting:
git commit -m "$(cat <<'EOF'
feat(scope): summary here
Optional body here.
Co-Authored-By: Claude <[email protected]>
EOF
)"
Always append the Co-Authored-By trailer.
Run git status after committing to verify it succeeded. Report the commit hash and summary to the user.
--force, no --no-verify, no skipping hooks-i flags (not supported in this environment)If a pre-commit hook fails, fix the issue, re-stage, and create a new commit (don't amend).
testing
Reviews project changes and updates relevant documentation to match current behavior, setup, configuration, security, operations, and usage. Use when the user asks to update docs, audit documentation, check docs drift, prepare a handoff, document recent changes, or ensure project docs are current.
tools
Starts the dev server, opens the browser, and tests recent changes end-to-end. Use this skill whenever the user says things like "test my changes", "check if this works", "run and test", "smoke test", "verify the app", "open the browser and test", "make sure it works", "test the UI", "check for errors", or asks you to visually verify, click through flows, or check console logs after making code changes. Also trigger when the user wants to see their app running and validated in the browser, even if they don't say "test" explicitly — phrases like "does it look right?", "spin it up and check", or "try it out" count too.
tools
Reviews new or modified agent skills for quality, safety, discoverability, structure, and repository best practices. Use when reviewing skill submissions, pull requests that add or change SKILL.md files, skill metadata, helper scripts, examples, or when the user asks to review a skill.
documentation
Ensures a .docs folder exists, creates project-log.md, and records current project status for handoff. Use when ending a session, before context switches, when handing off to another person or agent, or when the user asks to save project status or create a project log.