commit-crafter
Generate well-structured conventional commit messages from staged changes with appropriate type, scope, and description
Best use case
commit-crafter is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Generate well-structured conventional commit messages from staged changes with appropriate type, scope, and description
Teams using commit-crafter should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/commit-crafter/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How commit-crafter Compares
| Feature / Agent | commit-crafter | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Generate well-structured conventional commit messages from staged changes with appropriate type, scope, and description
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Commit Crafter Skill
## Purpose
Write commit messages that tell the story of your codebase. A good commit message enables efficient code review, powers automated changelogs, simplifies bisecting bugs, and helps future developers understand not just what changed but why.
## Key Concepts
### Conventional Commits Format
```
<type>(<scope>): <description>
[optional body]
[optional footer(s)]
```
**Rules:**
1. Subject line max 72 characters
2. No period at end of subject
3. Imperative mood ("Add feature" not "Added feature")
4. Body wraps at 72 characters
5. Body explains WHAT and WHY, not HOW (the diff shows how)
### Commit Types
| Type | When to Use | Appears in Changelog |
|------|-------------|---------------------|
| `feat` | New feature for the user | Yes (Added) |
| `fix` | Bug fix for the user | Yes (Fixed) |
| `docs` | Documentation only changes | No |
| `style` | Formatting, whitespace, semicolons | No |
| `refactor` | Code change that neither fixes nor adds | No |
| `perf` | Performance improvement | Yes (Changed) |
| `test` | Adding or correcting tests | No |
| `build` | Build system or external dependencies | No |
| `ci` | CI configuration and scripts | No |
| `chore` | Maintenance tasks, dependency bumps | No |
| `revert` | Reverts a previous commit | Yes |
### Scope Selection
Scope should be a noun describing the section of the codebase:
```
feat(auth): add OAuth2 support for GitHub
fix(api): handle null response from payment gateway
docs(readme): add deployment instructions
refactor(db): extract query builder into separate module
test(cart): add integration tests for checkout flow
build(deps): bump next from 14.1 to 14.2
ci(deploy): add staging environment to pipeline
```
**Common scopes:** `auth`, `api`, `ui`, `db`, `config`, `deps`, `core`, `router`, `middleware`, component names
## Workflow
### Step 1: Analyze the Diff
Read the staged changes and identify:
1. **What files changed?** — Suggests the scope
2. **What kind of change?** — Suggests the type
3. **Is anything removed/renamed?** — Might be breaking
4. **How many logical changes?** — Should this be multiple commits?
### Step 2: Classify the Change
```
Decision Tree:
Is this a new user-facing feature?
→ feat
Does this fix a bug that users experience?
→ fix
Does this change behavior without adding features or fixing bugs?
→ refactor (if no user impact) or feat/fix (if user impact)
Does this only change tests?
→ test
Does this only change documentation?
→ docs
Does this only change CI/CD?
→ ci
Does this only change build configuration?
→ build
Does this improve performance measurably?
→ perf
Does this revert a previous commit?
→ revert
```
### Step 3: Craft the Message
#### Subject Line Patterns
```
Good subjects:
feat(auth): add password reset via email
fix(cart): prevent duplicate items when clicking rapidly
refactor(api): extract validation middleware from route handlers
perf(search): add database index for full-text queries
docs(api): document rate limiting behavior
Bad subjects:
fix: fixed the bug ← Too vague
feat(auth): Added new auth feature ← Past tense, redundant
update files ← No type, no scope, no meaning
WIP ← Never commit WIP to main
fix(auth): fix auth issue. ← Trailing period
feat: implement the new user registration system with email verification and admin approval workflow ← Too long
```
#### Body (When Needed)
Add a body when the subject alone does not explain the change:
```
fix(payments): use idempotency key for Stripe charges
The checkout flow could create duplicate charges when users
double-clicked the submit button. The browser-side debounce was
insufficient because it did not survive page navigations.
Now each checkout session generates a unique idempotency key
that Stripe uses to deduplicate charge requests. This guarantees
at-most-once processing regardless of client behavior.
Closes #234
```
#### Breaking Changes
```
feat(api)!: require authentication for all endpoints
BREAKING CHANGE: All API endpoints now require a valid Bearer token.
Previously, read-only endpoints were publicly accessible.
Migration guide:
1. Generate an API key in Settings > API Keys
2. Add `Authorization: Bearer <key>` header to all requests
3. Public endpoints now return 401 without authentication
Closes #567
```
The `!` after the type/scope signals a breaking change. The `BREAKING CHANGE:` footer provides details.
### Step 4: Verify Before Committing
```
Checklist:
[ ] Subject line under 72 characters
[ ] Uses imperative mood
[ ] Type is correct
[ ] Scope is appropriate
[ ] No trailing period
[ ] Body explains WHY (if present)
[ ] Breaking changes noted with ! and footer
[ ] Related issue/PR referenced
[ ] This is a single logical change (not multiple squished together)
```
## Examples by Scenario
### Simple Bug Fix
```
fix(ui): prevent layout shift when images load
Add explicit width/height to avatar images in the user list.
This eliminates the CLS (Cumulative Layout Shift) reported by
Lighthouse on the team page.
```
### Feature with Multiple Files
```
feat(export): add CSV export for transaction history
Users can now download their transaction history as a CSV file
from the Transactions page. The export respects current filters
(date range, type, status) and includes all visible columns.
- New ExportButton component with format selection
- API endpoint: GET /api/transactions/export?format=csv
- Rate limited to 10 exports per hour per user
Closes #312
```
### Dependency Update
```
build(deps): bump next from 14.1.0 to 14.2.0
Includes built-in support for Partial Prerendering (experimental)
and improved development server startup time.
See: https://nextjs.org/blog/next-14-2
```
### Revert
```
revert: feat(search): add elasticsearch integration
This reverts commit abc123def456.
The Elasticsearch cluster is causing memory issues in staging.
Reverting to the PostgreSQL full-text search while we investigate.
See #489 for tracking.
```
### Multi-Scope Change (Split It)
If a change touches multiple scopes, consider splitting into multiple commits:
```
# Instead of one big commit:
feat: add dark mode with API preferences and UI toggle
# Split into:
feat(api): add user theme preference endpoint
feat(ui): add dark mode toggle to settings page
feat(theme): implement CSS custom properties for dark mode
```
## Atomic Commits
Each commit should be:
1. **Complete** — The codebase works after this commit (tests pass)
2. **Focused** — One logical change per commit
3. **Reversible** — Can be reverted without breaking unrelated features
```
BAD commit history:
abc123 WIP
def456 more WIP
789abc fix tests
bcd012 actually fix tests
ef0123 final fix
GOOD commit history:
abc123 feat(auth): add OAuth2 login with GitHub
def456 test(auth): add integration tests for OAuth flow
789abc docs(auth): document OAuth setup in README
```
## Integration with Git Hooks
```bash
# .husky/commit-msg (validate commit message format)
#!/usr/bin/env sh
npx --no -- commitlint --edit "$1"
# commitlint.config.js
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'subject-max-length': [2, 'always', 72],
'body-max-line-length': [2, 'always', 100],
'scope-enum': [2, 'always', [
'auth', 'api', 'ui', 'db', 'config', 'deps', 'core',
]],
},
};
```Related Skills
ultrathink
UltraThink Workflow OS — 4-layer skill mesh with persistent memory and privacy hooks for complex engineering tasks. Routes prompts through intent detection to activate the right domain skills automatically.
ultrathink_review
Multi-pass code review powered by UltraThink's quality gate — checks correctness, security (OWASP), performance, readability, and project conventions in a single structured pass.
ultrathink_memory
Persistent memory system for UltraThink — search, save, and recall project context, decisions, and patterns across sessions using Postgres-backed fuzzy search with synonym expansion.
ui-design
Comprehensive UI design system: 230+ font pairings, 48 themes, 65 design systems, 23 design languages, 30 UX laws, 14 color systems, Swiss grid, Gestalt principles, Pencil.dev workflow. Inherits ui-ux-pro-max (99 UX rules) + impeccable-frontend-design (anti-AI-slop). Triggers on any design, UI, layout, typography, color, theme, or styling task.
Zod
> TypeScript-first schema validation with static type inference.
webinar-registration-page
Build a webinar or live event registration page as a self-contained HTML file with countdown timer, speaker bio, agenda, and registration form. Triggers on: "build a webinar registration page", "create a webinar sign-up page", "event registration landing page", "live training registration page", "workshop sign-up page", "create a webinar page", "build an event page", "free webinar landing page", "live demo registration page", "online event page", "create a registration page for my webinar", "build a training event page".
webhooks
Webhook design patterns — delivery, retry with exponential backoff, HMAC signature verification, payload validation, idempotency keys
web-workers
Offload heavy computation from the main thread using Web Workers, SharedWorkers, and Comlink — structured messaging, transferable objects, and off-main-thread architecture patterns
web-vitals
Core Web Vitals monitoring (LCP, FID, CLS, INP, TTFB), measurement with web-vitals library, reporting to analytics, and optimization strategies for Next.js
web-components
Native Web Components, custom elements API, Shadow DOM, HTML templates, slots, lifecycle callbacks, and framework-agnostic design patterns
wasm
WebAssembly integration — Rust to WASM with wasm-pack/wasm-bindgen, WASI, browser usage, server-side WASM, and performance considerations
vue
Vue 3 Composition API, Nuxt patterns, reactivity system, component architecture, and production development practices