Skip to main content
skill

commit-smart — Claude Code skill for Git commits

This skill reads Git changes, suggests a commit type and scope, then drafts a message that explains the reason behind the work. Use it when a diff alone would leave the intent unclear.

Install into Claude Code · claude-code-templates All methods and platforms ↓
npx claude-code-templates@latest --skill git/commit-smart
Open on GitHub

What commit-smart does

The skill checks the working tree and inspects the staged diff to choose a commit type and scope. If nothing is staged, it lists changed files, proposes a logical group, and asks what should go into the index. You can override the detected type or scope with arguments such as fix or refactor api.

Before writing anything to Git history, it presents the proposed message and waits for approval. The subject uses a conventional commit format; for substantive changes, the body gives the motivation rather than restating the diff. After approval, the skill runs git commit and checks the latest entry with git log. Your confirmation is required before the commit is created.

What it helps with

  • infer a commit type from a diff
  • choose a scope from the affected module
  • group unstaged files before adding them
  • write a commit message that explains the reason
  • verify the latest commit in Git history

Example prompts for the agent

  • Review my current Git changes and suggest which files belong in one commit.
  • Use fix as the commit type and explain the reason in the message.
  • Create a refactor api commit message and wait for my approval before committing.

How to install commit-smart

1claude-code-templates

npx claude-code-templates@latest --skill git/commit-smart

2Skills CLI (Vercel)

npx skills add davila7/claude-code-templates --skill commit-smart -a claude-code

3Manually: put the files in place

~/.claude/skills/commit-smart/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/commit-smart/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about commit-smart

How do I install commit-smart in Claude Code?

Run npx claude-code-templates@latest --skill git/commit-smart to install the skill.

What does commit-smart do?

It examines Git changes, chooses a likely commit type and scope, and drafts a message that describes the motivation. It asks for approval before creating the commit.

Can I set the commit type and scope myself?

Yes. Pass one argument, such as fix, to set the type, or two, such as refactor api, to specify both type and scope.

Similar skills

All skills for Git and GitHub →

From the same set495

The whole set →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor