smart-scope-commit

Splits git changes into separate Conventional Commits grouped by scope.

1|Updated Jul 2, 2026
One-click install
npx skills add https://github.com/tarabakz25/my-skills --skill smart-scope-commit-tarabakz25
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: smart-scope-commit
Source: https://github.com/tarabakz25/my-skills/tree/main/smart-scope-commit
Command: npx skills add https://github.com/tarabakz25/my-skills --skill smart-scope-commit-tarabakz25

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Developers often stage and commit unrelated changes together, producing messy history where one commit mixes bug fixes, docs, and CI tweaks. This Skill analyzes the git diff, compares scopes against the previous commit, and splits staging into coherent per-scope commits. ## Core Features & Use Cases - Scope Detection: Reads the previous commit subject and touched paths to determine the current scope context. - Change Classification: Groups modified files by path heuristics (docs, test, ci, src domains) and diff intent, with hunk-level splitting via git add -p for mixed files. - Conventional Commit Generation: Creates one properly typed commit message per scope (feat, fix, docs, test, chore, ci) and commits groups sequentially. - Use Case: You fixed an auth bug, updated API docs, and tweaked a CI workflow in one working session. The Skill stages and commits them as three separate scoped commits instead of one mixed commit. ## Quick Start Ask the agent to analyze my current git changes and split them into separate scoped commits following Conventional Commits format.

Frequently Asked Questions about smart-scope-commit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I split staged git changes into multiple commits?▼

Classify changed files by scope using path heuristics, then stage and commit each group separately with git add followed by git commit. For files containing mixed concerns, use git add -p to stage individual hunks into different commits.

How to write Conventional Commits messages automatically?▼

Determine the commit type from the change intent (feat, fix, docs, test, chore, ci) and derive the scope from file paths or the previous commit subject. Format each message as type(scope): subject with a concise imperative summary.

Does this work with unstaged and staged changes together?▼

Yes, it inspects both git diff and git diff --cached to classify all pending changes regardless of staging state. Each scope group is then staged selectively and committed in sequence.

What happens if a file contains changes from multiple scopes?▼

The file is split at the hunk level using git add -p, so each logical change lands in the appropriate scope commit. If classification remains ambiguous, the smallest safe commit boundaries are used with assumptions explained.

When should I not split commits by scope?▼

Avoid splitting when changes are interdependent, such as a feature and its tests that must land together to keep the build green. Splitting tightly coupled changes can break bisectability and intermediate commit states.