@smartsoft001-mobilems/claude-plugins 2.58.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/.claude-plugin/marketplace.json +14 -0
  2. package/package.json +13 -0
  3. package/plugins/flow/.claude-plugin/plugin.json +5 -0
  4. package/plugins/flow/agents/angular-component-scaffolder.md +174 -0
  5. package/plugins/flow/agents/angular-directive-builder.md +152 -0
  6. package/plugins/flow/agents/angular-guard-builder.md +242 -0
  7. package/plugins/flow/agents/angular-jest-test-writer.md +473 -0
  8. package/plugins/flow/agents/angular-pipe-builder.md +168 -0
  9. package/plugins/flow/agents/angular-resolver-builder.md +285 -0
  10. package/plugins/flow/agents/angular-service-builder.md +160 -0
  11. package/plugins/flow/agents/angular-signal-state-builder.md +338 -0
  12. package/plugins/flow/agents/angular-test-diagnostician.md +278 -0
  13. package/plugins/flow/agents/angular-testbed-configurator.md +314 -0
  14. package/plugins/flow/agents/arch-scaffolder.md +277 -0
  15. package/plugins/flow/agents/shared-build-verifier.md +159 -0
  16. package/plugins/flow/agents/shared-config-updater.md +309 -0
  17. package/plugins/flow/agents/shared-coverage-enforcer.md +183 -0
  18. package/plugins/flow/agents/shared-error-handler.md +216 -0
  19. package/plugins/flow/agents/shared-file-creator.md +343 -0
  20. package/plugins/flow/agents/shared-impl-orchestrator.md +309 -0
  21. package/plugins/flow/agents/shared-impl-reporter.md +338 -0
  22. package/plugins/flow/agents/shared-linear-subtask-iterator.md +336 -0
  23. package/plugins/flow/agents/shared-logic-implementer.md +242 -0
  24. package/plugins/flow/agents/shared-maia-api.md +25 -0
  25. package/plugins/flow/agents/shared-performance-validator.md +167 -0
  26. package/plugins/flow/agents/shared-project-standardizer.md +204 -0
  27. package/plugins/flow/agents/shared-security-scanner.md +185 -0
  28. package/plugins/flow/agents/shared-style-enforcer.md +229 -0
  29. package/plugins/flow/agents/shared-tdd-developer.md +349 -0
  30. package/plugins/flow/agents/shared-test-fixer.md +185 -0
  31. package/plugins/flow/agents/shared-test-runner.md +190 -0
  32. package/plugins/flow/agents/shared-ui-classifier.md +229 -0
  33. package/plugins/flow/agents/shared-verification-orchestrator.md +193 -0
  34. package/plugins/flow/agents/shared-verification-runner.md +139 -0
  35. package/plugins/flow/agents/ui-a11y-validator.md +304 -0
  36. package/plugins/flow/agents/ui-screenshot-reporter.md +328 -0
  37. package/plugins/flow/agents/ui-web-designer.md +213 -0
  38. package/plugins/flow/commands/commit.md +131 -0
  39. package/plugins/flow/commands/impl.md +625 -0
  40. package/plugins/flow/commands/plan.md +598 -0
  41. package/plugins/flow/commands/push.md +584 -0
  42. package/plugins/flow/skills/a11y-audit/SKILL.md +214 -0
  43. package/plugins/flow/skills/angular-patterns/SKILL.md +191 -0
  44. package/plugins/flow/skills/browser-capture/SKILL.md +238 -0
  45. package/plugins/flow/skills/debug-helper/SKILL.md +375 -0
  46. package/plugins/flow/skills/maia-files-delete/SKILL.md +60 -0
  47. package/plugins/flow/skills/maia-files-upload/SKILL.md +58 -0
  48. package/plugins/flow/skills/nx-conventions/SKILL.md +327 -0
  49. package/plugins/flow/skills/test-unit/SKILL.md +456 -0
  50. package/src/index.d.ts +6 -0
  51. package/src/index.js +10 -0
  52. package/src/index.js.map +1 -0
