Back to Skills

ce-commit

Create a git commit with a clear, value-communication message. Use when the user asks to commit/save staged or unstaged changes with a repo-appropriate, value-communicating message.

21,992stars1,623forksUpdated 6/25/2026

Security Assessment

Safe(90/100)

Detected risks:

Sensitive File Access([SKILL.md] .env)
Security Score90/100

About ce-commit

A workflow for creating a single, well-crafted git commit from the current working tree, producing a message that communicates value and follows repository conventions when they exist and conventional commit format otherwise. It activates when the user asks to commit, save changes, or create a commit from staged or unstaged work. On Claude Code it consumes pre-populated git status, working tree diff, current branch, recent commits, and remote default branch sections directly, and on other platforms it runs a single fallback command to gather the same context.

The workflow runs in five steps. Step 1 gathers context and handles edge cases: a clean tree means there is nothing to commit, and a detached HEAD prompts the user, via the platform's blocking question tool, about creating a feature branch. Step 2 determines the message convention by priority, preferring documented repo conventions, then a pattern inferred from the ten most recent commits, then conventional commits of the form type scope description with types like feat, fix, docs, refactor, test, chore, perf, ci, style, and build; where fix and feat both fit it defaults to fix. Step 3 lightly considers splitting clearly distinct concerns into separate commits, grouping at the file level only, with two or three logical commits described as the sweet spot.

Step 4 stages and commits, and if the current branch is main, master, or the resolved default branch it automatically creates a feature branch first rather than committing on the default branch. Messages use a concise imperative subject focused on why over what, with an optional body for non-trivial changes, and staging prefers naming specific files over git add all to avoid sweeping in sensitive files; commits are written with a heredoc to preserve formatting. Step 5 confirms success by running git status and reporting the resulting commit hashes and subject lines.

FAQ

What commit message format does it use by default?

It prefers documented repo conventions, then a pattern inferred from the ten most recent commits, and otherwise falls back to conventional commits in the form type scope colon description.

Will it commit directly on the main branch?

No. If the current branch is main, master, or the resolved default branch, it automatically creates a feature branch first before committing.

When does it choose fix versus feat?

When both seem to fit it defaults to fix, treating a change that remedies broken or missing behavior as fix and reserving feat for genuinely new capabilities.

Does it split changes into multiple commits?

It lightly scans for clearly distinct concerns and may create separate commits grouped at the file level only, with two or three logical commits considered the sweet spot.

How does it avoid committing sensitive files?

It prefers staging specific files by name rather than using git add -A or git add ., to avoid accidentally including files like .env or credentials.

Install ce-commit

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill