Skip to content
Back to skills

Commit 59

ASecurity

AI-optimized atomic commit protocol. Uses deterministic rules for autonomous execution.

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 27, 2026
documentationgobashgitapidatabasedocumentation

Works with

  • api

Security analysis

A100/100

Scanned September 27, 2026

npx -y skills add David-Li0406/meta-skill-evloving --skill commit-59 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Commit 59?

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

Security grade badge for Commit 59
[![Security: A β€” Skills Directory](https://www.skillsdirectory.com/api/skills/david-li0406-commit-59/badge)](https://www.skillsdirectory.com/skills/david-li0406-commit-59)

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: Commit
description: AI-optimized atomic commit protocol. Uses deterministic rules for autonomous execution.
---
**CORE PRINCIPLE: ONE logical change = ONE commit. Always.**

## 🎯 QUICK START FOR AI
Execute this exact sequence for ANY commit task:

1. **ANALYZE** β†’ Run `git diff --name-status` to list changed files
2. **CATEGORIZE** β†’ Group files by logical units (use table below)
3. **VALIDATE** β†’ Check: "Can I describe ALL these changes in ONE sentence?"
4. **COMMIT** β†’ Apply template from section below
5. **REPEAT** β†’ Loop until `git diff` is empty

## πŸ”§ LOGICAL GROUPING RULES (Deterministic)
Use FIRST matching rule:

| Change Pattern | Logical Unit | Example |
|----------------|--------------|---------|
| Same file + same function | SINGLE unit | `user.py:get_user()` changes = 1 commit |
| Different files + same feature | SINGLE unit | `auth.py` + `login.html` for login feature = 1 commit |
| Same file + unrelated functions | SEPARATE units | `utils.py` (fix log + add validation) = 2 commits |
| Fix + feature in same area | SEPARATE units | Fix bug in auth + add OAuth = 2 commits |

**Exception**: If total changes <15 lines AND same logical context β†’ allow single commit.

## πŸ“ COMMIT TEMPLATE (Copy-Paste Ready)
```bash
# STANDARD (90% of cases)
git commit -m "type(scope): description" \
  -m "" \
  -m "What: [1-sentence change summary]" \
  -m "Why: [1-sentence reason]"

# WITH ISSUE (when ticket exists)
git commit -m "type(scope): description" \
  -m "" \
  -m "What: [summary]" \
  -m "Why: [reason]" \
  -m "" \
  -m "Closes #[number]"

# BREAKING CHANGE (API/database changes)
git commit -m "type(scope)!: description" \
  -m "" \
  -m "What: [summary]" \
  -m "Why: [reason]" \
  -m "" \
  -m "BREAKING CHANGE: [specific impact]"
```

## 🎨 TYPE & SCOPE DECISION TREE
**Type Selection** (pick first match):
- Adds new functionality β†’ `feat`
- Fixes incorrect behavior β†’ `fix`
- Changes formatting/styling only β†’ `style`
- Restructures code without behavior change β†’ `refactor`
- Updates documentation β†’ `docs`
- Adds/modifies tests β†’ `test`
- Other maintenance β†’ `chore`

**Scope Inference** (from file path):
- `src/auth/` β†’ `auth`
- `components/ui/` β†’ `ui`
- `api/` or `routes/` β†’ `api`
- `tests/` β†’ `tests`
- `docs/` β†’ `docs`
- Default: use parent directory name

## ⚑ QUICK REFERENCE CARD
Keep this visible during execution:

### βœ… DO
- One logical change per commit
- Use imperative mood (add, fix, update)
- Keep description <72 chars
- Include "What & Why" in body
- Auto-infer scope from path

### ❌ DON'T
- Mix feature + fix
- Use past tense (added, fixed)
- Write vague descriptions ("update", "fix stuff")
- Bundle unrelated changes

### 🚨 RED FLAGS (Stop and split)
- Changes touch >3 unrelated files
- Commit message needs "and" or "also"
- Diff shows mixed concerns (UI + API + tests)

## πŸ”„ AUTO-CORRECTION PROTOCOL
If commit violates rules β†’ execute immediately:
```bash
git reset HEAD~1
# Return to ANALYZE step with remaining changes
```

## πŸ“Š VALIDATION CHECKLIST (Pre-Commit)
- [ ] Single logical change? (1-sentence test)
- [ ] Description imperative and <72 chars?
- [ ] Scope inferred correctly?
- [ ] Body has "What & Why"?
- [ ] Breaking changes marked with `!`?

## 🎲 DECISION EXAMPLES
**Scenario 1**: Changed `user.py` (add email validation) and `test_user.py` (add tests)
- βœ… CORRECT: 2 commits: `feat(user): add email validation` + `test(user): add validation tests`

**Scenario 2**: Changed `style.css` (colors) and `layout.css` (spacing) for dark mode
- βœ… CORRECT: 1 commit: `style(ui): implement dark mode colors and spacing`

**Scenario 3**: Fixed bug in `auth.js` AND added new login method in same file
- βœ… CORRECT: 2 commits: `fix(auth): resolve session timeout` + `feat(auth): add biometric login`

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 documentation β†’

Comments

Loading comments…

Newsletter

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