commit-message-generator
Generates conventional commit messages by analyzing git diffs and changes. Use when writing commit messages, following commit conventions, or documenting changes.
What this skill does
# Commit Message Generator
Generate clear, conventional commit messages from git diffs.
## Quick Start
Analyze staged changes and generate message:
```bash
git diff --staged
# Then generate message following conventional commits format
```
## Instructions
### Step 1: Analyze Changes
Review the git diff to understand:
- What files changed
- What functionality was added/modified/removed
- Scope of changes (component, module, feature)
- Breaking changes or deprecations
```bash
git diff --staged
# or for specific files
git diff --staged path/to/file
```
### Step 2: Determine Commit Type
**feat**: New feature
- Adding new functionality
- New user-facing capability
- New API endpoint
**fix**: Bug fix
- Fixing a bug
- Correcting behavior
- Resolving an issue
**docs**: Documentation
- README updates
- Code comments
- API documentation
**style**: Code style
- Formatting changes
- Missing semicolons
- Whitespace changes
- No code logic changes
**refactor**: Code refactoring
- Restructuring code
- No functionality change
- Performance improvements
**test**: Tests
- Adding tests
- Updating tests
- Test infrastructure
**chore**: Maintenance
- Dependency updates
- Build configuration
- CI/CD changes
- Tooling updates
**perf**: Performance
- Performance improvements
- Optimization changes
**ci**: CI/CD
- CI configuration
- Build scripts
- Deployment changes
**build**: Build system
- Build tool changes
- External dependencies
**revert**: Revert
- Reverting previous commit
### Step 3: Identify Scope
Scope indicates what part of codebase changed:
- Component name: `(button)`, `(navbar)`
- Module name: `(auth)`, `(api)`
- Feature area: `(payments)`, `(search)`
- Package name: `(core)`, `(utils)`
Optional but recommended for clarity.
### Step 4: Write Description
**Subject line** (first line):
- Use imperative mood ("add" not "added")
- No period at end
- Max 50-72 characters
- Lowercase after type
- Clear and concise
**Body** (optional, after blank line):
- Explain what and why, not how
- Wrap at 72 characters
- Use bullet points for multiple changes
- Reference issues/tickets
**Footer** (optional):
- Breaking changes: `BREAKING CHANGE: description`
- Issue references: `Closes #123`, `Fixes #456`
- Co-authors: `Co-authored-by: Name <email>`
### Step 5: Format Message
**Basic format**:
```
<type>(<scope>): <description>
[optional body]
[optional footer]
```
**Examples**:
```
feat(auth): add JWT token refresh mechanism
Implement automatic token refresh when access token expires.
Tokens are refreshed 5 minutes before expiration.
Closes #234
```
```
fix(api): handle null response in user endpoint
Previously crashed when user data was null.
Now returns 404 with appropriate error message.
Fixes #567
```
```
docs(readme): update installation instructions
Add prerequisites section and troubleshooting guide.
```
```
refactor(utils): simplify date formatting logic
Extract common date operations into helper functions.
No functionality changes.
```
```
chore(deps): upgrade react to v18.2.0
Update react and react-dom dependencies.
Update tests to match new API.
```
## Common Patterns
**Multiple changes in one commit**:
```
feat(dashboard): add user analytics and export
- Add analytics charts for user activity
- Implement CSV export functionality
- Add date range filter
Closes #123, #124
```
**Breaking change**:
```
feat(api)!: change authentication endpoint structure
BREAKING CHANGE: Auth endpoints now use /v2/auth prefix.
Update client code to use new endpoints.
Migration guide: docs/migration-v2.md
```
**Revert commit**:
```
revert: feat(auth): add JWT token refresh
This reverts commit abc123def456.
Reason: Causing issues in production.
```
**Co-authored commit**:
```
feat(search): implement fuzzy search algorithm
Co-authored-by: Jane Doe <[email protected]>
```
## Commit Message Quality
**Good commit messages**:
- Clear and descriptive
- Explain why, not just what
- Reference related issues
- Follow conventions consistently
- Atomic (one logical change)
**Bad commit messages**:
- "fix stuff"
- "WIP"
- "updates"
- "asdf"
- "fix fix fix"
## Workflow Integration
### Before committing:
1. Review changes: `git diff --staged`
2. Ensure changes are atomic
3. Generate appropriate message
4. Commit: `git commit -m "type(scope): description"`
### For detailed commits:
1. Stage changes: `git add files`
2. Open editor: `git commit`
3. Write multi-line message
4. Save and close
### Amending last commit:
```bash
git commit --amend
# Edit message in editor
```
### Interactive staging:
```bash
git add -p # Stage hunks interactively
git commit # Write message for staged changes
```
## Conventional Commits Spec
Format: `<type>[optional scope]: <description>`
**Required**:
- type: Must be one of the defined types
- description: Brief summary of change
**Optional**:
- scope: Component/module affected
- body: Detailed explanation
- footer: Breaking changes, issue references
**Rules**:
- Type must be lowercase
- Scope in parentheses
- Colon and space after scope
- Description starts lowercase
- No period at end of description
- Body separated by blank line
- Footer separated by blank line
## Advanced
For complex scenarios:
- Multi-commit features
- Monorepo commit conventions
- Automated commit message validation
- Commit message templates
- Semantic versioning integration
Related in Writing & Docs
jax-development
IncludedUse this skill when the user is writing, debugging, profiling, refactoring, reviewing, benchmarking, parallelising, exporting, or explaining JAX code, or when they mention JAX, jax.numpy, jit, grad, value_and_grad, vmap, scan, lax, random keys, pytrees, jax.Array, sharding, Mesh, PartitionSpec, NamedSharding, pmap, shard_map, Pallas, XLA, StableHLO, checkify, profiler, or the JAX repo. It helps turn NumPy or PyTorch-style code into pure functional JAX, fix tracer/control-flow/shape/PRNG bugs, remove recompiles and host-device syncs, choose transforms and sharding strategies, inspect jaxpr/lowering/IR, and benchmark compiled code correctly.
nature-article-writer
IncludedDrafts, rewrites, diagnostically critiques, and style-calibrates primary research manuscripts for Nature and Nature Portfolio journals. Use when the user wants a Nature-style title, summary paragraph or abstract, introduction, results, discussion, methods, figure legends, presubmission enquiry, cover letter, reviewer response, or when a scientific draft sounds generic, jargon-heavy, structurally weak, or AI-ish and needs precise, broad-reader-friendly prose without inventing data, analyses, or references. Best for primary research articles and letters rather than reviews or press releases unless explicitly adapting one.
deckrd
IncludedDocument-driven framework that derives requirements, specifications, implementation plans, and executable tasks from goals through structured AI dialogue. Use when user says "write requirements", "create spec", "plan implementation", "derive tasks", "structure this feature", "break down into tasks", or "document this module". Also use for reverse engineering existing code into docs (/deckrd rev). Do NOT use for direct code writing — use /deckrd-coder after tasks are generated. Do NOT use when the user only wants to run or fix existing code without planning.
clinical-decision-support
IncludedGenerate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading, statistical analysis (hazard ratios, survival curves, waterfall plots), biomarker integration, and regulatory compliance. Outputs publication-ready LaTeX/PDF format optimized for drug development, clinical research, and evidence synthesis.
handling-sf-data
IncludedSalesforce data operations with 130-point scoring. Use this skill to create, update, delete, bulk import/export, generate test data, and clean up org records using sf CLI and anonymous Apex. TRIGGER when: user creates test data, performs bulk import/export, uses sf data CLI commands, needs data factory patterns for Apex tests, or needs to seed/clean records in a Salesforce org. DO NOT TRIGGER when: SOQL query writing only (use querying-soql), Apex test execution (use running-apex-tests), or metadata deployment (use deploying-metadata).
accelint-ac-to-playwright
IncludedConvert and validate acceptance criteria for Playwright test automation. Use when user asks to (1) review/evaluate/check if AC are ready for automation, (2) assess if AC can be converted as-is, (3) validate AC quality for Playwright, (4) turn AC into tests, (5) generate tests from acceptance criteria, (6) convert .md bullets or .feature Gherkin files to Playwright specs, (7) create test automation from requirements. Handles both bullet-style markdown and Gherkin syntax with JSON test plan generation and validation.