Skip to content
Back to skills

Git Commit

ASecurity

Reviews staged Git changes and prepares scoped commit messages; use when asked to create a commit or message. Never stage or commit without explicit permission; do not use for code review (use dotnet-code-review).

  • 7 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 4, 2026
ai-agentssqltestingcode-reviewgitsecurity

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned December 4, 2026

npx -y skills add k4ndev/claude-code-dotnet --skill git-commit --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Git Commit?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Git Commit
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/k4ndev-git-commit/badge)](https://www.skillsdirectory.com/skills/k4ndev-git-commit)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: git-commit
description: Reviews staged Git changes and prepares scoped commit messages; use when asked to create a commit or message. Never stage or commit without explicit permission; do not use for code review (use dotnet-code-review).
---

# Git Commit

## Purpose
Produce an accurate, scoped commit message and create a commit only with explicit user authorization.

## Scope
Git status, staged diff, commit subject/body, and safe commit execution.

## When to use
- User asks for a commit, commit message, or logical commit grouping.
- User asks to inspect whether staged files match a requested commit scope.

## Do not use for
- Reviewing code correctness/security: use `dotnet-code-review`.
- Automatically staging, amending, rebasing, force-pushing, or rewriting history without explicit authorization.

## Required context
Inspect current branch, `git status`, staged diff, unstaged changes, user-requested scope, repository conventions, and any commit policy. Do not expose secrets in output.

## Workflow
1. Read status and staged diff; distinguish staged from unstaged/untracked work.
2. Check that the staged content matches the explicit requested scope; do not add files automatically.
3. Propose a concise imperative subject; use `type(scope): summary` only if repository convention supports it (`feat`, `fix`, `refactor`, `test`, `docs`, `build`, `ci`, `perf`, `security`, `chore`).
4. Add a body only for rationale, constraints, or breaking behavior; avoid restating the diff.
5. Before execution, confirm the user's request clearly authorizes committing and ensure staged content is the intended set.
6. Run the exact commit command only when authorized; verify Git's result and report the commit ID/message.

## Decision rules
- “Prepare a commit message” authorizes drafting, not committing.
- Never stage unstaged files or include unrelated generated files/secrets.
- Do not amend/rebase/force push unless explicit permission identifies that operation.

## Expected output format
Show the proposed subject and optional body, scope concerns, and exact staged-file count. After authorized commit, report verified hash and command outcome; otherwise state that no commit was made.

## Common mistakes
- Assuming all working-tree changes should be committed, silently staging files, writing a vague “updates” subject, or claiming a commit succeeded without Git confirmation.

## Edge cases
- Partially staged files require checking staged diff, not only the working-tree file.
- Merge/rebase state or hooks may prevent commit; report the actual failure without bypassing safeguards.
- A secret in staged content should be flagged without reproducing it.

## Examples
See [commit examples](examples.md) for scoped subjects and unsafe staging behavior.

## Test scenarios
- Positive: “Create a commit message for the already-staged bug fix; do not commit.”
- Negative: “Review this staged SQL injection risk” routes to `security-audit` / `dotnet-code-review`.
- Boundary: “Commit these changes now” activates this skill but requires verifying the staged diff before running Git.

## Related skills
`dotnet-code-review`, `testing-quality`, `dependency-audit`.

Files in this skill

  • SKILL.md3.1 KB
  • examples.md886 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.