git-commit

Solid

Safely create a git commit by validating repository state, staging intended changes, scanning for secrets/conflicts, generating a Conventional Commits message (repository convention first, else an English Angular default) from the staged diff, and committing without amend.

Code & Development 27 stars 5 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 88/100

Stars 20%
48
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Git Commit (Safety Enhanced, Angular Convention) Create a commit from the current working tree with safety gates first, then generate a concise Angular-style message in English. ## Hard Rules - Never commit with unresolved conflicts. - Never commit secrets, credentials, keys, or `.env` sensitive values. - **Subject line must be <= 50 characters total** (including `type(scope): `). - Do not use `--amend` unless explicitly requested. If already pushed, warn about force push. - If any safety gate fails, stop and report clearly. - One commit = one logical change. Do not mix unrelated fixes, features, or formatting. ## Workflow Bundled scripts are always invoked as `bash "<path-to-skill>/scripts/<name>.sh"` — `<path-to-skill>` is the absolute skill directory (where this SKILL.md was loaded from), never a path relative to the repository. Keep the working directory at the **target repo root**; the scripts read the repo through git. ### 1. Preflight ```bash git rev-parse --is-inside-work-tree # must print "true" git status --short BRANCH=$(git rev-parse --abbrev-ref HEAD) # "HEAD" means detached (allowed) # In-progress operation? Worktree-safe: resolve real paths, never read .git/ directly. for state in rebase-merge rebase-apply MERGE_HEAD CHERRY_PICK_HEAD REVERT_HEAD; do [ -e "$(git rev-parse --git-path "$state")" ] && echo "IN_PROGRESS $state" done # Unresolved conflicts: this diff exits 0 regardless, so act on OUTPUT, not exit code. git diff ...

Details

Author
johnqtcg
Repository
johnqtcg/awesome-skills
Created
4 months ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category