Skip to content
Agentmart
Submit a tool

git-commit

Creates git commits safely with Conventional Commits messages.

Skill by pedromsmoreira

IndexedMIT★ 1
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/pedromsmoreira-git-commit

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Creates git commits safely with Conventional Commits messages. Use when the user explicitly asks to commit, stage and commit changes, or save work to git. Drafts messages from git diff/log; does not commit unless requested.

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/git-commit

Tools it pre-approves 2

From allowed-tools in SKILL.md: the agent may use these without asking you each time.

  • Read,
  • Bash

What's inside

Skill name
git-commit
Description
Creates git commits safely with Conventional Commits messages. Use when the user explicitly asks to commit, stage and commit changes, or save work to git. Drafts messages from git diff/log; does not commit unless requested.
License
MIT
Allowed tools
Read,, Bash
Instructions
146 lines in SKILL.md · view on GitHub

Before installing

  • Pre-approves any shell command

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Git Commit

Create commits only when the user **explicitly** asks (e.g. "commit this", "create a commit"). If intent is unclear, ask first.

For message format, follow [Conventional Commits 1.0.0](https://www.conventionalcommits.org/en/v1.0.0/) using the rules in [../conventional-commits/SKILL.md](../conventional-commits/SKILL.md). Read that skill when drafting the subject and body.

---

## Safety rules (mandatory)

- **Never** update git config
- **Never** run destructive commands (`push --force`, `reset --hard`, etc.) unless the user explicitly requests them
- **Never** skip hooks (`--no-verify`, `--no-gpg-sign`, etc.) unless the user explicitly requests it
- **Never** force-push to `main` or `master`; warn the user if they ask
- **Never** commit secrets (`.env`, credentials, API keys, tokens). Warn if the user asks to commit those files
- **Never** use `git commit --trailer` or inject `Co-authored-by:` / `Made-with:` footers unless the user explicitly asks
- **Do not push** unless the user explicitly asks

### Amend policy

Use `git commit --amend` **only** when **all** are true:

1. User explicitly requested amend, **or** a commit succeeded but a pre-commit hook auto-modified files that must be included
2. HEAD was created by you in this conversation (`git log -1 --format='%an %ae'`)
3. Commit has **not** been pushed (`git status` shows branch ahead, not synced with remote)

If a commit **failed** or was **rejected** by a hook, fix the issue and create a **new** commit — never amend.

---

## Workflow

### 1. Gather context (parallel)

Run these in parallel before staging or committing:

```bash
git status
git diff
git diff --staged
git log -5 --oneline
```

Use `git diff [base]...HEAD` only when the user wants a commit spanning branch divergence.

Do **not** explore the codebase beyond git commands for this skill.

### 2. Analyze changes

- Identify what will be committed (staged + files to add)
- Match the repo's recent commit style from `git log`
- Split unrelated changes into **separate commits** when logical (one conventional header per concern)
- Omit files that look like secrets unless the user confirms

### 3. Draft the message

Apply [conventional-commits](../conventional-commits/SKILL.md):

```text
<type>[optional scope][optional !]: <imperative description>
```

Optional blank line, then body explaining **why** (not a file list). No trailing period on the subject.

### 4. Stage and commit (sequential)

```bash
git add <paths>
git commit -m "$(cat <<'EOF'
<type>(scope): imperative subject

Body explaining why, if needed.
EOF
)"
git status
```

- Stage only relevant paths; do not add unrelated untracked files
- Pass the message via HEREDOC for correct formatting
- If there is nothing to commit, stop — do not create an empty commit

### 5. Hook failures

If pre-commit fails:

1. Read the hook output
2. Fix the reported issues
3. Create a **new** commit (do not amend a failed attempt)

---

## Quick reference

| Situation | Action |
|-----------|--------|
| User asks for message only | Use `conventional-commits` skill; do not commit |
| Mixed feat + fix in one diff | Suggest two commits |
| Hook auto-formatted files after success | Amend only if amend policy allows |
| `.env` or credentials in diff | Warn; do not commit without explicit confirmation |

---

## Examples

**Single feature commit:**

```bash
git add internal/auth/refresh.go internal/auth/refresh_test.go
git commit -m "$(cat <<'EOF'
feat(auth): add refresh token rotation

Revoke reused refresh tokens to limit session hijacking.
EOF
)"
```

**Docs-only:**

```bash

From pedromsmoreira/ai-configs, MIT.

More from pedromsmoreira/ai-configs

Signals

Stars
1
Forks
0
Open issues
0
Last commit (this folder)
May 23, 2026 (5 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from pedromsmoreira

Cite this page

git-commit skill. Agent Mart. https://agentmart.dev/skills/pedromsmoreira-git-commit (last updated 2026-10-24)