Home / Market / commit work

commit work

Create high-quality git commits: review/stage intended changes, split into logical commits, and write clear commit messages (including Conventional Commits). Use when the user asks to commit, craft a commit message, stage changes, or split work into multiple commits.

skill★ 347280 dlgithubMITInstall in CosmosUpstream Source

Documentation & Preview

Commit Work

A comprehensive skill for creating high-quality, production-ready git commits that are easy to review, safe to ship, and follow best practices.

Purpose

This skill helps you create well-crafted git commits by:

When to Use

Use this skill when you need to:

Trigger phrases:

How It Works

The skill follows a rigorous 8-step workflow:

  1. Inspect - Review working tree with git status and git diff
  2. Decide boundaries - Determine if changes should be split into multiple commits
  3. Stage selectively - Use patch staging (git add -p) for granular control
  4. Review staged changes - Verify with git diff --cached
  5. Describe changes - Articulate what changed and why in 1-2 sentences
  6. Write message - Craft Conventional Commits format message
  7. Verify - Run relevant tests/checks before committing
  8. Repeat - Continue until working tree is clean

Key Features

Smart Commit Splitting

Automatically identifies when to split commits by:

Conventional Commits Format

All commits follow the standard:

type(scope): short summary

Detailed body explaining what changed and why.

BREAKING CHANGE: if applicable

Safety Checks

Reviews staged changes for:

Patch Staging

Uses git add -p for fine-grained control when changes within a single file need to be split across commits.

Usage Examples

Example 1: Simple Single Commit

# User asks: "commit this bugfix"

# Skill workflow:
git status
git diff
git add src/api/auth.js
git diff --cached
git commit -m "fix(auth): resolve token expiration edge case

Previously tokens would fail validation within 1 second of expiry
due to clock skew. Now includes 5-second grace period."

Example 2: Splitting Mixed Changes

# User has: formatting changes + new feature + test updates

# Skill creates 3 commits:
# Commit 1: chore: format code with prettier
# Commit 2: feat(api): add user profile endpoint
# Commit 3: test: add coverage for profile endpoint

# Uses git add -p to stage selectively

Example 3: Interactive Patch Staging

# Single file has refactor + bugfix mixed

git add -p src/components/Header.js
# Stages only bugfix hunks for first commit

git commit -m "fix(ui): correct mobile menu z-index"

git add src/components/Header.js
# Stages refactor hunks for second commit

git commit -m "refactor(ui): extract menu logic to custom hook"

Inputs

The skill may ask for:

If not provided, defaults to:

Deliverables

After running, the skill provides:

Best Practices

  1. Review before staging - Always inspect git diff first
  2. Stage intentionally - Never use git add . or git add -A
  3. Use patch mode - Leverage git add -p for mixed changes
  4. Verify staged changes - Check git diff --cached before committing
  5. Keep commits focused - One logical change per commit
  6. Write for reviewers - Explain what/why, not implementation details
  7. Test before committing - Run relevant checks after each commit

Related Resources

Notes