commit-message-crafter
Use this skill when writing Git commit messages. Activate when the user asks about commit message format, conventional commits, how to write good commit messages, commit message best practices, or when they're about to commit changes and need help crafting the message.
What this skill does
# Commit Message Crafter
Write clear, consistent, and meaningful commit messages.
## When to Use
- Writing a commit message for staged changes
- Following conventional commits format
- Standardizing commit messages across a team
- Writing messages for squash commits or PRs
## The Conventional Commits Format
```
<type>(<scope>): <subject>
<body>
<footer>
```
### Types
| Type | When to Use |
|------|-------------|
| `feat` | New feature for the user |
| `fix` | Bug fix for the user |
| `docs` | Documentation only changes |
| `style` | Formatting, missing semicolons, etc. (no code change) |
| `refactor` | Code change that neither fixes a bug nor adds a feature |
| `perf` | Performance improvement |
| `test` | Adding or fixing tests |
| `chore` | Maintenance tasks, dependencies, build changes |
| `ci` | CI/CD configuration changes |
| `revert` | Reverting a previous commit |
### Scope (Optional)
The part of the codebase affected:
- `auth`, `api`, `ui`, `db`, `config`, `deps`, etc.
### Subject Rules
1. Use imperative mood: "Add feature" not "Added feature"
2. Don't capitalize first letter
3. No period at the end
4. Max 50 characters (72 absolute max)
5. Complete the sentence: "This commit will..."
## Examples
### Simple Feature
```
feat(auth): add password reset functionality
```
### Bug Fix with Body
```
fix(api): handle null response from payment gateway
The payment gateway occasionally returns null instead of an error
object when the service is degraded. This caused uncaught exceptions
in the checkout flow.
Fixes #1234
```
### Breaking Change
```
feat(api)!: change user endpoint response format
BREAKING CHANGE: The /api/users endpoint now returns paginated
results. Clients must update to handle the new response structure:
{ data: [], meta: { page, total } }
```
### Refactoring
```
refactor(utils): extract date formatting into separate module
Moved date formatting logic from multiple components into a
centralized dateUtils module for better maintainability.
```
### Multiple Changes (Squash Commit)
```
feat(dashboard): redesign analytics widgets
- Add new chart component for user growth
- Implement date range picker
- Add export to CSV functionality
- Update color scheme to match brand guidelines
Co-authored-by: Jane Doe <[email protected]>
```
## Workflow
### Step 1: Analyze Changes
```bash
# See what's staged
git diff --staged
# See files changed
git diff --staged --name-only
```
### Step 2: Determine Type
Ask: What is the PRIMARY purpose of these changes?
- Adding something new? → `feat`
- Fixing broken behavior? → `fix`
- Improving without changing behavior? → `refactor`
### Step 3: Identify Scope
Look at the files changed. What's the common area?
- All in `/src/auth/`? → scope is `auth`
- Mixed areas? → omit scope or use broader term
### Step 4: Write Subject
Complete this sentence with your changes:
"If applied, this commit will _______________"
Good: "add user avatar upload"
Bad: "added user avatar upload functionality to the system"
### Step 5: Add Body (If Needed)
Include body when:
- The "why" isn't obvious from the subject
- There are multiple related changes
- Breaking changes need explanation
- Linking to issues/tickets
### Step 6: Add Footer (If Needed)
```
Fixes #123
Closes #456
BREAKING CHANGE: description
Co-authored-by: Name <email>
```
## Quick Templates
### Feature
```
feat(<scope>): <what you added>
<why you added it, if not obvious>
Relates to #<issue>
```
### Bug Fix
```
fix(<scope>): <what you fixed>
<what was broken and why>
Fixes #<issue>
```
### Dependency Update
```
chore(deps): update <package> to <version>
<any breaking changes or notes>
```
## Common Mistakes to Avoid
- **Vague messages**: "fix bug", "update code", "changes"
- **Too long**: Keep subject under 50 chars
- **Wrong tense**: "Added" instead of "Add"
- **Multiple unrelated changes**: Split into separate commits
- **No context**: Just "fix" without explaining what or why
## Team Conventions
Consider documenting your team's conventions:
```markdown
## Commit Message Convention
- Use conventional commits format
- Scope is required for features and fixes
- Reference issue numbers in footer
- Breaking changes must include BREAKING CHANGE footer
```
## Tools
```bash
# Set up commit template
git config --global commit.template ~/.gitmessage
# Use commitizen for interactive commits
npx cz
# Validate commits with commitlint
npm install -D @commitlint/{cli,config-conventional}
```
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.