git-storytelling-commit-messages
Use when writing commit messages that clearly communicate changes and tell the story of development. Helps create informative, well-structured commit messages that serve as documentation.
What this skill does
# Git Storytelling - Commit Messages
This skill guides you in crafting commit messages that are clear, informative, and tell the story of your development process. Good commit messages are documentation that lives with your code.
## Core Principles
### The Purpose of Commit Messages
Commit messages serve multiple audiences and purposes:
- **Future developers** (including yourself) understanding why changes were made
- **Code reviewers** evaluating the intent and scope of changes
- **Project managers** tracking progress and understanding what was delivered
- **Automated tools** generating changelogs and release notes
- **Git tools** like blame, log, and bisect for debugging
### The Three-Part Structure
Effective commit messages follow a consistent structure:
1. **Subject Line**: Brief summary (50 characters or less)
2. **Body** (optional): Detailed explanation of what and why
3. **Footer** (optional): Issue references, breaking changes, co-authors
### The Subject Line Format
```
<type>: <description>
Examples:
feat: add user authentication system
fix: resolve race condition in payment processing
docs: update API documentation for v2 endpoints
```
## Commit Message Anatomy
### Subject Line Rules
**DO:**
- Start with a type prefix (feat, fix, docs, etc.)
- Use imperative mood ("add" not "added" or "adds")
- Keep it under 50 characters
- Don't end with a period
- Capitalize the first letter after the colon
- Be specific and descriptive
**DON'T:**
- Use vague terms like "update stuff" or "fix things"
- Include file names unless necessary
- Describe HOW you did it (that's what the code shows)
- Use past tense
- Be too generic
### Body Guidelines
The body should explain:
- **What** changed (briefly, the code shows details)
- **Why** the change was needed
- **Any side effects** or implications
- **Alternatives** considered
- **Context** that isn't obvious from the code
Format:
- Wrap at 72 characters per line
- Use bullet points for multiple items
- Separate from subject with a blank line
- Use proper paragraphs for complex explanations
### Footer Elements
```
Refs: #123, #456
Closes: #789
Breaking Change: API endpoint /users now requires authentication
Co-Authored-By: Jane Doe <[email protected]>
๐ค Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
```
## Commit Types
### feat: New Features
Use when adding new functionality or capabilities.
```
feat: add password reset functionality
Implement password reset flow with email verification:
- Generate secure reset tokens
- Send reset emails with expiration
- Validate tokens before allowing password change
- Log password reset events for security audit
๐ค Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
```
### fix: Bug Fixes
Use when correcting defects or unexpected behavior.
```
fix: prevent duplicate order submission
Add client-side debouncing and server-side idempotency check
to prevent users from accidentally submitting the same order
multiple times when clicking quickly.
Closes: #234
๐ค Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
```
### docs: Documentation
Use for documentation-only changes.
```
docs: add architecture decision record for database choice
Document why we chose PostgreSQL over MongoDB for our
primary datastore, including performance benchmarks and
team expertise considerations.
๐ค Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
```
### refactor: Code Restructuring
Use when improving code without changing behavior.
```
refactor: extract authentication logic into middleware
Move authentication checks from individual route handlers
into reusable middleware to reduce duplication and improve
maintainability.
No functional changes to authentication behavior.
๐ค Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
```
### test: Testing Changes
Use when adding or modifying tests.
```
test: add integration tests for payment flow
Add end-to-end tests covering:
- Successful payment processing
- Failed payment handling
- Refund processing
- Webhook event handling
Improves test coverage from 65% to 82%.
๐ค Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
```
### perf: Performance Improvements
Use for changes that improve performance.
```
perf: optimize database query in user dashboard
Replace N+1 query pattern with single JOIN query, reducing
dashboard load time from 2.3s to 0.4s for users with 100+
items.
Added database index on user_id and created_at columns.
๐ค Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
```
### style: Formatting Changes
Use for whitespace, formatting, missing semicolons, etc.
```
style: format code with prettier
Apply prettier formatting across all TypeScript files
to maintain consistent code style. No functional changes.
๐ค Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
```
### chore: Maintenance Tasks
Use for routine tasks, dependency updates, build changes.
```
chore: upgrade dependencies to latest stable versions
Update all npm packages to resolve security vulnerabilities:
- express: 4.17.1 -> 4.18.2
- axios: 0.21.1 -> 1.4.0
- jest: 27.0.6 -> 29.5.0
All tests passing after upgrade.
๐ค Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
```
## Code Examples
### Example 1: Feature with Context
```
feat: implement webhook signature verification
Add HMAC-SHA256 signature verification for incoming webhooks
to ensure requests are authentic and haven't been tampered with.
Implementation details:
- Validate signature from X-Webhook-Signature header
- Use timing-safe comparison to prevent timing attacks
- Return 401 for invalid signatures
- Log suspicious webhook attempts
Security measure required before production launch.
Refs: #567
๐ค Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
```
### Example 2: Fix with Root Cause
```
fix: resolve memory leak in event listener cleanup
Event listeners were being added on component mount but not
removed on unmount, causing memory to accumulate and browser
to slow down after multiple navigation cycles.
Root cause: Missing cleanup function in useEffect hook.
Solution: Return cleanup function that removes all event
listeners when component unmounts.
This bug affected users who navigated the app extensively
without refreshing, particularly noticeable after 10+ page
transitions.
Closes: #892
๐ค Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
```
### Example 3: Refactor with Motivation
```
refactor: replace callback hell with async/await
Convert nested callback-based error handling to async/await
pattern for improved readability and maintainability.
Before: 5 levels of nested callbacks
After: Linear async/await flow
Benefits:
- Easier to understand error handling
- Reduced cognitive load when reading code
- Simpler to add new steps to the flow
- Better stack traces for debugging
No behavior changes, all existing tests pass.
๐ค Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
```
### Example 4: Breaking Change
```
feat: migrate to v2 API with breaking changes
Update API client to use v2 endpoints with improved
error handling and response format.
BREAKING CHANGE: Response format has changed
- Old: { data: {...}, status: "ok" }
- New: { result: {...}, success: true }
Migration guide:
1. Update response handlers to use 'result' instead of 'data'
2Related 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.