Provides conventional commits guidance and auto-generates commit messages from git changes. Integrates with /ccpm:commit for automated git commits linked to Linear issues. Auto-activates when users ask about committing, creating git commits, or discussing commit message formats.
Auto-generates conventional commit messages from git changes and integrates with `/ccpm:commit` to create issue-linked commits. Activates when you ask to commit changes, discuss commit formats, or run `/ccpm:commit`.
/plugin marketplace add duongdev/ccpm/plugin install ccpm@duongdev-ccpm-marketplaceThis skill is limited to using the following tools:
Comprehensive guidance on conventional commits with automatic message generation integrated with CCPM's Linear workflow. Ensures all commits are properly formatted, issue-linked, and semantically meaningful.
This skill auto-activates when:
/ccpm:commit commandAll commits in CCPM follow Conventional Commits specification:
type(scope): message
[optional body]
[optional footer]
Format breakdown:
Conventional commits enable:
git log --grep="^feat")Always write commit messages in imperative mood (command form):
✅ Correct:
❌ Incorrect:
Why: Imperative mood matches git's own commit messages and convention specifications.
feat: - New FeaturesUse when: Adding new functionality to the codebase.
Examples:
feat(auth): add JWT token refresh endpointfeat(api): implement rate limiting middlewarefeat(ui): add dark mode toggleWhen NOT to use: Bug fixes should use fix:, not feat:
fix: - Bug FixesUse when: Fixing a bug or defect in existing functionality.
Examples:
fix(auth): prevent expired tokens from accessing protected routesfix(api): handle null values in user query resultsfix(ui): correct button alignment on mobile devicesWhen NOT to use: Adding new features should use feat:, not fix:
docs: - Documentation ChangesUse when: Writing or updating documentation, comments, README, or API docs.
Examples:
docs(readme): add installation instructionsdocs(api): document rate limiting headersdocs: add troubleshooting guideImpact: Does NOT trigger version bumps (not a "feature" or "fix")
refactor: - Code RefactoringUse when: Restructuring code without changing functionality (performance, readability, maintainability).
Examples:
refactor(auth): extract JWT validation to separate modulerefactor(api): simplify error handling logicrefactor: rename misleading variable namesImpact: Does NOT trigger version bumps (internal improvement only)
test: - Test Additions/ChangesUse when: Adding, updating, or fixing tests (no production code changes).
Examples:
test(auth): add tests for JWT expirationtest(api): improve test coverage for rate limitertest: fix flaky database integration testImpact: Does NOT trigger version bumps
chore: - Build/Tooling ChangesUse when: Updating dependencies, build config, CI/CD, or development tools.
Examples:
chore(deps): upgrade Node.js to v20.11chore(build): update webpack configurationchore(ci): configure GitHub Actions for lintingImpact: Does NOT trigger version bumps
perf: - Performance ImprovementsUse when: Code optimization that improves performance metrics.
Examples:
perf(api): cache database queries for 5 minutesperf(ui): optimize image rendering for 40% faster load timeperf: reduce bundle size by 15%Impact: Triggers patch version bump (like fix:)
style: - Code Style ChangesUse when: Formatting, whitespace, or code style changes (no logic changes).
Examples:
style: reformat code according to ESLint rulesstyle(css): remove unused CSS classesstyle: add missing semicolonsImpact: Does NOT trigger version bumps
/ccpm:commitThe /ccpm:commit command provides intelligent commit message auto-generation.
Basic usage:
/ccpm:commit # Auto-detect issue, generate message
/ccpm:commit AUTH-123 # Link specific issue
/ccpm:commit AUTH-123 "Fix login validation" # Explicit message
Detects current git branch for Linear issue ID
feat/AUTH-123-jwt-auth → extracts AUTH-123fix/WORK-456-cache-bug → extracts WORK-456Analyzes git changes to determine commit type
test:docs:fix:feat:Extracts scope from changed files
src/auth/jwt.ts, src/auth/login.ts → scope: authsrc/api/users.ts, src/api/posts.ts → scope: apiGenerates message from:
Links to Linear automatically
Scenario: Branch fix/AUTH-123-jwt-expiration, changed src/auth/jwt.ts
$ /ccpm:commit
Analyzing changes for commit...
Branch: fix/AUTH-123-jwt-expiration
Issue: AUTH-123
Linear Title: "Prevent expired tokens from accessing API"
Changes detected:
- src/auth/jwt.ts: Modified token validation logic
- test/auth/jwt.test.ts: Added 2 tests for expiration
Commit type: fix (bug fix with tests)
Scope: auth
Message: "prevent expired tokens from accessing API"
Generated commit:
fix(auth): prevent expired tokens from accessing API
Closes AUTH-123
Proceed with commit? (yes/no)
First line should be:
✅ Good: fix(auth): validate JWT expiration before token use
❌ Bad: fix: bug or fix: updates
Always include scope when possible (what changed):
✅ Good: feat(api):, fix(ui):, docs(readme):
❌ Bad: feat: new stuff, fix: problem
Link to Linear issues in commit footer:
fix(auth): prevent expired tokens
[body explaining the fix]
Closes AUTH-123
Refs AUTH-120
Common footers:
Closes ISSUE-123 - Closes the issueFixes ISSUE-123 - Fixes the issueRefs ISSUE-123 - Just referencesBREAKING CHANGE: ... - Documents breaking changesFor significant changes, add explanation:
feat(auth): implement OAuth2 authentication flow
- Added OAuth2 provider integration
- Implemented token refresh mechanism
- Added session persistence to Redis
- Updated user model with OAuth fields
This enables third-party sign-in for better UX.
Addresses AUTH-127 requirements.
Closes AUTH-127
If multiple related files change, use single commit:
git add src/auth/jwt.ts test/auth/jwt.test.ts
git commit -m "fix(auth): validate JWT expiration"
Not:
git add src/auth/jwt.ts
git commit -m "fix(auth): validate JWT expiration"
git add test/auth/jwt.test.ts
git commit -m "test(auth): add JWT expiration tests"
Scenario: Added new user registration endpoint
feat(api): add user registration endpoint
- POST /auth/register creates new user accounts
- Validates email format and password strength
- Returns JWT token on successful registration
Closes AUTH-101
Analysis:
feat: (new feature)api (API endpoint changed)Scenario: Fixed database timeout issue
fix(db): handle connection timeouts gracefully
- Added 30-second connection timeout
- Retry logic with exponential backoff
- Return 503 Service Unavailable to clients
- Log timeout events for monitoring
Fixes DB-456
Refs AUTH-123
Analysis:
fix: (bug fix)db (database layer)Scenario: Extracted authentication logic into module
refactor(auth): extract validation logic to utility module
- Move JWT validation to src/auth/validators.ts
- Extract middleware factory to src/auth/middleware.ts
- Improve code reusability and testability
- No functional changes
Analysis:
refactor: (internal improvement)auth (authentication module)Scenario: Added API authentication guide
docs(api): add authentication implementation guide
- New section: JWT token flow diagrams
- New section: Token refresh strategy
- Code examples for common authentication patterns
- Links to security best practices
Analysis:
docs: (documentation)api (API documentation)Scenario: Added caching to reduce database queries
perf(api): implement request caching for 40% query reduction
- Cache GET requests for 5 minutes (TTL)
- Invalidate cache on POST/PUT/DELETE
- Add Redis cache layer
- Reduces database load by 40% in benchmarks
Closes PERF-234
Analysis:
perf: (performance improvement)api (API layer)Scenario: Implemented complete authentication system
feat(auth): implement JWT authentication system
- Add JWT token generation and validation
- Add login endpoint with credential verification
- Add logout endpoint with token blacklisting
- Add protected route middleware
- Add 90 tests covering all scenarios
This enables secure user authentication and session management.
Replaces legacy session-based auth system.
Closes AUTH-105
Closes AUTH-106
Closes AUTH-107
Analysis:
feat: (new feature)auth (authentication)/ccpm:commit/ccpm:commit [issue-id] [message]
Examples:
# Auto-detect everything from current branch
/ccpm:commit
# Specify issue, auto-generate message
/ccpm:commit AUTH-123
# Specify issue and message
/ccpm:commit AUTH-123 "Fix login validation error"
# Just provide message (detects issue from branch)
/ccpm:commit "Refactor authentication module"
# 1. Make changes
$ vim src/auth/jwt.ts
# 2. Stage changes
$ git add src/auth/jwt.ts test/auth/jwt.test.ts
# 3. Create conventional commit linked to Linear
$ /ccpm:commit
Analyzing changes...
Branch: fix/AUTH-123-jwt-expiration
Files: src/auth/jwt.ts, test/auth/jwt.test.ts
Type: fix
Scope: auth
Generated commit:
fix(auth): prevent expired tokens from accessing API
Proceed? (yes/no)
# 4. Commit created automatically
$ git log -1 --oneline
a1b2c3d fix(auth): prevent expired tokens from accessing API
# 5. Linear updated
AUTH-123 comment added: "Commit: a1b2c3d"
❌ Mistake: Using feat: for a bug fix
feat(auth): fix JWT validation
✅ Correct: Use fix: for bug fixes
fix(auth): validate JWT expiration
Why: Different types trigger different version bumps. A bug fix should not bump minor version.
❌ Mistake: Generic, unclear message
fix: update auth
chore: fixes
feat: improvements
✅ Correct: Specific, action-oriented messages
fix(auth): validate JWT expiration before token use
chore(deps): upgrade Node.js to v20.11
feat(api): add user registration endpoint
❌ Mistake: No issue reference
fix(auth): prevent expired tokens
✅ Correct: Link to Linear issue
fix(auth): prevent expired tokens
Closes AUTH-123
Why: Creates audit trail and helps team understand why change was made.
❌ Mistake: Past tense (non-imperative)
fixed JWT validation
added user registration
refactored auth module
✅ Correct: Imperative mood
fix JWT validation
add user registration
refactor auth module
❌ Mistake: Long, detailed first line
feat(auth): add comprehensive JWT authentication system with token refresh
and improved security checks including rate limiting and IP whitelisting
✅ Correct: Concise subject (under 72 chars), details in body
feat(auth): add JWT authentication system
- Add token generation and validation
- Add logout with token blacklisting
- Add protected route middleware
- Add rate limiting and IP checks
When planning a task with /ccpm:plan:
Task: "Implement JWT authentication"
Implementation plan:
- [ ] Create auth module
- [ ] Add login endpoint
- [ ] Add protected route middleware
- [ ] Add comprehensive tests
Commits expected:
1. `feat(auth): create JWT authentication module`
2. `feat(api): add login endpoint`
3. `feat(api): add protected route middleware`
4. `test(auth): add JWT validation tests`
When making changes during /ccpm:work:
# 1. Work on feature
$ vim src/auth/jwt.ts
# 2. Run tests
$ npm test
# 3. Create conventional commit
$ /ccpm:commit
# 4. Sync progress
$ /ccpm:sync "Implemented JWT validation"
# 5. Repeat for each logical change
When verifying with /ccpm:verify:
Commit history should show:
a1b2c3d feat(auth): prevent expired tokens from accessing API
b2c3d4e feat(api): add login endpoint
c3d4e5f test(auth): add JWT validation tests
Each commit should:
When finalizing with /ccpm:done:
Check commit history:
git log --oneline --grep="ISSUE-123"
Should show:
This skill activates when you:
/ccpm:commit command/ccpm:done (which includes commit step)Works alongside:
Example combined workflow:
User: "I finished the JWT feature"
↓
/ccpm:sync → Update Linear with progress
↓
/ccpm:commit → Create conventional commit
↓
commit-assistant → Auto-generate message, link to issue
↓
/ccpm:verify → Run quality checks on changed code
↓
/ccpm:done → Create PR, sync external systems
This skill ensures:
Philosophy: Clear commits enable clear history, which enables automation and team communication.
Based on: Conventional Commits 1.0.0
License: MIT
CCPM Integration: /ccpm:commit, /ccpm:sync, /ccpm:done
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.