git-commit

Creates Conventional Commits inferred from the repository diff with secret detection and branch policy checks.

Updated May 8, 2026
One-click install
npx skills add https://github.com/juanca202/sdd-devkit --skill git-commit-juanca202
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: git-commit
Source: https://github.com/juanca202/sdd-devkit/tree/main/skills/git-commit
Command: npx skills add https://github.com/juanca202/sdd-devkit --skill git-commit-juanca202

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing consistent, meaningful commit messages is tedious, and mixed changes often end up in a single vague commit. This Skill inspects the actual git diff, infers the correct Conventional Commits type, scope, and description, splits unrelated changes into separate commits, and blocks secrets or sensitive files from entering the repository history. ## Core Features & Use Cases - Diff-Inferred Messages: Derives type (feat, fix, docs, refactor, etc.), scope, and description from the staged and unstaged diff instead of asking the user to write messages. - Multi-Commit Splitting: Groups unrelated changes by affinity and proposes an ordered sequence of commits, with a single confirmation governed by the project's settings. - Secret and Policy Gates: Scans added diff lines for credentials, blocks sensitive files like .env or *.pem, and enforces branch commit policies (merge vs pull_request) before executing. - Use Case: After finishing a bug fix that also touched documentation and CI config, ask for a commit and receive three clean commits such as fix(cart): validate empty coupon before apply, docs: update API endpoint reference, and ci: adjust workflow triggers, each validated and reported with its short SHA. ## Quick Start Ask the agent to commit the pending changes in the repository, for example by saying "commit everything that is pending with proper conventional commit messages".

Frequently Asked Questions about git-commit

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

FAQPage Schema
How do I write Conventional Commits messages automatically?▼

Conventional Commits messages can be inferred from the git diff by matching changed files and change nature to types like feat, fix, docs, or refactor. The skill inspects git status and git diff, derives type, scope, and description, then executes the commit directly.

How to split mixed changes into multiple git commits?▼

Group files by affinity from the diff, propose an ordered list of commits with type, scope, and files, then confirm the division once. Each group is staged separately with git reset and git add, validated, and committed in sequence.

Does it prevent committing secrets like .env files or API keys?▼

Yes, the staged diff is scanned with a grep pattern for passwords, API keys, tokens, and private keys, and sensitive filenames like .env, *.pem, and *.key are blocked. The commit stops and reports only the path and line number, never the secret value.

Can I commit directly to main or a protected branch?▼

It depends on the integrationBranches policy in the project settings. Branches with commitPolicy merge accept commits, branches with pull_request policy block commits entirely, and undeclared integration-like branches require a one-time confirmation.

What happens when a pre-commit hook fails?▼

The hook output is read, fixes are applied to the working tree, the corrected files are re-staged, and a new commit is created with the same message. The --amend and --no-verify flags are not used unless explicitly requested.

When does it push commits to the remote?▼

Push only happens on direct user invocation and follows the git.push setting: always pushes without asking, ask prompts once, and never skips it. When invoked by other skills like work-integrate or pr-create, commits always stay local.