smart-git-commitlisted
Install: claude install-skill Zarl-prog/Smart-git-commit
# Smart Git Commit Skill
Produces gold-standard Git commits: tested, atomic, secure, documented, and
traceable. Follow every phase below in order. Never skip phases unless the
user explicitly says so.
<!-- line-limit: 500 -->
---
## Phase 0 — Read Project Rules
Check for CLAUDE.md, .gitmessage, .git/COMMIT_TEMPLATE at repo root.
If found, those rules override this skill's defaults.
```bash
cat CLAUDE.md 2>/dev/null && echo "→ Found CLAUDE.md"
cat .gitmessage 2>/dev/null && echo "→ Found .gitmessage"
```
Show what rules were loaded before proceeding.
---
## Phase 1 — Diff Analysis
Run full diff analysis before touching `git add`:
```bash
git status
git diff --stat # which files, how many lines
git diff # full diff for small changesets
git log --oneline -5 # recent commit context
```
Categorize every changed file:
| Path pattern | Category |
|-------------|----------|
| `src/` `lib/` `app/` | feature/fix/refactor |
| `tests/` `*.test.*` | test |
| `docs/` `*.md` | docs |
| `package.json` deps | chore |
| `.github/` `Makefile` | tooling |
If files span more than one category → flag for atomic split in Phase 4.
Read `references/atomic-patterns.md` if split is needed.
---
## Phase 2 — Security Scan (Never Skip)
Run the automated security scanner:
```bash
bash scripts/scan-secrets.sh
```
- **Exit 0** → show "✓ Clean" and continue
- **Exit 1** → **HARD STOP**. Show findings. Do not proceed until clean.
If secrets found:
1. `git reset