/commit
Create well-formatted commits with conventional commit format and emoji
$ npx -y skills add davila7/claude-code-templates --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/commit
Context preview
What this command does when you run it.
Create well-formatted commits with conventional commit format and emoji
Command definition
commit.mdallowed-tools: Bash(git add:*), Bash(git status:*), Bash(git commit:*), Bash(git diff:*), Bash(git log:*)
argument-hint: [message] | --no-verify | --amend
description: Create well-formatted commits with conventional commit format and emoji
Smart Git Commit
Create well-formatted commit: $ARGUMENTS
Current Repository State
- Git status: !`git status --porcelain`
- Current branch: !`git branch --show-current`
- Staged changes: !`git diff --cached --stat`
- Unstaged changes: !`git diff --stat`
- Recent commits: !`git log --oneline -5`
What This Command Does
1. Unless specified with `--no-verify`, automatically runs pre-commit checks:
- `pnpm lint` to ensure code quality
- `pnpm build` to verify the build succeeds
- `pnpm generate:docs` to update documentation
2. Checks which files are staged with `git status` 3. If 0 files are staged, automatically adds all modified and new files with `git add` 4. Performs a `git diff` to understand what changes are being committed 5. Analyzes the diff to determine if multiple distinct logical changes are present 6. If multiple distinct changes are detected, suggests breaking the commit into multiple smaller commits 7. For each commit (or the single commit if not split), creates a commit message using emoji conventional commit format
Best Practices for Commits
- **Verify before committing**: Ensure code is linted, builds correctly, and documentation is updated
- **Atomic commits**: Each commit should contain related changes that serve a single purpose
- **Split large changes**: If changes touch multiple concerns, split them into separate commits
- **Conventional commit format**: Use the format `<type>: <description>` where type is one of:
- `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 the build process, tools, etc.
- **Present tense, imperative mood**: Write commit messages as commands (e.g., "add feature" not "added feature")
- **Concise first line**: Keep the first line under 72 characters
- **Emoji**: Each commit type is paired with an appropriate emoji:
- โจ `feat`: New feature
- ๐ `fix`: Bug fix
- ๐ `docs`: Documentation
- ๐ `style`: Formatting/style
- โป๏ธ `refactor`: Code refactoring
- โก๏ธ `perf`: Performance improvements
- โ
`test`: Tests
- ๐ง `chore`: Tooling, configuration
- ๐ `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
When analyzing the diff, consider splitting commits based on these criteria:
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
Examples
Good commit messages:
- โจ feat: add user authentication system
- ๐ fix: resolve memory leak in rendering process
- ๐ docs: update API documentation with new endpoints
- โป๏ธ refactor: simplify error handling logic in parser
- ๐จ fix: resolve linter warnings in component files
- ๐งโ๐ป chore: improve developer tooling setup process
- ๐ feat: implement business logic for transaction validation
- ๐ฉน fix: address minor styling inconsistency in header
- ๐๏ธ fix: patch critical security vulnerability in auth flow
- ๐จ style: reorganize component structure for better readability
- ๐ฅ fix: remove deprecated legacy code
- ๐ฆบ feat: add input validation
Read more
allowed-tools: Bash(git add:*), Bash(git status:*), Bash(git commit:*), Bash(git diff:*), Bash(git log:*) argument-hint: [message] | --no-verify | --amend description: Create well-formatted commits with conventional commit format and emoji
Smart Git Commit
Create well-formatted commit: $ARGUMENTS
Current Repository State
- Git status: !`git status --porcelain`
- Current branch: !`git branch --show-current`
- Staged changes: !`git diff --cached --stat`
- Unstaged changes: !`git diff --stat`
- Recent commits: !`git log --oneline -5`
What This Command Does
1. Unless specified with `--no-verify`, automatically runs pre-commit checks:
- `pnpm lint` to ensure code quality
- `pnpm build` to verify the build succeeds
- `pnpm generate:docs` to update documentation
2. Checks which files are staged with `git status` 3. If 0 files are staged, automatically adds all modified and new files with `git add` 4. Performs a `git diff` to understand what changes are being committed 5. Analyzes the diff to determine if multiple distinct logical changes are present 6. If multiple distinct changes are detected, suggests breaking the commit into multiple smaller commits 7. For each commit (or the single commit if not split), creates a commit message using emoji conventional commit format
Best Practices for Commits
- **Verify before committing**: Ensure code is linted, builds correctly, and documentation is updated
- **Atomic commits**: Each commit should contain related changes that serve a single purpose
- **Split large changes**: If changes touch multiple concerns, split them into separate commits
- **Conventional commit format**: Use the format `<type>: <description>` where type is one of:
- `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 the build process, tools, etc.
- **Present tense, imperative mood**: Write commit messages as commands (e.g., "add feature" not "added feature")
- **Concise first line**: Keep the first line under 72 characters
- **Emoji**: Each commit type is paired with an appropriate emoji:
- โจ `feat`: New feature
- ๐ `fix`: Bug fix
- ๐ `docs`: Documentation
- ๐ `style`: Formatting/style
- โป๏ธ `refactor`: Code refactoring
- โก๏ธ `perf`: Performance improvements
- โ `test`: Tests
- ๐ง `chore`: Tooling, configuration
- ๐ `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
When analyzing the diff, consider splitting commits based on these criteria:
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
Examples
Good commit messages:
- โจ feat: add user authentication system
- ๐ fix: resolve memory leak in rendering process
- ๐ docs: update API documentation with new endpoints
- โป๏ธ refactor: simplify error handling logic in parser
- ๐จ fix: resolve linter warnings in component files
- ๐งโ๐ป chore: improve developer tooling setup process
- ๐ feat: implement business logic for transaction validation
- ๐ฉน fix: address minor styling inconsistency in header
- ๐๏ธ fix: patch critical security vulnerability in auth flow
- ๐จ style: reorganize component structure for better readability
- ๐ฅ fix: remove deprecated legacy code
- ๐ฆบ feat: add input validation
Ready-to-use configurations for Anthropic's Claude Code. A comprehensive collection of AI agents, custom commands, settings, hooks, external integrations (MCPs), and project templates to enhance your development workflow.
Repo: davila7/claude-code-templates
Other commands on claude-code-templates.
- /cleanup-cache
Clean system caches (npm, Homebrew, Yarn, browsers, Python/ML) to free disk space
Open command - /create-blog-article
Create an SEO-optimized blog article for a Claude Code component with AI-generated cover image
Open command - /lint
Run Python code linting and formatting tools.
Open command - /test
Run Python tests with pytest, unittest, or other testing frameworks.
Open command - /worktree-check
Check current worktree status, branch, and assigned task
Open command - /worktree-cleanup
Clean up merged worktrees and their branches
Open command

