conventional-commit
Conventional Commit Generator
Generate commit messages following Conventional Commits 1.0.0.
Workflow
-
Run
git statusandgit diff HEADto analyze changes -
Stage files: user-specified only, or
git add -Afor all -
Determine type and scope from changes
-
Generate commit message incorporating user hints
-
Commit using HEREDOC format to preserve formatting:
git commit -m "$(cat <<'EOF' <type>(<scope>): <description> <body> <footer> EOF )" -
Output:
<hash> <subject>
Scope Boundaries
DO: Analyze git changes, generate messages, stage files, commit
DO NOT: Modify code, push (unless asked), create branches, amend without request
Commit Format
<type>[optional scope][!]: <description>
[optional body]
[optional footer(s)]
Type Selection
| Change | Type | SemVer |
|---|---|---|
| New feature | feat |
MINOR |
| Bug fix | fix |
PATCH |
| Performance improvement | perf |
PATCH |
| Code restructuring (no behavior change) | refactor |
- |
| Code style/formatting (no logic change) | style |
- |
| Adding/updating tests | test |
- |
| Documentation only | docs |
- |
| Build system/dependencies | build |
- |
| CI/CD configuration | ci |
- |
| Reverts a previous commit | revert |
- |
| Other maintenance tasks | chore |
- |
Note: Only
featandfixhave SemVer implications. Breaking changes (any type with exclamation mark orBREAKING CHANGEfooter) trigger MAJOR.
Subject Line
- Max length: 72 characters (50 recommended for readability)
- Format:
type(scope): descriptionortype: description - Mood: Imperative present tense ("add" not "added" or "adds")
- Case: Lowercase first letter
- Punctuation: No trailing period
Scope
Scope provides context about which part of the codebase is affected. Use a noun describing the module, component, or area.
Common scope patterns:
- Component/module:
feat(auth):,fix(parser):,refactor(api): - File/area:
docs(readme):,test(unit):,build(webpack): - Feature:
feat(dark-mode):,fix(checkout):
Body
- Separate from subject with one blank line
- Explain what and why, not how
- Can contain multiple paragraphs (separate with blank lines)
- Wrap at 72 characters
Footer
Footers follow git trailer format with :<space> or <space># separator.
Common footers:
BREAKING CHANGE: <description>- Breaking API changeRefs: #123orRefs: JIRA-456- Reference issuesCloses: #123orFixes: #123- Close issuesCo-authored-by: Name <email>- Credit co-authorsReviewed-by: Name <email>- Credit reviewersAcked-by: Name- Acknowledgment
Note: Footer tokens use
-instead of spaces (e.g.,Reviewed-bynotReviewed by). Exception:BREAKING CHANGEallows space.
Breaking Changes
Two ways to indicate breaking changes (can use both for emphasis):
-
Exclamation mark: Add exclamation mark before colon in subject
feat(api)!: remove deprecated endpoints -
Footer: Add
BREAKING CHANGE:orBREAKING-CHANGE:in footerfeat(api): redesign authentication flow BREAKING CHANGE: OAuth tokens now expire after 1 hour instead of 24 hours.
Examples
Simple feature:
feat: add email notifications for new messages
Bug fix with scope:
fix(cart): prevent ordering with empty shopping cart
Documentation update:
docs(api): add authentication examples to README
Breaking change with body and footer:
feat(api)!: redesign user authentication endpoints
Migrate from session-based auth to JWT tokens for better scalability.
The new system supports refresh tokens and configurable expiration.
BREAKING CHANGE: /api/login now returns JWT instead of session cookie.
Clients must include Authorization header with Bearer token.
Refs: JIRA-1337
Revert commit:
revert: let us never again speak of the noodle incident
Refs: 676104e, a215868
Multi-scope change (use most significant):
feat(auth): add OAuth2 support with Google provider
Adds Google OAuth2 login flow with automatic account linking.
Co-authored-by: Jane Doe <jane@example.com>
Closes: #42
Anti-patterns
Avoid these common mistakes:
| Bad | Good | Reason |
|---|---|---|
Update code |
fix(auth): validate token expiration |
Be specific |
Fixed bug |
fix: prevent null pointer in parser |
Use present tense |
WIP |
Don't commit WIP | Commit complete units |
Add feature. |
feat: add dark mode toggle |
No trailing period |
Added tests |
test: add unit tests for parser |
Use imperative mood |
FEAT: Add... |
feat: add... |
Types are lowercase |
misc changes |
chore: update dependencies |
Be descriptive |
More from trancong12102/agentskills
deps-dev
Look up the latest stable version of any open-source package across npm, PyPI, Go, Cargo, Maven, and NuGet. Use when the user asks 'what's the latest version of X', 'what version should I use', 'is X deprecated', 'how outdated is my package.json/requirements.txt/Cargo.toml', or needs version numbers for adding or updating dependencies. Also covers pinning versions, checking if packages are maintained, or comparing installed vs latest versions. Do NOT use for private/internal packages or for looking up documentation (use context7).
151council-review
Multi-perspective code review that synthesizes findings from multiple reviewers into a unified report. Use when the user asks to review code changes, audit a diff, check code quality, review a PR, review commits, or review uncommitted changes. Also covers 'code review', 'review my changes', 'check this before I merge', or wanting multiple perspectives on code. Do not use for documentation/markdown review or trivial single-line changes.
94oracle
Deep analysis and expert reasoning. Use when the user asks for 'oracle', 'second opinion', architecture analysis, elusive bug debugging, impact assessment, security reasoning, refactoring strategy, or trade-off evaluation — problems that benefit from deep, independent reasoning. Do not use for simple factual questions, code generation, code review (use council-review), or tasks needing file modifications.
92context7
Fetch up-to-date documentation for any open-source library or framework. Use when the user asks to look up docs, check an API, find code examples, or verify how a feature works — especially with a specific library name, version migration, or phrases like 'what's the current way to...' or 'the API might have changed'. Also covers setup and configuration docs. Do NOT use for general programming concepts, internal project code, or version lookups (use deps-dev).
86react-web-advanced
Web-specific React patterns for type-safe file-based routing, route-level data loading, server-side rendering, search param validation, code splitting, and list virtualization. Use when building React web apps with route loaders, SSR streaming, validated search params, lazy route splitting, or virtualizing large DOM lists. Do not use for React Native apps — use react-native-advanced instead.
45react-advanced
Advanced React patterns and conventions for data fetching, tables, forms, state machines, client state management, schema validation, and testing. Use when tackling complex React problems — not simple component questions, but multi-concern tasks like server-driven tables with filtering, multi-step wizards, eliminating useEffect, Suspense architecture, choosing between state management approaches, or designing data flow across server/client/URL/form state. Do not use for web-specific routing/SSR or React Native-specific navigation/performance.
45