smithery.ai

git-commit-instructions

Practical Git hygiene for staging and committing: review diffs, stage intentionally, avoid committing noise/build artifacts/secrets, and recover from accidental staging or committing.

First seen May 3, 2026

Installation

$ npx skills add https://smithery.ai

Summary

  • Practical Git hygiene for staging and committing: review diffs, stage intentionally, avoid committing noise/build artifacts/secrets, and recover from accidental staging or committing.
  • Use when a user asks how to commit changes, write a commit workflow checklist, unstage/remove accidental files, or verify `.gitignore` behavior.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,851 B
  • docs SUMMARY.md 359 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

Git Commit Instructions

Overview

Use this checklist to keep commits focused, reviewable, and free of build artifacts and other noise.

Before Every Commit

git status --porcelain
git diff --stat          # unstaged changes
git diff --cached --stat # staged changes

Stage Intentionally (preferred)

git add path/to/file.go path/to/dir/

Use git add -A only when you are sure you want every change.

Inspect What Will Be Committed

git diff --cached --name-only

Commit Pattern

git commit -m "Short summary of change"
git rev-parse HEAD

Never Commit (common noise)

Avoid committing:

  • node_modules/, vendor/
  • dist/, build/, out/
  • .env, .env.local
  • binaries (.exe, .bin, etc.)
  • logs (*.log)
  • OS/IDE junk (.DS_Store, Thumbs.db, .idea/, .vscode/ unless shared)
  • test artifacts (coverage/, *.cover)
  • temp dirs (tmp/, temp/)

Quick Checks

git status --ignored
git check-ignore -v path/to/file

If You Accidentally Staged Something

git reset HEAD path/to/file   # unstage one file
git reset HEAD                # unstage everything

If Noise Got Committed

git rm --cached path/to/noise
echo "path/to/noise" >> .gitignore
git add .gitignore
git commit --amend --no-edit  # if it was the last commit

Reference

Load references/git-commit-instructions.md for the full command list and recovery patterns.