Skip to content
Back to skills

Commit

ASecurity

Commit staged and unstaged changes with a well-crafted conventional commit message. Handles submodule updates, multi-service changes, and follows project conventions. Triggers: "/commit", "commit", "commitar", "fazer commit", "commit changes".

  • 24 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added October 10, 2026
ai-agentsbashgit

Works with

  • cli

Security analysis

A100/100

Scanned October 10, 2026

npx -y skills add JotJunior/cstk --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/jotjunior-commit/badge)](https://www.skillsdirectory.com/skills/jotjunior-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: |
  Commit staged and unstaged changes with a well-crafted conventional commit message.
  Handles submodule updates, multi-service changes, and follows project conventions.
  Triggers: "/commit", "commit", "commitar", "fazer commit", "commit changes".
allowed-tools:
  - Bash
  - Glob
  - Grep
  - Read
---

# Commit

Create a git commit for the current changes following project conventions.

## Steps

### 1. Gather context (run in parallel)

Run these three commands simultaneously:

- `git status` (never use `-uall` flag)
- `git diff --staged` and `git diff` to see all changes
- `git log --oneline -5` to match the repository's commit message style

### 2. Analyze changes

Review all staged and unstaged changes. Determine:

- **Scope**: Which services/areas are affected?
- **Type**: What kind of change? (feat, fix, refactor, docs, chore, test, build)
- **Submodules**: Are any `services/*` submodules modified? If yes, summarize what changed in each.

### 3. Stage files

- If there are unstaged changes, stage them with `git add` specifying individual files.
- **NEVER** use `git add -A` or `git add .` — always add files by name.
- **NEVER** commit files that likely contain secrets: `.env`, `.env.*`, `credentials.json`, private keys, etc. Warn the user if they exist.
- **NEVER** commit temporary files like `t.txt`, `*.tmp`, scratch files.
- If only some changes should be committed, ask the user which files to include.

### 4. Draft commit message

Follow **Conventional Commits** format matching the repo's style:

```
<type>: <short summary in English, imperative mood, under 72 chars>

<optional body: bullet points describing key changes>

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
```

**Types**: `feat`, `fix`, `refactor`, `docs`, `chore`, `test`, `build`, `ci`, `perf`

**Rules**:
- Summary in English, imperative mood ("add X" not "added X")
- If multiple services changed, list them in the body
- For submodule-only updates, use: `feat: update submodules with <summary>`
- Always end with `Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>`

**Examples from this repo**:
- `feat: update submodules with position rules, accent-insensitive collation, and multi-lodge inactive periods`
- `fix: update submodules with proxy header config for real client IPs`
- `docs: atualizar casos de uso`

### 5. Commit

Use a HEREDOC to preserve formatting:

```bash
git commit -m "$(cat <<'EOF'
<type>: <summary>

<body>

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
EOF
)"
```

### 6. Verify

Run `git status` after commit to confirm success. Report the commit hash and summary to the user.

### 7. Push (only if asked)

**NEVER** push automatically. Only push if the user explicitly says "push", "e push", "e faz push", or similar.

## Pre-commit hook failures

If the commit fails due to a pre-commit hook:
1. Read the error output
2. Fix the issue
3. Re-stage the fixed files
4. Create a **NEW** commit (never use `--amend` unless explicitly asked)

## Submodule commits

If submodules have uncommitted changes inside them (shown as "modified content" or "untracked content" in `git status`):
1. Warn the user that submodules have internal changes
2. Ask if they want to commit inside the submodules first
3. If yes, `cd` into each submodule, commit, and push
4. Then update the submodule references in the meta-repo

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…

Newsletter

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