Skip to content
Back to skills

Commit

ASecurity

Creates well-formed git commits from the current changes: checks for secrets and junk, matches the repo's message style, splits unrelated changes, handles pre-commit hooks safely. Use only when the user asked to commit: /commit or in their own words («закоммить», «сохрани в git», «сделай коммит»). Never on your own unless the user granted full access; when finished work is uncommitted, you may offer it in one line.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 3, 2026
developmentpythongobashnodegit

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned December 3, 2026

npx -y skills add stxrmik/antigravity-plus --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/stxrmik-commit/badge)](https://www.skillsdirectory.com/skills/stxrmik-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: >-
  Creates well-formed git commits from the current changes: checks for secrets and junk, matches the repo's
  message style, splits unrelated changes, handles pre-commit hooks safely. Use only when the user asked to
  commit: /commit or in their own words («закоммить», «сохрани в git», «сделай коммит»). Never on your own unless the user granted full access; when
  finished work is uncommitted, you may offer it in one line.
---

# /commit — smart commits

**Only on the user's request, or under full access:** /commit, asking to commit in their own words («закоммить», «сохрани в git»), or full access the user granted (rules: "Full access"). That is permission to **commit**; pushing is part of /pr (or of full access when the task needs it). Otherwise, if you got here on your own, don't commit; offer it in one line instead.

## Steps

1. **Gather context** (one call, sandboxed):
   ```bash
   bash <skill_dir>/scripts/git_context.sh commit
   ```
   If it says "not inside a git repository", tell the user and stop.

2. **Safety gate — stop and ask** if any of these show up:
   - `POSSIBLE SECRETS` or risky files (`.env`, keys, credentials) that would be committed;
   - large binaries / build output / `node_modules`-like junk — suggest a `.gitignore` entry instead;
   - nothing to commit → say so and stop.

3. **Decide what goes in.**
   - **Other agents working here** (an `<other_agents>` block before your step, or
     `python3 "<skill_dir>/../../hooks/coord.py" status --workspace "<ws>"` lists someone): commit only your own files,
     `python3 "<skill_dir>/../../hooks/coord.py" mine --conversation <your id> --workspace "<ws>"`. Leave theirs alone.
   - If something is already staged, commit **only the staged changes** unless the user asked for "everything".
   - If nothing is staged, stage the relevant changes by **explicit paths** (`git add <paths>`), never blind `git add -A` when untracked junk exists.
   - If the changes contain clearly unrelated concerns (e.g. a bug fix + an unrelated refactor + a dependency bump), propose a split into logical commits and do it, unless the user said "one commit". `git add -p` is interactive — avoid it; split by files, and if one file mixes concerns, keep it in one commit and mention it.

4. **Write the message** matching the repo's recent style (Conventional Commits if the log uses them, otherwise mirror what you see):
   - Subject: imperative, ≤ 72 chars, no trailing period, describes **why/what**, not "update files".
   - Body (when non-trivial): wrapped at 72, explains motivation and notable details; reference issues if known (`Fixes #123`).
   - English, unless the history is in another language.

5. **Commit** with a heredoc to preserve formatting:
   ```bash
   git commit -F - <<'EOF'
   type(scope): subject

   Body…
   EOF
   ```

6. **If a pre-commit hook fails:** read the output, fix the actual problem (or re-stage files the hook auto-formatted), and run the commit again as a **new** commit. Never use `--no-verify`, never `--amend` unless the user asked and the commit is unpushed.

7. **Report** (in the user's language): commit hash(es) + subjects (`git log --oneline -n <k>`), and what remains uncommitted. Do **not** push; offer `/pr` or `git push` as a next step.

Files in this skill

  • SKILL.md3.3 KB
  • scripts/git_context.sh7.3 KB

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 development →

Comments

Loading comments…

Newsletter

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