Skip to content
Back to skills

Commit

ASecurity

Create a git commit with conventional commit message

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 29, 2026
documentationbashgitapiperformancedocumentation

Works with

  • api

Security analysis

A100/100

Scanned September 29, 2026

npx -y skills add abnegate/claudes --skill commit --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Commit?

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

Security grade badge for Commit
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/abnegate-commit/badge)](https://www.skillsdirectory.com/skills/abnegate-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: commit
description: Create a git commit with conventional commit message
argument-hint: "[message]"
---

# Smart Commit

Create a git commit following project conventions.

## Commit Message Format

```
<type>(<scope>): <subject>

<body>
```

- **type**: one of the Types below.
- **scope** (optional): the area touched, in lowercase kebab-case, e.g. `fix(auth): handle expired sessions`. Omit it for repo-wide changes.
- **`!`** right before the colon marks a breaking change: `feat(api)!: remove v1 routes`.
- **subject**: lowercase imperative, no trailing period.
- **body** (optional): one short paragraph with only the *why* (rationale, tradeoffs, the reason behind a non-obvious value). Never restate what changed. When the subject says enough, leave out the body and the blank line before it.
- Keep every line within 72 characters.
- No co-authors: no `Co-Authored-By` trailer.

## Types

| Type | Use For |
|------|---------|
| `feat` | New features |
| `fix` | Bug fixes |
| `refactor` | Code restructuring |
| `chore` | Maintenance |
| `docs` | Documentation |
| `test` | Tests |
| `style` | Formatting |
| `perf` | Performance |

## Execution Steps

1. Run `git status` to see changes (never use `-uall`)
2. Run `git diff --staged` and `git diff` to understand changes
3. Run `git log --oneline -5` to see which scopes recent commits use (never copy the legacy `(type): subject` form)
4. If `$ARGUMENTS` provided, use as commit message
5. If no `$ARGUMENTS`:
   - Analyze changes
   - Pick type and scope from the changes
   - Generate appropriate message
6. Stage relevant files with `git add`
7. Create commit with HEREDOC format, leaving out the blank line and `<body>` when there is no body:
   ```bash
   git commit -F - <<'EOF'
   <type>(<scope>): <subject>

   <body>
   EOF
   ```
8. Run `git status` to verify

## Safety Rules

- NEVER commit `.env` or credential files
- NEVER use `--amend` unless explicitly requested
- NEVER use `--force` push
- NEVER skip hooks with `--no-verify`

## Example

```bash
git add src/preferences/
git commit -F - <<'EOF'
feat(preferences): add user preferences endpoint

Preferences lived in local storage, so every new device started empty.
EOF
```

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.

Comments

Loading comments…