Agent skill

git-commit

Guide for breaking changes into logical, atomic commits using interactive staging. Use when committing changes that span multiple concerns, when needing to stage parts of files (hunks), when asked to create well-organized commit history, or when changes should be split into multiple commits.

Stars 0
Forks 0

Install this agent skill to your Project

npx add-skill https://github.com/Chemiseblanc/ai/tree/main/plugins/general/skills/git-commit

SKILL.md

Git Commit

Break changes into logical, atomic commits using interactive staging.

Workflow

  1. Analyze all changes
  2. Identify logical units (one concern per commit)
  3. Stage relevant changes (whole files or hunks)
  4. Commit with a good message
  5. Repeat until all changes are committed

Analyzing Changes

bash
git status                 # overview of changed files
git diff                   # unstaged changes
git diff --cached          # staged changes
git diff HEAD              # all changes (staged + unstaged)

Look for natural boundaries: different features, bug fixes, refactors, or config changes.

Identifying Logical Commits

Each commit should represent one logical change. Signs that changes belong in separate commits:

  • Different purposes (bug fix vs feature vs refactor)
  • Unrelated files or components
  • Changes that could be reverted independently
  • Separate items from a PR review or task list

Common groupings:

  • Related files implementing a single feature
  • A bug fix with its test
  • Rename/move operations separate from behavior changes
  • Config or dependency changes separate from code

Staging Strategies

Whole files

bash
git add <file>             # stage entire file
git add <dir>/             # stage all files in directory
git reset HEAD <file>      # unstage file

Partial files (hunk staging)

Use git add -p to stage specific hunks within a file:

bash
git add -p                 # interactively stage hunks from all files
git add -p <file>          # interactively stage hunks from specific file

Hunk commands:

  • y - stage this hunk
  • n - skip this hunk
  • s - split into smaller hunks (if hunk contains multiple changes)
  • q - quit, keeping already-staged hunks
  • ? - show help

Verify staged changes

bash
git diff --cached          # review exactly what will be committed

Commit Messages

Use the commit-message skill for formatting. Key points:

  • Conventional Commits format: type(scope): description
  • Imperative mood ("Add feature" not "Added feature")
  • Explain why in the body, not what (the diff shows what)

Repeat

After each commit:

bash
git status                 # check remaining changes
git log --oneline -3       # verify commit was created

Continue staging and committing until all changes are organized into logical commits.

Expand your agent's capabilities with these related and highly-rated skills.

Chemiseblanc/ai

feature-file

Manage features.yml for tracking requirements and progress; use proactively ONLY when features.yml already exists, or invoke manually to create one; complements TodoWrite for persistent project state.

0 0
Explore
Chemiseblanc/ai

waterfall-development

Enforces strict waterfall development workflow with phase gates. Use when (1) features.yml exists in project root, (2) user asks to implement/develop/build a feature, (3) user explicitly requests waterfall workflow. Creates features.yml if missing when invoked.

0 0
Explore
Chemiseblanc/ai

software-architecture

Document software architecture using ARCHITECTURE.md and docs/*.md files with Mermaid diagrams. Use proactively when ARCHITECTURE.md exists in project root, or invoke to create initial architecture documentation. Covers system design, data flows, component relationships, and code organization with references to key entry points and abstractions.

0 0
Explore
Chemiseblanc/ai

commit-message

Format git commit messages combining Conventional Commits summary lines with Linux kernel-style bodies. Use when writing, reviewing, or formatting commit messages.

0 0
Explore
Chemiseblanc/ai

structured-logging

Guide for writing effective log messages using wide events / canonical log lines. Use when writing logging code, adding instrumentation, improving observability, or reviewing log statements. Teaches high-cardinality, high-dimensionality structured logging that enables debugging.

0 0
Explore
Chemiseblanc/ai

tlaplus-modeling

Model and reason about concurrent or distributed systems with TLA+ and PlusCal. Use when: designing multithreaded or distributed behavior before code exists, deriving invariants from an informal design, writing TLA+ specs, creating PlusCal algorithms, model checking with TLC, organizing multi-module specifications, debugging verification failures, or reducing state space. Covers informal concurrency design, MCP tool usage, PlusCal preferred syntax (call/await over goto), TLA+ module organization, and state-space optimization.

0 0
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results