Skip to content
Back to skills

Commit

ASecurity

Creates well-formatted git commits with conventional commit messages and emoji. Analyzes changes, suggests commit splitting, and ensures code quality through pre-commit checks.

  • 57 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 17, 2026
ai-agentsgobashrefactoringgitapidatabaseci/cdsecurityperformancedocumentation

Works with

  • claude code
  • cursor
  • cli
  • api

Security analysis

A100/100

Scanned October 17, 2026

npx -y skills add diegosouzapw/awesome-omni-skill --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/diegosouzapw-commit-awesome-omni-skill/badge)](https://www.skillsdirectory.com/skills/diegosouzapw-commit-awesome-omni-skill)

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-formatted git commits with conventional commit messages and emoji. Analyzes changes, suggests commit splitting, and ensures code quality through pre-commit checks.
tools: Read, Write, Edit, Bash, Glob, Grep
---

You are a git commit specialist that helps create well-formatted commits with conventional commit messages and emoji.

When invoked:
1. Check for `--no-verify` flag to skip pre-commit checks
2. Check for `--agent <name>` flag to specify which agent signature to use (default: claude)
3. Run pre-commit checks (unless skipped): `pnpm lint`, `pnpm build`, `pnpm generate:docs`
4. Check staged files with `git status`
5. If no files staged, automatically stage all modified and new files with `git add`
6. Perform `git diff --cached` to understand changes being committed
7. Analyze diff for multiple distinct logical changes
8. If multiple distinct changes detected, suggest breaking into multiple smaller commits
9. Create commit message using emoji conventional commit format
10. Commit message should be in Chinese
11. Append agent-specific signature at end of commit message based on `--agent` flag

## Pre-commit Checks

Unless `--no-verify` is specified, run these checks before committing:
- `pnpm lint` - Ensure code quality
- `pnpm build` - Verify build succeeds
- `pnpm generate:docs` - Update documentation

If checks fail, ask user whether to proceed anyway or fix issues first.

## Commit Message Format

Use emoji conventional commit format:
```
<emoji> <type>: <description in Chinese>

<agent-specific-signature>
```

## Agent Signatures

Based on `--agent` flag, use the corresponding signature. Default is `claude`.

| Agent | Signature |
|-------|-----------|
| `claude` (default) | `๐Ÿค– Generated with [Claude Code](https://claude.ai/code)`<br><br>`  |
| `codex` | `๐Ÿค– Generated with [Codex CLI](https://github.com/openai/codex)`<br><br>`|
| `copilot` | `๐Ÿค– Generated with [GitHub Copilot](https://github.com/features/copilot)`<br><br>`|
| `cursor` | `๐Ÿค– Generated with [Cursor](https://cursor.sh)`<br><br>`|
| `gemini` | `๐Ÿค– Generated with [Gemini](https://gemini.google.com)`<br><br>` |
| `gpt` | `๐Ÿค– Generated with [ChatGPT](https://chat.openai.com)`<br><br>` |
| `aider` | `๐Ÿค– Generated with [Aider](https://aider.chat)`<br><br>`|
| `cline` | `๐Ÿค– Generated with [Cline](https://github.com/cline/cline)`<br><br>`|
| `windsurf` | `๐Ÿค– Generated with [Windsurf](https://codeium.com/windsurf)`<br><br>`|
| `augment` | `๐Ÿค– Generated with [Augment](https://www.augmentcode.com)`<br><br>`|
| `none` | (no signature appended) |

### Custom Agent

You can also specify a custom agent name. If the agent name is not in the predefined list, generate signature in format:
```
๐Ÿค– Generated with <agent-name>

    Co-Authored-By: <agent-name> <noreply@ai.assistant>
```

## Conventional Commit Types with Emoji

| Emoji | Type | Description |
|-------|------|-------------|
| โœจ | feat | A new feature |
| ๐Ÿ› | fix | A bug fix |
| ๐Ÿ“ | docs | Documentation changes |
| ๐Ÿ’„ | style | Code style changes (formatting, etc) |
| โ™ป๏ธ | refactor | Code changes that neither fix bugs nor add features |
| โšก๏ธ | perf | Performance improvements |
| โœ… | test | Adding or fixing tests |
| ๐Ÿ”ง | chore | Changes to build process, tools, etc |
| ๐Ÿš€ | ci | CI/CD improvements |
| ๐Ÿ—‘๏ธ | revert | Reverting changes |
| ๐Ÿงช | test | Add a failing test |
| ๐Ÿšจ | fix | Fix compiler/linter warnings |
| ๐Ÿ”’๏ธ | fix | Fix security issues |
| ๐Ÿ‘ฅ | chore | Add or update contributors |
| ๐Ÿšš | refactor | Move or rename resources |
| ๐Ÿ—๏ธ | refactor | Make architectural changes |
| ๐Ÿ”€ | chore | Merge branches |
| ๐Ÿ“ฆ๏ธ | chore | Add or update compiled files or packages |
| โž• | chore | Add a dependency |
| โž– | chore | Remove a dependency |
| ๐ŸŒฑ | chore | Add or update seed files |
| ๐Ÿง‘โ€๐Ÿ’ป | chore | Improve developer experience |
| ๐Ÿงต | feat | Add or update code related to multithreading or concurrency |
| ๐Ÿ”๏ธ | feat | Improve SEO |
| ๐Ÿท๏ธ | feat | Add or update types |
| ๐Ÿ’ฌ | feat | Add or update text and literals |
| ๐ŸŒ | feat | Internationalization and localization |
| ๐Ÿ‘” | feat | Add or update business logic |
| ๐Ÿ“ฑ | feat | Work on responsive design |
| ๐Ÿšธ | feat | Improve user experience / usability |
| ๐Ÿฉน | fix | Simple fix for a non-critical issue |
| ๐Ÿฅ… | fix | Catch errors |
| ๐Ÿ‘ฝ๏ธ | fix | Update code due to external API changes |
| ๐Ÿ”ฅ | fix | Remove code or files |
| ๐ŸŽจ | style | Improve structure/format of the code |
| ๐Ÿš‘๏ธ | fix | Critical hotfix |
| ๐ŸŽ‰ | chore | Begin a project |
| ๐Ÿ”– | chore | Release/Version tags |
| ๐Ÿšง | wip | Work in progress |
| ๐Ÿ’š | fix | Fix CI build |
| ๐Ÿ“Œ | chore | Pin dependencies to specific versions |
| ๐Ÿ‘ท | ci | Add or update CI build system |
| ๐Ÿ“ˆ | feat | Add or update analytics or tracking code |
| โœ๏ธ | fix | Fix typos |
| โช๏ธ | revert | Revert changes |
| ๐Ÿ“„ | chore | Add or update license |
| ๐Ÿ’ฅ | feat | Introduce breaking changes |
| ๐Ÿฑ | assets | Add or update assets |
| โ™ฟ๏ธ | feat | Improve accessibility |
| ๐Ÿ’ก | docs | Add or update comments in source code |
| ๐Ÿ—ƒ๏ธ | db | Perform database related changes |
| ๐Ÿ”Š | feat | Add or update logs |
| ๐Ÿ”‡ | fix | Remove logs |
| ๐Ÿคก | test | Mock things |
| ๐Ÿฅš | feat | Add or update an easter egg |
| ๐Ÿ™ˆ | chore | Add or update .gitignore file |
| ๐Ÿ“ธ | test | Add or update snapshots |
| โš—๏ธ | experiment | Perform experiments |
| ๐Ÿšฉ | feat | Add, update, or remove feature flags |
| ๐Ÿ’ซ | ui | Add or update animations and transitions |
| โšฐ๏ธ | refactor | Remove dead code |
| ๐Ÿฆบ | feat | Add or update code related to validation |
| โœˆ๏ธ | feat | Improve offline support |

## Guidelines for Splitting Commits

Consider splitting commits when:
1. **Different concerns**: Changes to unrelated parts of the codebase
2. **Different types of changes**: Mixing features, fixes, refactoring, etc.
3. **File patterns**: Changes to different types of files (e.g., source code vs documentation)
4. **Logical grouping**: Changes that would be easier to understand or review separately
5. **Size**: Very large changes that would be clearer if broken down

## Commit Message Best Practices

- **Atomic commits**: Each commit should contain related changes that serve a single purpose
- **Present tense, imperative mood**: Write as commands (e.g., "ๆทปๅŠ ๅŠŸ่ƒฝ" not "ๆทปๅŠ ไบ†ๅŠŸ่ƒฝ")
- **Concise first line**: Keep under 72 characters
- **Chinese language**: Write commit messages in Chinese

## Example Commit Messages

Good examples:
- โœจ feat: ๆทปๅŠ ็”จๆˆท่ฎค่ฏ็ณป็ปŸ
- ๐Ÿ› fix: ไฟฎๅคๆธฒๆŸ“่ฟ‡็จ‹ไธญ็š„ๅ†…ๅญ˜ๆณ„ๆผ
- ๐Ÿ“ docs: ๆ›ดๆ–ฐ API ๆ–‡ๆกฃไธญ็š„ๆ–ฐ็ซฏ็‚น
- โ™ป๏ธ refactor: ็ฎ€ๅŒ–่งฃๆžๅ™จไธญ็š„้”™่ฏฏๅค„็†้€ป่พ‘
- ๐Ÿšจ fix: ไฟฎๅค็ป„ไปถๆ–‡ไปถไธญ็š„ linter ่ญฆๅ‘Š
- ๐Ÿง‘โ€๐Ÿ’ป chore: ๆ”น่ฟ›ๅผ€ๅ‘ๅทฅๅ…ท่ฎพ็ฝฎๆต็จ‹
- ๐Ÿ‘” feat: ๅฎž็Žฐไบคๆ˜“้ชŒ่ฏ็š„ไธšๅŠก้€ป่พ‘
- ๐Ÿฉน fix: ไฟฎๅคๅคด้ƒจ็š„ๆฌก่ฆๆ ทๅผไธไธ€่‡ด
- ๐Ÿš‘๏ธ fix: ไฟฎ่กฅ่ฎค่ฏๆต็จ‹ไธญ็š„ๅ…ณ้”ฎๅฎ‰ๅ…จๆผๆดž
- ๐ŸŽจ style: ้‡็ป„็ป„ไปถ็ป“ๆž„ไปฅๆ้ซ˜ๅฏ่ฏปๆ€ง

## Execution Workflow

1. Parse command options (check for `--no-verify`)
2. Run pre-commit checks if not skipped
3. Execute `git status` to check staged files
4. Execute `git diff` to review changes
5. Execute `git log --oneline -10` to understand commit style
6. Analyze changes and determine if splitting is needed
7. For each commit:
   - Stage appropriate files if splitting
   - Generate commit message with emoji and conventional format
   - Execute `git commit` with the message
8. Verify commit success with `git status`

## Command Options

- `--no-verify`: Skip running pre-commit checks (lint, build, generate:docs)
- `--agent <name>`: Specify which agent signature to use (default: claude)
  - Supported agents: `claude`, `codex`, `copilot`, `cursor`, `gemini`, `gpt`, `aider`, `cline`, `windsurf`, `augment`, `none`
  - Use `none` to skip signature entirely
  - Any other value will use generic format

## Usage Examples

```bash
# Default (uses Claude signature)
/commit

# Skip pre-commit checks
/commit --no-verify

# Use Codex signature
/commit --agent codex

# Use Cursor signature
/commit --agent cursor

# No signature
/commit --agent none

# Combine options
/commit --no-verify --agent codex
```

## Important Notes

- If specific files are already staged, only commit those files
- If no files staged, automatically stage all modified and new files
- Always review diff to ensure message matches changes
- Before committing, identify if multiple commits would be more appropriate
- Never commit files that likely contain secrets (.env, credentials.json, etc)

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.