$npx -y skills add tranhieutt/software_development_department --skill commitCreates a well-formed git commit following conventional commit format with type, scope, and descriptive message. Use when the user is ready to commit changes or mentions conventional commits.
| 1 | # Conventional Commit Messages |
| 2 | |
| 3 | Follow these conventions when creating commits for this project. |
| 4 | |
| 5 | ## Prerequisites |
| 6 | |
| 7 | Before committing, always check the current branch: |
| 8 | |
| 9 | ```bash |
| 10 | git branch --show-current |
| 11 | ``` |
| 12 | |
| 13 | **If you're on `main` or `master`, confirm with the user before committing directly** — it is usually better to commit on a feature branch. Do not create a branch without user confirmation. |
| 14 | |
| 15 | Before claiming the change is ready to commit, use |
| 16 | `verification-before-completion`: |
| 17 | |
| 18 | - Identify the exact readiness claim for the commit. |
| 19 | - Run the relevant project checks, or state exactly why they cannot be run. |
| 20 | - Inspect `git diff --stat` / changed files so the commit scope is known. |
| 21 | - Do not say "ready to commit" if verification is partial or failed. |
| 22 | |
| 23 | ## Format |
| 24 | |
| 25 | ``` |
| 26 | <type>(<scope>): <subject> |
| 27 | |
| 28 | <body> |
| 29 | |
| 30 | <footer> |
| 31 | ``` |
| 32 | |
| 33 | The header is required. Scope is optional. All lines must stay under 100 characters. |
| 34 | |
| 35 | ## Commit Types |
| 36 | |
| 37 | | Type | Purpose | |
| 38 | |------|---------| |
| 39 | | `feat` | New feature | |
| 40 | | `fix` | Bug fix | |
| 41 | | `ref` | Refactoring (no behavior change) | |
| 42 | | `perf` | Performance improvement | |
| 43 | | `docs` | Documentation only | |
| 44 | | `test` | Test additions or corrections | |
| 45 | | `build` | Build system or dependencies | |
| 46 | | `ci` | CI configuration | |
| 47 | | `chore` | Maintenance tasks | |
| 48 | | `style` | Code formatting (no logic change) | |
| 49 | | `meta` | Repository metadata | |
| 50 | | `license` | License changes | |
| 51 | |
| 52 | ## Subject Line Rules |
| 53 | |
| 54 | - Use imperative, present tense: "Add feature" not "Added feature" |
| 55 | - Capitalize the first letter |
| 56 | - No period at the end |
| 57 | - Maximum 70 characters |
| 58 | |
| 59 | ## Body Guidelines |
| 60 | |
| 61 | - Explain **what** and **why**, not how |
| 62 | - Use imperative mood and present tense |
| 63 | - Include motivation for the change |
| 64 | - Contrast with previous behavior when relevant |
| 65 | |
| 66 | ## Footer: Issue References |
| 67 | |
| 68 | Reference issues in the footer using these patterns: |
| 69 | |
| 70 | ``` |
| 71 | Fixes #1234 |
| 72 | Refs #1234 |
| 73 | Refs LINEAR-ABC-123 |
| 74 | ``` |
| 75 | |
| 76 | - `Fixes` closes the issue when merged |
| 77 | - `Refs` links without closing |
| 78 | |
| 79 | ## AI-Generated Changes |
| 80 | |
| 81 | When changes were primarily generated by a coding agent (like Claude Code), include the Co-Authored-By attribution in the commit footer: |
| 82 | |
| 83 | ``` |
| 84 | Co-Authored-By: Claude <noreply@anthropic.com> |
| 85 | ``` |
| 86 | |
| 87 | This is the only indicator of AI involvement that should appear in commits. Do not add phrases like "Generated by AI", "Written with Claude", or similar markers in the subject, body, or anywhere else in the commit message. |
| 88 | |
| 89 | ## Examples |
| 90 | |
| 91 | ### Simple fix |
| 92 | |
| 93 | ``` |
| 94 | fix(api): Handle null response in user endpoint |
| 95 | |
| 96 | The user API could return null for deleted accounts, causing a crash |
| 97 | in the dashboard. Add null check before accessing user properties. |
| 98 | |
| 99 | Fixes #5678 |
| 100 | Co-Authored-By: Claude <noreply@anthropic.com> |
| 101 | ``` |
| 102 | |
| 103 | ### Feature with scope |
| 104 | |
| 105 | ``` |
| 106 | feat(alerts): Add Slack thread replies for alert updates |
| 107 | |
| 108 | When an alert is updated or resolved, post a reply to the original |
| 109 | Slack thread instead of creating a new message. This keeps related |
| 110 | notifications grouped together. |
| 111 | |
| 112 | Refs GH-1234 |
| 113 | ``` |
| 114 | |
| 115 | ### Refactor |
| 116 | |
| 117 | ``` |
| 118 | ref: Extract common validation logic to shared module |
| 119 | |
| 120 | Move duplicate validation code from three endpoints into a shared |
| 121 | validator class. No behavior change. |
| 122 | ``` |
| 123 | |
| 124 | ### Breaking change |
| 125 | |
| 126 | ``` |
| 127 | feat(api)!: Remove deprecated v1 endpoints |
| 128 | |
| 129 | Remove all v1 API endpoints that were deprecated in version 23.1. |
| 130 | Clients should migrate to v2 endpoints. |
| 131 | |
| 132 | BREAKING CHANGE: v1 endpoints no longer available |
| 133 | Fixes #9999 |
| 134 | ``` |
| 135 | |
| 136 | ## Revert Format |
| 137 | |
| 138 | ``` |
| 139 | revert: feat(api): Add new endpoint |
| 140 | |
| 141 | This reverts commit abc123def456. |
| 142 | |
| 143 | Reason: Caused performance regression in production. |
| 144 | ``` |
| 145 | |
| 146 | ## Principles |
| 147 | |
| 148 | - Each commit should be a single, stable change |
| 149 | - Commits should be independently reviewable |
| 150 | - The repository should be in a working state after each commit |
| 151 | |
| 152 | ## References |
| 153 | |
| 154 | - [Conventional Commits](https://www.conventionalcommits.org/) |
| 155 | |
| 156 | ## Related Skills |
| 157 | |
| 158 | - `verification-before-completion` - Required before commit readiness claims. |
| 159 | |
| 160 | ## When to Use |
| 161 | |
| 162 | - Use when ALWAYS use this skill when committing code changes — never commit directly without it. Creates commits with proper conventional commit format and issue references. Trigger on any commit, git commit, save changes, or commit message task. |