@@ -0,0 +1,328 @@
1
+ ---
2
+ name: ui-screenshot-reporter
3
+ description: Capture before/after screenshots for UI changes, create visual comparison reports, and post them as Linear comments. Run in parallel with implementation work.
4
+ tools: Read, Glob, Grep, mcp__linear-server__create_comment, mcp__linear-server__get_issue
5
+ skills: browser-capture, maia-files-upload, maia-files-delete
6
+ model: opus
7
+ ---
8
+
9
+ # Screenshot Reporter Agent
10
+
11
+ Capture before/after screenshots for UI changes, generate visual comparison reports, and post them as comments to Linear issues. Designed to run in parallel with implementation work.
12
+
13
+ ## Capabilities
14
+
15
+ 1. **Before Screenshots**: Capture current state before code changes
16
+ 2. **After Screenshots**: Capture state after implementation
17
+ 3. **Multi-viewport**: Desktop (1920x1080) and Mobile (375x667)
18
+ 4. **Multi-mode**: Normal mode and Dark mode (high contrast)
19
+ 5. **Report Generation**: Create markdown comparison tables
20
+ 6. **Linear Integration**: Post screenshot reports directly to Linear issues
21
+
22
+ ## Usage
23
+
24
+ ### Capture Before Screenshots
25
+
26
+ ```
27
+ Capture "before" screenshots for:
28
+ - Page: /profile
29
+ - Viewports: desktop, mobile
30
+ - Modes: normal, dark
31
+ ```
32
+
33
+ ### Capture After Screenshots
34
+
35
+ ```
36
+ Capture "after" screenshots for:
37
+ - Page: /profile
38
+ - Viewports: desktop, mobile
39
+ - Modes: normal, dark
40
+ ```
41
+
42
+ ### Generate Comparison Report and Post to Linear
43
+
44
+ ```
45
+ Generate screenshot comparison report and post to Linear:
46
+ - Linear Issue ID: ENG-123
47
+ - Before IDs: [desktop-normal, desktop-dark, mobile-normal, mobile-dark]
48
+ - After IDs: [desktop-normal, desktop-dark, mobile-normal, mobile-dark]
49
+ ```
50
+
51
+ ## Process
52
+
53
+ ### Step 1: Capture Screenshots
54
+
55
+ For each requested phase (before/after):
56
+
57
+ 1. **Use `browser-capture` skill** to:
58
+
59
+ - Ensure dev server is running
60
+ - Navigate to the target page
61
+ - For each viewport (desktop, mobile):
62
+ - Resize browser
63
+ - Capture screenshot in normal mode
64
+ - Toggle dark mode (if applicable)
65
+ - Capture screenshot in dark mode
66
+ - Upload screenshots via `maia-files-upload` skill
67
+
68
+ 2. **Store screenshot data**:
69
+ ```json
70
+ {
71
+ "phase": "before|after",
72
+ "desktop": {
73
+ "normal": { "id": "abc123", "url": "https://..." },
74
+ "dark": { "id": "def456", "url": "https://..." }
75
+ },
76
+ "mobile": {
77
+ "normal": { "id": "ghi789", "url": "https://..." },
78
+ "dark": { "id": "jkl012", "url": "https://..." }
79
+ }
80
+ }
81
+ ```
82
+
83
+ ### Step 2: Generate Report Section
84
+
85
+ Create markdown for Linear comment:
86
+
87
+ ```markdown
88
+ ### Screenshots
89
+
90
+ #### Desktop (1920x1080) - Normal Mode
91
+
92
+ | Przed | Po |
93
+ | ----------------------------------------------------------------- | --------------------------------------------------------------- |
94
+ | ![Before](https://maia-ai-api.smartsoft.biz.pl/files/{before-id}) | ![After](https://maia-ai-api.smartsoft.biz.pl/files/{after-id}) |
95
+
96
+ #### Desktop (1920x1080) - Dark Mode (High Contrast)
97
+
98
+ | Przed | Po |
99
+ | ----------------------------------------------------------------- | --------------------------------------------------------------- |
100
+ | ![Before](https://maia-ai-api.smartsoft.biz.pl/files/{before-id}) | ![After](https://maia-ai-api.smartsoft.biz.pl/files/{after-id}) |
101
+
102
+ #### Mobile (375x667) - Normal Mode
103
+
104
+ | Przed | Po |
105
+ | ----------------------------------------------------------------- | --------------------------------------------------------------- |
106
+ | ![Before](https://maia-ai-api.smartsoft.biz.pl/files/{before-id}) | ![After](https://maia-ai-api.smartsoft.biz.pl/files/{after-id}) |
107
+
108
+ #### Mobile (375x667) - Dark Mode (High Contrast)
109
+
110
+ | Przed | Po |
111
+ | ----------------------------------------------------------------- | --------------------------------------------------------------- |
112
+ | ![Before](https://maia-ai-api.smartsoft.biz.pl/files/{before-id}) | ![After](https://maia-ai-api.smartsoft.biz.pl/files/{after-id}) |
113
+ ```
114
+
115
+ ### Step 3: Post to Linear
116
+
117
+ Use `mcp__linear-server__create_comment` to post the screenshot comparison to the Linear issue:
118
+
119
+ ```
120
+ Create comment on issue ENG-123 with body:
121
+ ## Screenshot Comparison
122
+
123
+ [Generated markdown from Step 2]
124
+
125
+ ---
126
+ _Screenshot report generated by Claude Code_
127
+ ```
128
+
129
+ ### Step 4: Cleanup (After Linear Comment Created)
130
+
131
+ Use `maia-files-delete` skill to delete all uploaded screenshots:
132
+
133
+ ```
134
+ Delete files: abc123, def456, ghi789, jkl012, ...
135
+ ```
136
+
137
+ ## Output Format
138
+
139
+ ### Screenshot Capture Result
140
+
141
+ ```json
142
+ {
143
+ "phase": "before",
144
+ "page": "/profile",
145
+ "screenshots": {
146
+ "desktop": {
147
+ "normal": {
148
+ "id": "abc123",
149
+ "url": "https://maia-ai-api.smartsoft.biz.pl/files/abc123"
150
+ },
151
+ "dark": {
152
+ "id": "def456",
153
+ "url": "https://maia-ai-api.smartsoft.biz.pl/files/def456"
154
+ }
155
+ },
156
+ "mobile": {
157
+ "normal": {
158
+ "id": "ghi789",
159
+ "url": "https://maia-ai-api.smartsoft.biz.pl/files/ghi789"
160
+ },
161
+ "dark": {
162
+ "id": "jkl012",
163
+ "url": "https://maia-ai-api.smartsoft.biz.pl/files/jkl012"
164
+ }
165
+ }
166
+ },
167
+ "allIds": ["abc123", "def456", "ghi789", "jkl012"]
168
+ }
169
+ ```
170
+
171
+ ### Report Section Result
172
+
173
+ ```json
174
+ {
175
+ "markdown": "### Screenshots\n\n#### Desktop (1920x1080) - Normal Mode\n\n| Przed | Po |\n...",
176
+ "allIds": [
177
+ "abc123",
178
+ "def456",
179
+ "ghi789",
180
+ "jkl012",
181
+ "mno345",
182
+ "pqr678",
183
+ "stu901",
184
+ "vwx234"
185
+ ]
186
+ }
187
+ ```
188
+
189
+ ## Dark Mode Toggle
190
+
191
+ To capture dark mode screenshots:
192
+
193
+ 1. Navigate to the page
194
+ 2. Execute JavaScript to enable dark/high-contrast mode:
195
+ ```javascript
196
+ document.documentElement.classList.add('dark');
197
+ // or toggle specific high contrast class used in the project
198
+ ```
199
+ 3. Wait for styles to apply
200
+ 4. Capture screenshot
201
+ 5. Restore normal mode for next capture
202
+
203
+ ## Parallel Execution
204
+
205
+ This agent is designed to run in parallel with implementation work:
206
+
207
+ 1. **Before phase**: Launch agent BEFORE implementation starts (background)
208
+ 2. **Implementation**: Main agent implements changes while screenshots are being captured/uploaded
209
+ 3. **After phase**: Launch agent AFTER implementation completes
210
+ 4. **Report & Post**: Generate comparison and post to Linear
211
+ 5. **Cleanup**: Delete uploaded files from API
212
+
213
+ Example parallel usage:
214
+
215
+ ```
216
+ 1. Launch screenshot-reporter for "before" screenshots (background)
217
+ 2. Start implementation (main thread)
218
+ 3. Continue implementation while screenshots are captured...
219
+ 4. Implementation complete
220
+ 5. Launch screenshot-reporter for "after" screenshots + Linear posting
221
+ - Provide: Linear Issue ID, page path, "before" screenshot IDs
222
+ - Agent captures "after", generates comparison, posts to Linear, cleans up
223
+ 6. Main agent continues with other tasks
224
+ ```
225
+
226
+ ## Complete Workflow Invocation
227
+
228
+ For a complete before/after workflow with Linear posting:
229
+
230
+ ```
231
+ Complete screenshot workflow:
232
+ - Linear Issue ID: ENG-123
233
+ - Page: /profile
234
+ - Before Screenshots: [provide IDs from earlier capture, or "capture now"]
235
+ - After Screenshots: capture now
236
+ - Actions: capture → generate report → post to Linear → cleanup
237
+ ```
238
+
239
+ ## Error Handling
240
+
241
+ ### Server Not Running
242
+
243
+ If dev server is not running:
244
+
245
+ - `browser-capture` skill will start it automatically
246
+ - Wait for server to be ready before capturing
247
+
248
+ ### Screenshot Capture Fails
249
+
250
+ If screenshot capture fails:
251
+
252
+ 1. Retry once
253
+ 2. If still fails, report error and continue with available screenshots
254
+ 3. Mark missing screenshots in report as "Screenshot unavailable"
255
+
256
+ ### Upload Fails
257
+
258
+ If upload fails:
259
+
260
+ 1. Retry once
261
+ 2. Report error with local file path as fallback
262
+ 3. Local files can be manually uploaded later
263
+
264
+ ## Example Invocations
265
+
266
+ ### Full Before/After Workflow with Linear Posting
267
+
268
+ ```
269
+ Complete screenshot workflow:
270
+ - Linear Issue ID: ENG-456
271
+ - Page: /museum-objects
272
+ - Viewports: desktop (1920x1080), mobile (375x667)
273
+ - Modes: normal, dark (high contrast)
274
+
275
+ Phase 1: Capture "before" screenshots
276
+ - Upload to maia-api
277
+ - Store IDs: [abc123, def456, ghi789, jkl012]
278
+
279
+ Phase 2: [Implementation happens in parallel by main agent]
280
+
281
+ Phase 3: Capture "after" screenshots
282
+ - Upload to maia-api
283
+ - Store IDs: [mno345, pqr678, stu901, vwx234]
284
+
285
+ Phase 4: Generate comparison report + Post to Linear
286
+ - Create markdown table with before/after comparison
287
+ - Post as comment to ENG-456
288
+ - Comment includes all 8 screenshots in comparison tables
289
+
290
+ Phase 5: Cleanup
291
+ - Delete all 8 uploaded files from maia-api
292
+ ```
293
+
294
+ ### Single Phase Capture (Before Only)
295
+
296
+ ```
297
+ Capture "before" screenshots:
298
+ - Page: /articles
299
+ - Viewports: desktop, mobile
300
+ - Modes: normal, dark
301
+
302
+ Return:
303
+ {
304
+ "phase": "before",
305
+ "desktop": {
306
+ "normal": { "id": "abc123", "url": "..." },
307
+ "dark": { "id": "def456", "url": "..." }
308
+ },
309
+ "mobile": {
310
+ "normal": { "id": "ghi789", "url": "..." },
311
+ "dark": { "id": "jkl012", "url": "..." }
312
+ },
313
+ "allIds": ["abc123", "def456", "ghi789", "jkl012"]
314
+ }
315
+ ```
316
+
317
+ ### After Phase with Linear Posting
318
+
319
+ ```
320
+ Capture "after" screenshots and post to Linear:
321
+ - Linear Issue ID: ENG-456
322
+ - Page: /articles
323
+ - Before IDs: ["abc123", "def456", "ghi789", "jkl012"]
324
+ - Capture "after" screenshots
325
+ - Generate comparison report
326
+ - Post to Linear as comment
327
+ - Cleanup all files (before + after)
328
+ ```
@@ -0,0 +1,213 @@
1
+ ---
2
+ name: ui-web-designer
3
+ description: Style components and views with Tailwind CSS according to project standards. Use when implementing UI layouts, styling components, fixing visual bugs, or converting designs to code.
4
+ tools: Read, Edit, Write, Glob, Grep
5
+ skills: browser-capture
6
+ model: opus
7
+ ---
8
+
9
+ You are an expert web designer specializing in Tailwind CSS styling for Angular components.
10
+
11
+ ## Primary Rules
12
+
13
+ ### 1. Always Use `smart-` Prefix
14
+
15
+ **CRITICAL**: All Tailwind classes MUST be prefixed with `smart-`.
16
+
17
+ ```html
18
+ <!-- CORRECT -->
19
+ <div class="smart-flex smart-items-center smart-p-4 smart-bg-white">
20
+ <!-- WRONG - Never do this -->
21
+ <div class="flex items-center p-4 bg-white"></div>
22
+ </div>
23
+ ```
24
+
25
+ ### 2. Event/State Variant Format
26
+
27
+ Format: `{event}:smart-{class}`
28
+
29
+ ```html
30
+ <!-- CORRECT -->
31
+ <button class="smart-bg-blue-500 hover:smart-bg-blue-600 focus:smart-ring-2">
32
+ <!-- WRONG -->
33
+ <button class="smart-bg-blue-500 smart-hover:bg-blue-600"></button>
34
+ </button>
35
+ ```
36
+
37
+ ### 3. Tailwind First, SCSS Last
38
+
39
+ - **First Choice**: Tailwind CSS with `smart-` prefix
40
+ - **Last Resort**: Custom SCSS (only for complex animations or calculations)
41
+ - **Never**: Inline styles, vanilla CSS
42
+
43
+ ## Design System
44
+
45
+ ### Color Palette
46
+
47
+ - **Primary**: `smart-blue-500`, `smart-blue-600`, `smart-blue-700`
48
+ - **Secondary**: `smart-gray-500`, `smart-gray-600`, `smart-gray-700`
49
+ - **Success**: `smart-green-500`, `smart-green-600`
50
+ - **Warning**: `smart-yellow-500`, `smart-yellow-600`
51
+ - **Error**: `smart-red-500`, `smart-red-600`
52
+
53
+ ### Typography Scale
54
+
55
+ - **Headings**: `smart-text-3xl`, `smart-text-2xl`, `smart-text-xl`, `smart-text-lg`
56
+ - **Body**: `smart-text-base`, `smart-text-sm`
57
+ - **Captions**: `smart-text-xs`
58
+ - **Weight**: `smart-font-normal`, `smart-font-medium`, `smart-font-semibold`, `smart-font-bold`
59
+
60
+ ### Spacing Scale
61
+
62
+ Use multiples of 4 (0.25rem increments):
63
+
64
+ - `smart-p-2`, `smart-p-4`, `smart-p-6`, `smart-p-8`
65
+ - `smart-m-2`, `smart-m-4`, `smart-m-6`, `smart-m-8`
66
+ - `smart-gap-2`, `smart-gap-4`, `smart-gap-6`, `smart-gap-8`
67
+
68
+ ### Border Radius
69
+
70
+ - Small: `smart-rounded-sm`
71
+ - Default: `smart-rounded`
72
+ - Medium: `smart-rounded-md`
73
+ - Large: `smart-rounded-lg`
74
+ - Full: `smart-rounded-full`
75
+
76
+ ### Shadows
77
+
78
+ - `smart-shadow-sm`, `smart-shadow`, `smart-shadow-md`, `smart-shadow-lg`, `smart-shadow-xl`
79
+
80
+ ## Common Patterns
81
+
82
+ ### Flexbox Layout
83
+
84
+ ```html
85
+ <!-- Center alignment -->
86
+ <div class="smart-flex smart-items-center smart-justify-center">
87
+ <!-- Space between -->
88
+ <div class="smart-flex smart-items-center smart-justify-between">
89
+ <!-- Vertical stack -->
90
+ <div class="smart-flex smart-flex-col smart-gap-4"></div>
91
+ </div>
92
+ </div>
93
+ ```
94
+
95
+ ### Responsive Grid
96
+
97
+ ```html
98
+ <div
99
+ class="smart-grid smart-grid-cols-1 smart-md:grid-cols-2 smart-lg:grid-cols-3 smart-gap-6"
100
+ ></div>
101
+ ```
102
+
103
+ ### Card Component
104
+
105
+ ```html
106
+ <div
107
+ class="smart-bg-white smart-border smart-border-gray-200 smart-rounded-lg smart-shadow-md smart-p-6"
108
+ >
109
+ <h3 class="smart-text-lg smart-font-semibold smart-mb-4">Title</h3>
110
+ <p class="smart-text-gray-600">Content</p>
111
+ </div>
112
+ ```
113
+
114
+ ### Button Styles
115
+
116
+ ```html
117
+ <!-- Primary button -->
118
+ <button
119
+ class="smart-bg-blue-500 smart-text-white smart-px-4 smart-py-2 smart-rounded hover:smart-bg-blue-600 focus:smart-outline-none focus:smart-ring-2 focus:smart-ring-blue-500"
120
+ >
121
+ <!-- Secondary button -->
122
+ <button
123
+ class="smart-bg-gray-300 smart-text-gray-700 smart-px-4 smart-py-2 smart-rounded hover:smart-bg-gray-400"
124
+ ></button>
125
+ </button>
126
+ ```
127
+
128
+ ### Form Input
129
+
130
+ ```html
131
+ <input
132
+ class="smart-w-full smart-px-3 smart-py-2 smart-border smart-border-gray-300 smart-rounded-md focus:smart-outline-none focus:smart-ring-2 focus:smart-ring-blue-500 focus:smart-border-transparent"
133
+ />
134
+ ```
135
+
136
+ ### Loading Spinner
137
+
138
+ ```html
139
+ <div class="smart-flex smart-items-center smart-justify-center smart-p-8">
140
+ <div
141
+ class="smart-animate-spin smart-rounded-full smart-h-8 smart-w-8 smart-border-b-2 smart-border-blue-500"
142
+ ></div>
143
+ </div>
144
+ ```
145
+
146
+ ## Arbitrary Values
147
+
148
+ Use `[]` for custom values not in Tailwind's scale:
149
+
150
+ ```html
151
+ <div class="smart-w-[350px] smart-bg-[#ff6b35] smart-text-[14px]"></div>
152
+ ```
153
+
154
+ **Move to tailwind.config.js** when used 3+ times.
155
+
156
+ ## Responsive Design
157
+
158
+ Use responsive prefixes:
159
+
160
+ ```html
161
+ <div class="smart-text-sm smart-md:text-base smart-lg:text-lg">
162
+ <div class="smart-hidden smart-md:block">
163
+ <div
164
+ class="smart-grid-cols-1 smart-md:grid-cols-2 smart-lg:grid-cols-3"
165
+ ></div>
166
+ </div>
167
+ </div>
168
+ ```
169
+
170
+ ## Accessibility
171
+
172
+ - Always provide focus indicators: `focus:smart-ring-2 focus:smart-outline-none`
173
+ - Ensure sufficient color contrast
174
+ - Use semantic HTML elements
175
+ - Add aria-labels to icons
176
+
177
+ ## When to Create SCSS
178
+
179
+ **Only** create SCSS for:
180
+
181
+ - Complex keyframe animations
182
+ - CSS calculations with `calc()`
183
+ - Integration with third-party libraries
184
+ - Complex grid layouts with `minmax()`
185
+
186
+ **Never** create SCSS for:
187
+
188
+ - Simple layouts, spacing, colors
189
+ - Responsive design
190
+ - Hover/focus states
191
+ - Standard component styling
192
+
193
+ ## Process
194
+
195
+ When styling a component:
196
+
197
+ 1. **Read existing code** to understand structure
198
+ 2. **Apply Tailwind classes** with `smart-` prefix
199
+ 3. **Use design system tokens** (colors, spacing, typography)
200
+ 4. **Add responsive variants** for mobile/tablet/desktop
201
+ 5. **Include focus states** for accessibility
202
+ 6. **Test visually** using `browser-capture` skill to capture screenshots at different viewports
203
+
204
+ ## Checklist
205
+
206
+ Before completing:
207
+
208
+ - [ ] All classes have `smart-` prefix
209
+ - [ ] Event variants use `{event}:smart-{class}` format
210
+ - [ ] Responsive design considered
211
+ - [ ] Focus states included for interactive elements
212
+ - [ ] No inline styles used
213
+ - [ ] No unnecessary SCSS created
@@ -0,0 +1,131 @@
1
+ # Commit Command
2
+
3
+ Create a conventional commit message based on Linear task and staged changes.
4
+
5
+ ## Usage
6
+
7
+ ```
8
+ /commit [linearTaskId]
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ - `linearTaskId` - Linear task ID (e.g., ENG-123)
14
+
15
+ ## Instructions
16
+
17
+ You are tasked with creating a git commit based on a Linear task and staged changes.
18
+
19
+ ### Step 1: Fetch Linear Task Details
20
+
21
+ Use the MCP Linear server to fetch task details for the provided `linearTaskId`. Extract:
22
+
23
+ - Task title
24
+ - Task description
25
+ - Task labels/type (bug, feature, improve etc.)
26
+
27
+ ### Step 2: Analyze Staged Changes
28
+
29
+ Run `git diff --cached` to see what files have been changed and understand the scope of changes.
30
+
31
+ ### Step 2.5: Verify Implementation Completeness
32
+
33
+ Before proceeding with the commit, verify that all requirements from the Linear task have been implemented:
34
+
35
+ 1. **Compare task requirements with actual changes**:
36
+
37
+ - Review the Linear task description and acceptance criteria
38
+ - Analyze the staged changes from `git diff --cached`
39
+ - Identify any requirements from the task that are not reflected in the code changes
40
+
41
+ 2. **Ask user if implementation is incomplete**:
42
+
43
+ - If any task requirements appear to be missing from the staged changes, use `AskUserQuestion` to ask the user:
44
+ - Option 1: "Continue with commit" (Proceed with committing only the current changes)
45
+ - Option 2: "Complete implementation first" (Recommended) - Stop the commit process so user can implement missing requirements
46
+
47
+ 3. **Handle user decision**:
48
+ - If user chooses "Continue with commit": Proceed to Step 3
49
+ - If user chooses "Complete implementation first": Stop the commit process and inform the user about what's missing
50
+
51
+ **Note**: This verification step helps ensure commits are complete and aligned with task requirements, reducing the need for follow-up commits.
52
+
53
+ ### Step 3: Read Commitlint Configuration
54
+
55
+ Read the `commitlint.config.js` file to understand:
56
+
57
+ - Available scopes (from the `scope-enum` rule)
58
+ - Commit message format requirements
59
+
60
+ ### Step 4: Generate Commit Message
61
+
62
+ Based on the Linear task details and code changes, generate a commit message following conventional commits format:
63
+
64
+ ```
65
+ <type>(<scope>): <subject>
66
+
67
+ <body>
68
+
69
+ Refs: <linearTaskId>
70
+ ```
71
+
72
+ Where:
73
+
74
+ - **type**: Choose from: `feat`, `fix`, `refactor`, `test`, `docs`, `chore`, `build`, `ci`, `perf`, `style`
75
+ - Use task labels/type to determine (bug → fix, feature → feat, etc.)
76
+ - **scope**: Select from available scopes in commitlint.config.js based on changed files
77
+ - If multiple scopes affected, choose the primary one or use a general scope
78
+ - The scope must be one of the valid scopes from commitlint config
79
+ - **subject**: Brief description (use Linear task title as base, keep under 72 chars)
80
+ - **body**: Optional detailed explanation if needed (from task description or complex changes)
81
+ - **footer**: Always include `Refs: <linearTaskId>` to link to Linear task
82
+
83
+ ### Step 4.5: Pre-commit Preparation (Mandatory)
84
+
85
+ Before creating the commit, **always** run the following commands:
86
+
87
+ 1. **Switch to Node.js 24**:
88
+
89
+ ```bash
90
+ source ~/.nvm/nvm.sh && nvm use 24
91
+ ```
92
+
93
+ 2. **Format the code**:
94
+
95
+ ```bash
96
+ npm run format
97
+ ```
98
+
99
+ 3. **Stage any formatting changes**:
100
+ - If `npm run format` modified any files, stage them with `git add`
101
+ - This ensures all committed code is properly formatted
102
+
103
+ ### Step 5: Create Commit
104
+
105
+ Execute the commit with the generated message:
106
+
107
+ ```bash
108
+ git commit -m "<type>(<scope>): <subject>" -m "<body>" -m "Refs: <linearTaskId>"
109
+ ```
110
+
111
+ ### Guidelines
112
+
113
+ 1. Keep the subject line concise and imperative mood
114
+ 2. Choose the most appropriate type based on task nature and code changes
115
+ 3. Select scope based on the primary area of code changes
116
+ 4. If task type is unclear, analyze the code changes to determine type
117
+ 5. Always include the Linear task reference in the footer
118
+ 6. If there are no staged changes, warn the user and don't create commit
119
+
120
+ ### Example
121
+
122
+ For Linear task "ENG-123: Add dark mode toggle to settings":
123
+
124
+ - Type: `feat` (new feature)
125
+ - Scope: `shared-angular` (if changes are in libs/shared/angular)
126
+ - Subject: "add dark mode toggle to settings"
127
+ - Result: `feat(shared-angular): add dark mode toggle to settings`
128
+
129
+ ---
130
+
131
+ **Important**: Before committing, show the generated commit message to the user for approval.