# Commit

> Use when the user wants to commit changes, save work, or create a git commit message.

- **Type:** Skill
- **Install:** `agentstack add skill-huzaifa525-claude-code-optimizer-commit`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [huzaifa525](https://agentstack.voostack.com/s/huzaifa525)
- **Installs:** 0
- **Category:** [Developer Tools](https://agentstack.voostack.com/c/developer-tools)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [huzaifa525](https://github.com/huzaifa525)
- **Source:** https://github.com/huzaifa525/claude-code-optimizer/tree/master/templates/.claude/skills/commit
- **Website:** https://www.npmjs.com/package/claude-code-optimizer

## Install

```sh
agentstack add skill-huzaifa525-claude-code-optimizer-commit
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

Generate a commit message and commit staged changes.

## Steps

1. **Check staged changes**
   ```
   git diff --cached --stat
   git diff --cached
   ```

2. **Check recent commit style**
   ```
   git log --oneline -10
   ```

3. **Generate commit message** following Conventional Commits:

   | Prefix | When to Use |
   |--------|------------|
   | `feat:` | New feature |
   | `fix:` | Bug fix |
   | `refactor:` | Code restructure, no behavior change |
   | `docs:` | Documentation only |
   | `test:` | Adding or fixing tests |
   | `chore:` | Build, deps, config changes |
   | `perf:` | Performance improvement |
   | `style:` | Formatting, whitespace |
   | `ci:` | CI/CD changes |

4. **Format rules**
   - Subject line: max 72 characters, imperative mood ("Add" not "Added")
   - Body: wrap at 80 characters, explain WHY not WHAT
   - If multiple changes: use bullet points in body

5. **Commit**
   ```
   git commit -m "type: short description

   - Detail 1
   - Detail 2"
   ```

6. **Show result**
   ```
   git log --oneline -1
   ```

## Pre-Delivery Checklist

Before committing, verify:

- [ ] `git diff --cached` was read (not just `--stat`)
- [ ] Commit prefix matches the change type (feat/fix/refactor/etc.)
- [ ] Subject line is under 72 characters
- [ ] Subject uses imperative mood ("Add" not "Added")
- [ ] No sensitive files staged (.env, credentials, keys)
- [ ] No unrelated changes bundled in the same commit
- [ ] Body explains WHY if the change is non-obvious

## If nothing is staged

Run `git status` and tell the user what files are available to stage.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [huzaifa525](https://github.com/huzaifa525)
- **Source:** [huzaifa525/claude-code-optimizer](https://github.com/huzaifa525/claude-code-optimizer)
- **License:** MIT
- **Homepage:** https://www.npmjs.com/package/claude-code-optimizer

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** yes
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-huzaifa525-claude-code-optimizer-commit
- Seller: https://agentstack.voostack.com/s/huzaifa525
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
