@techwavedev/agi-agent-kit 1.1.7 → 1.2.1

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.

Potentially problematic release.


This version of @techwavedev/agi-agent-kit might be problematic. Click here for more details.

Files changed (111) hide show
  1. package/CHANGELOG.md +82 -1
  2. package/README.md +190 -12
  3. package/bin/init.js +30 -2
  4. package/package.json +6 -3
  5. package/templates/base/AGENTS.md +54 -23
  6. package/templates/base/README.md +325 -0
  7. package/templates/base/directives/memory_integration.md +95 -0
  8. package/templates/base/execution/memory_manager.py +309 -0
  9. package/templates/base/execution/session_boot.py +218 -0
  10. package/templates/base/execution/session_init.py +320 -0
  11. package/templates/base/skill-creator/SKILL_skillcreator.md +23 -36
  12. package/templates/base/skill-creator/scripts/init_skill.py +18 -135
  13. package/templates/skills/ec/README.md +31 -0
  14. package/templates/skills/ec/aws/SKILL.md +1020 -0
  15. package/templates/skills/ec/aws/defaults.yaml +13 -0
  16. package/templates/skills/ec/aws/references/common_patterns.md +80 -0
  17. package/templates/skills/ec/aws/references/mcp_servers.md +98 -0
  18. package/templates/skills/ec/aws-terraform/SKILL.md +349 -0
  19. package/templates/skills/ec/aws-terraform/references/best_practices.md +394 -0
  20. package/templates/skills/ec/aws-terraform/references/checkov_reference.md +337 -0
  21. package/templates/skills/ec/aws-terraform/scripts/configure_mcp.py +150 -0
  22. package/templates/skills/ec/confluent-kafka/SKILL.md +655 -0
  23. package/templates/skills/ec/confluent-kafka/references/ansible_playbooks.md +792 -0
  24. package/templates/skills/ec/confluent-kafka/references/ec_deployment.md +579 -0
  25. package/templates/skills/ec/confluent-kafka/references/kraft_migration.md +490 -0
  26. package/templates/skills/ec/confluent-kafka/references/troubleshooting.md +778 -0
  27. package/templates/skills/ec/confluent-kafka/references/upgrade_7x_to_8x.md +488 -0
  28. package/templates/skills/ec/confluent-kafka/scripts/kafka_health_check.py +435 -0
  29. package/templates/skills/ec/confluent-kafka/scripts/upgrade_preflight.py +568 -0
  30. package/templates/skills/ec/confluent-kafka/scripts/validate_config.py +455 -0
  31. package/templates/skills/ec/consul/SKILL.md +427 -0
  32. package/templates/skills/ec/consul/references/acl_setup.md +168 -0
  33. package/templates/skills/ec/consul/references/ha_config.md +196 -0
  34. package/templates/skills/ec/consul/references/troubleshooting.md +267 -0
  35. package/templates/skills/ec/consul/references/upgrades.md +213 -0
  36. package/templates/skills/ec/consul/scripts/consul_health_report.py +530 -0
  37. package/templates/skills/ec/consul/scripts/consul_status.py +264 -0
  38. package/templates/skills/ec/consul/scripts/generate_values.py +170 -0
  39. package/templates/skills/ec/documentation/SKILL.md +351 -0
  40. package/templates/skills/ec/documentation/references/best_practices.md +201 -0
  41. package/templates/skills/ec/documentation/scripts/analyze_code.py +307 -0
  42. package/templates/skills/ec/documentation/scripts/detect_changes.py +460 -0
  43. package/templates/skills/ec/documentation/scripts/generate_changelog.py +312 -0
  44. package/templates/skills/ec/documentation/scripts/sync_docs.py +272 -0
  45. package/templates/skills/ec/documentation/scripts/update_skill_docs.py +366 -0
  46. package/templates/skills/ec/gitlab/SKILL.md +529 -0
  47. package/templates/skills/ec/gitlab/references/agent_installation.md +416 -0
  48. package/templates/skills/ec/gitlab/references/api_reference.md +508 -0
  49. package/templates/skills/ec/gitlab/references/gitops_flux.md +465 -0
  50. package/templates/skills/ec/gitlab/references/troubleshooting.md +518 -0
  51. package/templates/skills/ec/gitlab/scripts/generate_agent_values.py +329 -0
  52. package/templates/skills/ec/gitlab/scripts/gitlab_agent_status.py +414 -0
  53. package/templates/skills/ec/jira/SKILL.md +484 -0
  54. package/templates/skills/ec/jira/references/jql_reference.md +148 -0
  55. package/templates/skills/ec/jira/scripts/add_comment.py +91 -0
  56. package/templates/skills/ec/jira/scripts/bulk_log_work.py +124 -0
  57. package/templates/skills/ec/jira/scripts/create_ticket.py +162 -0
  58. package/templates/skills/ec/jira/scripts/get_ticket.py +191 -0
  59. package/templates/skills/ec/jira/scripts/jira_client.py +383 -0
  60. package/templates/skills/ec/jira/scripts/log_work.py +154 -0
  61. package/templates/skills/ec/jira/scripts/search_tickets.py +104 -0
  62. package/templates/skills/ec/jira/scripts/update_comment.py +67 -0
  63. package/templates/skills/ec/jira/scripts/update_ticket.py +161 -0
  64. package/templates/skills/ec/karpenter/SKILL.md +301 -0
  65. package/templates/skills/ec/karpenter/references/ec2nodeclasses.md +421 -0
  66. package/templates/skills/ec/karpenter/references/migration.md +396 -0
  67. package/templates/skills/ec/karpenter/references/nodepools.md +400 -0
  68. package/templates/skills/ec/karpenter/references/troubleshooting.md +359 -0
  69. package/templates/skills/ec/karpenter/scripts/generate_ec2nodeclass.py +187 -0
  70. package/templates/skills/ec/karpenter/scripts/generate_nodepool.py +245 -0
  71. package/templates/skills/ec/karpenter/scripts/karpenter_status.py +359 -0
  72. package/templates/skills/ec/opensearch/SKILL.md +720 -0
  73. package/templates/skills/ec/opensearch/references/ml_neural_search.md +576 -0
  74. package/templates/skills/ec/opensearch/references/operator.md +532 -0
  75. package/templates/skills/ec/opensearch/references/query_dsl.md +532 -0
  76. package/templates/skills/ec/opensearch/scripts/configure_mcp.py +148 -0
  77. package/templates/skills/ec/victoriametrics/SKILL.md +598 -0
  78. package/templates/skills/ec/victoriametrics/references/kubernetes.md +531 -0
  79. package/templates/skills/ec/victoriametrics/references/prometheus_migration.md +333 -0
  80. package/templates/skills/ec/victoriametrics/references/troubleshooting.md +442 -0
  81. package/templates/skills/knowledge/SKILLS_CATALOG.md +274 -4
  82. package/templates/skills/knowledge/intelligent-routing/SKILL.md +237 -164
  83. package/templates/skills/knowledge/parallel-agents/SKILL.md +345 -73
  84. package/templates/skills/knowledge/plugin-discovery/SKILL.md +582 -0
  85. package/templates/skills/knowledge/plugin-discovery/scripts/platform_setup.py +1083 -0
  86. package/templates/skills/knowledge/design-md/README.md +0 -34
  87. package/templates/skills/knowledge/design-md/SKILL.md +0 -193
  88. package/templates/skills/knowledge/design-md/examples/DESIGN.md +0 -154
  89. package/templates/skills/knowledge/notebooklm-mcp/SKILL.md +0 -71
  90. package/templates/skills/knowledge/notebooklm-mcp/assets/example_asset.txt +0 -24
  91. package/templates/skills/knowledge/notebooklm-mcp/references/api_reference.md +0 -34
  92. package/templates/skills/knowledge/notebooklm-mcp/scripts/example.py +0 -19
  93. package/templates/skills/knowledge/react-components/README.md +0 -36
  94. package/templates/skills/knowledge/react-components/SKILL.md +0 -53
  95. package/templates/skills/knowledge/react-components/examples/gold-standard-card.tsx +0 -80
  96. package/templates/skills/knowledge/react-components/package-lock.json +0 -231
  97. package/templates/skills/knowledge/react-components/package.json +0 -16
  98. package/templates/skills/knowledge/react-components/resources/architecture-checklist.md +0 -15
  99. package/templates/skills/knowledge/react-components/resources/component-template.tsx +0 -37
  100. package/templates/skills/knowledge/react-components/resources/stitch-api-reference.md +0 -14
  101. package/templates/skills/knowledge/react-components/resources/style-guide.json +0 -27
  102. package/templates/skills/knowledge/react-components/scripts/fetch-stitch.sh +0 -30
  103. package/templates/skills/knowledge/react-components/scripts/validate.js +0 -68
  104. package/templates/skills/knowledge/self-update/SKILL.md +0 -60
  105. package/templates/skills/knowledge/self-update/scripts/update_kit.py +0 -103
  106. package/templates/skills/knowledge/stitch-loop/README.md +0 -54
  107. package/templates/skills/knowledge/stitch-loop/SKILL.md +0 -235
  108. package/templates/skills/knowledge/stitch-loop/examples/SITE.md +0 -73
  109. package/templates/skills/knowledge/stitch-loop/examples/next-prompt.md +0 -25
  110. package/templates/skills/knowledge/stitch-loop/resources/baton-schema.md +0 -61
  111. package/templates/skills/knowledge/stitch-loop/resources/site-template.md +0 -104
@@ -0,0 +1,484 @@
1
+ ---
2
+ name: jira
3
+ description: "Jira ticket management skill for creating, updating, and managing issues. Use for: (1) Creating new tickets/issues with custom fields, (2) Updating existing tickets (status, assignee, priority, labels), (3) Adding and updating comments, (4) Logging work time and time tracking, (5) Searching issues with JQL, (6) Managing transitions and workflows, (7) Bulk operations on multiple tickets, (8) Sprint and board management. Supports both MCP server integration and direct REST API calls. Requires JIRA_API_TOKEN and JIRA_URL environment variables."
4
+ ---
5
+
6
+ # Jira Skill
7
+
8
+ Comprehensive Jira ticket management for creating, updating, and managing issues with support for MCP server integration and direct REST API access.
9
+
10
+ > **Last Updated:** 2026-01-23
11
+
12
+ ---
13
+
14
+ ## Quick Start
15
+
16
+ ```bash
17
+ # Create a new ticket
18
+ python skills/jira/scripts/create_ticket.py \
19
+ --project "PROJ" \
20
+ --summary "Fix login bug" \
21
+ --type "Bug" \
22
+ --priority "High"
23
+
24
+ # Update an existing ticket
25
+ python skills/jira/scripts/update_ticket.py \
26
+ --ticket "PROJ-123" \
27
+ --status "In Progress" \
28
+ --assignee "john.doe"
29
+
30
+ # Add a comment
31
+ python skills/jira/scripts/add_comment.py \
32
+ --ticket "PROJ-123" \
33
+ --comment "Started working on this issue."
34
+
35
+ # Log work time
36
+ python skills/jira/scripts/log_work.py \
37
+ --ticket "PROJ-123" \
38
+ --time "2h 30m" \
39
+ --comment "Debugging session"
40
+
41
+ # Search tickets
42
+ python skills/jira/scripts/search_tickets.py \
43
+ --jql "project = PROJ AND status = 'In Progress'"
44
+ ```
45
+
46
+ ---
47
+
48
+ ## Prerequisites
49
+
50
+ ### Environment Variables
51
+
52
+ Configure these in your `.env` file (never commit credentials):
53
+
54
+ ```bash
55
+ # Required
56
+ JIRA_URL=https://your-domain.atlassian.net
57
+ JIRA_API_TOKEN=your-api-token-here
58
+ JIRA_EMAIL=your-email@example.com
59
+
60
+ # Optional
61
+ JIRA_DEFAULT_PROJECT=PROJ
62
+ JIRA_DEFAULT_ASSIGNEE=me
63
+ ```
64
+
65
+ ### API Token Generation
66
+
67
+ 1. Go to: https://id.atlassian.com/manage-profile/security/api-tokens
68
+ 2. Click "Create API token"
69
+ 3. Give it a label (e.g., "Agent Automation")
70
+ 4. Copy the token to your `.env` file
71
+
72
+ ---
73
+
74
+ ## Core Workflow
75
+
76
+ 1. **Authenticate** — Load credentials from environment
77
+ 2. **Execute Operation** — Create, update, comment, or search
78
+ 3. **Handle Response** — Parse results and handle errors
79
+ 4. **Return Structured Output** — JSON for automation, readable for display
80
+
81
+ ---
82
+
83
+ ## Scripts
84
+
85
+ ### `create_ticket.py` — Create New Issues
86
+
87
+ Create Jira tickets with full field support.
88
+
89
+ ```bash
90
+ python skills/jira/scripts/create_ticket.py \
91
+ --project <key> # Project key (required)
92
+ --summary <text> # Issue summary (required)
93
+ --type <type> # Issue type: Bug, Task, Story, Epic (default: Task)
94
+ --priority <level> # Priority: Highest, High, Medium, Low, Lowest
95
+ --description <text> # Description (supports markdown)
96
+ --assignee <user> # Assignee username or email
97
+ --labels <labels> # Comma-separated labels
98
+ --components <comps> # Comma-separated components
99
+ --epic <key> # Epic link (e.g., PROJ-100)
100
+ --sprint <id> # Sprint ID to add to
101
+ --custom-fields <json> # Custom fields as JSON
102
+ --output <format> # Output: json, key, url (default: json)
103
+ ```
104
+
105
+ **Examples:**
106
+
107
+ ```bash
108
+ # Simple bug report
109
+ python skills/jira/scripts/create_ticket.py \
110
+ --project PROJ \
111
+ --summary "Login page returns 500 error" \
112
+ --type Bug \
113
+ --priority High \
114
+ --labels "production,urgent"
115
+
116
+ # Story with description
117
+ python skills/jira/scripts/create_ticket.py \
118
+ --project PROJ \
119
+ --summary "Implement user dashboard" \
120
+ --type Story \
121
+ --description "As a user, I want to see my activity dashboard..." \
122
+ --assignee john.doe
123
+
124
+ # Task with custom fields
125
+ python skills/jira/scripts/create_ticket.py \
126
+ --project PROJ \
127
+ --summary "Database migration" \
128
+ --type Task \
129
+ --custom-fields '{"customfield_10001": "value"}'
130
+ ```
131
+
132
+ ### `update_ticket.py` — Update Existing Issues
133
+
134
+ Update any field on existing tickets.
135
+
136
+ ```bash
137
+ python skills/jira/scripts/update_ticket.py \
138
+ --ticket <key> # Ticket key (required, e.g., PROJ-123)
139
+ --status <status> # Transition to status
140
+ --assignee <user> # New assignee
141
+ --priority <level> # New priority
142
+ --summary <text> # Updated summary
143
+ --description <text> # Updated description
144
+ --labels <labels> # Replace labels (comma-separated)
145
+ --add-labels <labels> # Add labels
146
+ --remove-labels <labels> # Remove labels
147
+ --components <comps> # Replace components
148
+ --custom-fields <json> # Custom fields as JSON
149
+ ```
150
+
151
+ **Examples:**
152
+
153
+ ```bash
154
+ # Change status
155
+ python skills/jira/scripts/update_ticket.py \
156
+ --ticket PROJ-123 \
157
+ --status "In Progress"
158
+
159
+ # Reassign and change priority
160
+ python skills/jira/scripts/update_ticket.py \
161
+ --ticket PROJ-123 \
162
+ --assignee jane.doe \
163
+ --priority Critical
164
+
165
+ # Add labels
166
+ python skills/jira/scripts/update_ticket.py \
167
+ --ticket PROJ-123 \
168
+ --add-labels "reviewed,tested"
169
+ ```
170
+
171
+ ### `add_comment.py` — Add Comments
172
+
173
+ Add comments to existing tickets.
174
+
175
+ ```bash
176
+ python skills/jira/scripts/add_comment.py \
177
+ --ticket <key> # Ticket key (required)
178
+ --comment <text> # Comment text (required)
179
+ --visibility <group> # Restrict to group (optional)
180
+ --mention <users> # Mention users (comma-separated)
181
+ ```
182
+
183
+ **Examples:**
184
+
185
+ ```bash
186
+ # Simple comment
187
+ python skills/jira/scripts/add_comment.py \
188
+ --ticket PROJ-123 \
189
+ --comment "Investigation complete. Root cause identified."
190
+
191
+ # Comment with mentions
192
+ python skills/jira/scripts/add_comment.py \
193
+ --ticket PROJ-123 \
194
+ --comment "Ready for review" \
195
+ --mention "john.doe,jane.doe"
196
+
197
+ # Restricted comment
198
+ python skills/jira/scripts/add_comment.py \
199
+ --ticket PROJ-123 \
200
+ --comment "Internal note: security issue" \
201
+ --visibility "jira-developers"
202
+ ```
203
+
204
+ ### `update_comment.py` — Update Existing Comments
205
+
206
+ Edit previously added comments.
207
+
208
+ ```bash
209
+ python skills/jira/scripts/update_comment.py \
210
+ --ticket <key> # Ticket key (required)
211
+ --comment-id <id> # Comment ID (required)
212
+ --text <text> # New comment text (required)
213
+ ```
214
+
215
+ ### `log_work.py` — Time Tracking
216
+
217
+ Log work time against tickets.
218
+
219
+ ```bash
220
+ python skills/jira/scripts/log_work.py \
221
+ --ticket <key> # Ticket key (required)
222
+ --time <duration> # Time spent: "2h", "30m", "1d", "2h 30m"
223
+ --comment <text> # Work description (optional)
224
+ --started <datetime> # Start time ISO format (optional)
225
+ --remaining <duration> # Remaining estimate (optional)
226
+ ```
227
+
228
+ ### `bulk_log_work.py` — Automated Bulk Logging
229
+
230
+ Log work across a date range. Automatically skips weekends and European Commission holidays.
231
+
232
+ ```bash
233
+ python skills/jira/scripts/bulk_log_work.py \
234
+ --ticket <key> # Ticket key (required)
235
+ --start <YYYY-MM-DD> # Start date (required)
236
+ --end <YYYY-MM-DD> # End date (default: today)
237
+ --time <duration> # Time per day (e.g., "3h")
238
+ --comment <text> # Comment (use | to rotate multiple comments)
239
+ ```
240
+
241
+ **Example:**
242
+
243
+ ```bash
244
+ # Log 2h for every working day of the month with rotating comments
245
+ python skills/jira/scripts/bulk_log_work.py \
246
+ --ticket KASP-1241 \
247
+ --start 2026-01-01 \
248
+ --time 2h \
249
+ --comment "Infra check|Alerts check|Maintenance check"
250
+ ```
251
+
252
+ **Examples:**
253
+
254
+ ```bash
255
+ # Log 2 hours of work
256
+ python skills/jira/scripts/log_work.py \
257
+ --ticket PROJ-123 \
258
+ --time "2h" \
259
+ --comment "Implemented authentication module"
260
+
261
+ # Log with specific start time
262
+ python skills/jira/scripts/log_work.py \
263
+ --ticket PROJ-123 \
264
+ --time "4h" \
265
+ --started "2026-01-23T09:00:00" \
266
+ --comment "Morning coding session"
267
+
268
+ # Log and update remaining estimate
269
+ python skills/jira/scripts/log_work.py \
270
+ --ticket PROJ-123 \
271
+ --time "1d" \
272
+ --remaining "2d" \
273
+ --comment "Major refactoring complete"
274
+ ```
275
+
276
+ ### `search_tickets.py` — Search with JQL
277
+
278
+ Search and filter tickets using JQL.
279
+
280
+ ```bash
281
+ python skills/jira/scripts/search_tickets.py \
282
+ --jql <query> # JQL query (required)
283
+ --fields <fields> # Comma-separated fields to return
284
+ --max-results <n> # Maximum results (default: 50)
285
+ --output <format> # Output: json, table, keys (default: table)
286
+ ```
287
+
288
+ **Common JQL Examples:**
289
+
290
+ ```bash
291
+ # All open bugs in project
292
+ python skills/jira/scripts/search_tickets.py \
293
+ --jql "project = PROJ AND type = Bug AND status != Done"
294
+
295
+ # My assigned tickets
296
+ python skills/jira/scripts/search_tickets.py \
297
+ --jql "assignee = currentUser() AND status != Done"
298
+
299
+ # Recently updated
300
+ python skills/jira/scripts/search_tickets.py \
301
+ --jql "project = PROJ AND updated >= -7d ORDER BY updated DESC"
302
+
303
+ # High priority in current sprint
304
+ python skills/jira/scripts/search_tickets.py \
305
+ --jql "project = PROJ AND sprint in openSprints() AND priority = High"
306
+ ```
307
+
308
+ ### `get_ticket.py` — Get Ticket Details
309
+
310
+ Retrieve full details for a specific ticket.
311
+
312
+ ```bash
313
+ python skills/jira/scripts/get_ticket.py \
314
+ --ticket <key> # Ticket key (required)
315
+ --include-comments # Include comments (default: false)
316
+ --include-worklog # Include work logs (default: false)
317
+ --include-transitions # Show available transitions
318
+ --output <format> # Output: json, summary (default: summary)
319
+ ```
320
+
321
+ ---
322
+
323
+ ## MCP Integration
324
+
325
+ The skill supports the Jira MCP server for enhanced integration.
326
+
327
+ ### MCP Server Configuration
328
+
329
+ Add to your MCP settings (`~/.config/mcp/settings.json`):
330
+
331
+ ```json
332
+ {
333
+ "mcpServers": {
334
+ "jira": {
335
+ "command": "npx",
336
+ "args": ["-y", "@anthropic/mcp-server-jira"],
337
+ "env": {
338
+ "JIRA_URL": "${JIRA_URL}",
339
+ "JIRA_EMAIL": "${JIRA_EMAIL}",
340
+ "JIRA_API_TOKEN": "${JIRA_API_TOKEN}"
341
+ }
342
+ }
343
+ }
344
+ }
345
+ ```
346
+
347
+ ### MCP vs Direct API
348
+
349
+ | Feature | MCP Server | Direct API |
350
+ | ----------- | ------------------- | ---------------- |
351
+ | Setup | Requires MCP | Only env vars |
352
+ | Speed | Faster (persistent) | Per-request auth |
353
+ | Flexibility | Limited tools | Full API access |
354
+ | Best for | Common operations | Custom/bulk ops |
355
+
356
+ ---
357
+
358
+ ## Configuration
359
+
360
+ ### Default Settings
361
+
362
+ Create `~/.config/jira/defaults.json`:
363
+
364
+ ```json
365
+ {
366
+ "project": "PROJ",
367
+ "type": "Task",
368
+ "priority": "Medium",
369
+ "labels": ["automation"],
370
+ "assignee": "me"
371
+ }
372
+ ```
373
+
374
+ ### Field Mappings
375
+
376
+ Common custom field IDs (check your Jira instance):
377
+
378
+ | Field | Common ID |
379
+ | ------------ | ------------------- |
380
+ | Sprint | `customfield_10020` |
381
+ | Story Points | `customfield_10021` |
382
+ | Epic Link | `customfield_10014` |
383
+ | Team | `customfield_10001` |
384
+
385
+ ---
386
+
387
+ ## Common Workflows
388
+
389
+ ### 1. Bug Triage Workflow
390
+
391
+ ```bash
392
+ # Create bug
393
+ python skills/jira/scripts/create_ticket.py \
394
+ --project PROJ \
395
+ --type Bug \
396
+ --summary "Error in payment processing" \
397
+ --priority High \
398
+ --labels "triage"
399
+
400
+ # After investigation, update with findings
401
+ python skills/jira/scripts/add_comment.py \
402
+ --ticket PROJ-123 \
403
+ --comment "Root cause: null pointer in PaymentService.process()"
404
+
405
+ # Start work
406
+ python skills/jira/scripts/update_ticket.py \
407
+ --ticket PROJ-123 \
408
+ --status "In Progress" \
409
+ --assignee me
410
+
411
+ # Log work
412
+ python skills/jira/scripts/log_work.py \
413
+ --ticket PROJ-123 \
414
+ --time "3h" \
415
+ --comment "Fixed null check, added unit tests"
416
+
417
+ # Complete
418
+ python skills/jira/scripts/update_ticket.py \
419
+ --ticket PROJ-123 \
420
+ --status "Done" \
421
+ --add-labels "fixed"
422
+ ```
423
+
424
+ ### 2. Sprint Planning
425
+
426
+ ```bash
427
+ # Find unestimated stories
428
+ python skills/jira/scripts/search_tickets.py \
429
+ --jql "project = PROJ AND type = Story AND 'Story Points' is EMPTY AND sprint is EMPTY"
430
+
431
+ # Add story to sprint
432
+ python skills/jira/scripts/update_ticket.py \
433
+ --ticket PROJ-456 \
434
+ --custom-fields '{"customfield_10020": 15}' # Sprint ID
435
+ ```
436
+
437
+ ### 3. Daily Standup Report
438
+
439
+ ```bash
440
+ # What I worked on yesterday
441
+ python skills/jira/scripts/search_tickets.py \
442
+ --jql "assignee = currentUser() AND worklogDate >= -1d" \
443
+ --output table
444
+
445
+ # What I'm working on today
446
+ python skills/jira/scripts/search_tickets.py \
447
+ --jql "assignee = currentUser() AND status = 'In Progress'" \
448
+ --output table
449
+ ```
450
+
451
+ ---
452
+
453
+ ## Troubleshooting
454
+
455
+ | Issue | Cause | Solution |
456
+ | ---------------------- | ------------------- | -------------------------------------------- |
457
+ | **401 Unauthorized** | Invalid credentials | Check JIRA_API_TOKEN and JIRA_EMAIL |
458
+ | **403 Forbidden** | No permission | Verify account has project access |
459
+ | **404 Not Found** | Wrong ticket key | Verify ticket exists and key is correct |
460
+ | **Transition failed** | Invalid workflow | Use `--include-transitions` to see available |
461
+ | **Custom field error** | Wrong field ID | Check field IDs in Jira admin |
462
+
463
+ ---
464
+
465
+ ## Dependencies
466
+
467
+ ```bash
468
+ pip install requests python-dotenv
469
+ ```
470
+
471
+ ---
472
+
473
+ ## Related Skills
474
+
475
+ - **[gitlab](../gitlab/SKILL.md)** — Link Jira tickets to GitLab branches
476
+ - **[documentation](../documentation/SKILL.md)** — Generate ticket documentation
477
+
478
+ ---
479
+
480
+ ## External Resources
481
+
482
+ - [Jira REST API Documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/)
483
+ - [JQL Reference](https://support.atlassian.com/jira-software-cloud/docs/use-advanced-search-with-jql/)
484
+ - [Atlassian API Tokens](https://id.atlassian.com/manage-profile/security/api-tokens)
@@ -0,0 +1,148 @@
1
+ # Jira REST API Reference
2
+
3
+ Quick reference for common Jira REST API operations.
4
+
5
+ ---
6
+
7
+ ## JQL Query Examples
8
+
9
+ ### By Status
10
+
11
+ ```jql
12
+ # Open issues
13
+ status != Done AND status != Closed
14
+
15
+ # In Progress
16
+ status = "In Progress"
17
+
18
+ # Recently resolved
19
+ status changed to Done during (-7d, now())
20
+ ```
21
+
22
+ ### By Assignee
23
+
24
+ ```jql
25
+ # My issues
26
+ assignee = currentUser()
27
+
28
+ # Unassigned
29
+ assignee is EMPTY
30
+
31
+ # Specific user
32
+ assignee = "john.doe"
33
+ ```
34
+
35
+ ### By Project and Type
36
+
37
+ ```jql
38
+ # All bugs in project
39
+ project = PROJ AND type = Bug
40
+
41
+ # Stories in sprint
42
+ project = PROJ AND type = Story AND sprint in openSprints()
43
+
44
+ # Epic and its children
45
+ "Epic Link" = PROJ-100
46
+ ```
47
+
48
+ ### By Date
49
+
50
+ ```jql
51
+ # Created this week
52
+ created >= startOfWeek()
53
+
54
+ # Updated in last 7 days
55
+ updated >= -7d
56
+
57
+ # Due soon
58
+ duedate <= 7d AND duedate >= now()
59
+ ```
60
+
61
+ ### Combined Queries
62
+
63
+ ```jql
64
+ # My high-priority bugs
65
+ project = PROJ AND type = Bug AND assignee = currentUser() AND priority in (High, Highest)
66
+
67
+ # Unresolved blockers
68
+ project = PROJ AND priority = Blocker AND resolution is EMPTY
69
+
70
+ # Sprint scope
71
+ project = PROJ AND sprint in openSprints() AND status != Done ORDER BY priority DESC
72
+ ```
73
+
74
+ ---
75
+
76
+ ## Common Issue Types
77
+
78
+ | Type | Description |
79
+ | -------- | ------------------------ |
80
+ | Bug | Something isn't working |
81
+ | Task | A work item |
82
+ | Story | User story |
83
+ | Epic | Large feature/initiative |
84
+ | Sub-task | Part of another issue |
85
+
86
+ ---
87
+
88
+ ## Priority Levels
89
+
90
+ | Priority | When to Use |
91
+ | -------- | --------------------------------- |
92
+ | Highest | Critical blocker, production down |
93
+ | High | Important, affects users |
94
+ | Medium | Normal priority (default) |
95
+ | Low | Nice to have |
96
+ | Lowest | Cosmetic or minor |
97
+
98
+ ---
99
+
100
+ ## Status Transitions
101
+
102
+ Common workflow statuses:
103
+
104
+ ```
105
+ To Do → In Progress → In Review → Done
106
+ ```
107
+
108
+ Use `--include-transitions` flag to see available transitions for an issue.
109
+
110
+ ---
111
+
112
+ ## Time Format
113
+
114
+ Jira uses specific time format:
115
+
116
+ | Format | Meaning |
117
+ | -------- | --------------- |
118
+ | `30m` | 30 minutes |
119
+ | `2h` | 2 hours |
120
+ | `1d` | 1 day (8 hours) |
121
+ | `1w` | 1 week (5 days) |
122
+ | `2h 30m` | Combined |
123
+
124
+ ---
125
+
126
+ ## API Endpoints
127
+
128
+ | Operation | Endpoint |
129
+ | ------------ | ----------------------------------------- |
130
+ | Get issue | `GET /rest/api/2/issue/{key}` |
131
+ | Create issue | `POST /rest/api/2/issue` |
132
+ | Update issue | `PUT /rest/api/2/issue/{key}` |
133
+ | Add comment | `POST /rest/api/2/issue/{key}/comment` |
134
+ | Log work | `POST /rest/api/2/issue/{key}/worklog` |
135
+ | Search | `POST /rest/api/2/search` |
136
+ | Transitions | `GET /rest/api/2/issue/{key}/transitions` |
137
+
138
+ ---
139
+
140
+ ## Error Codes
141
+
142
+ | Code | Meaning |
143
+ | ---- | -------------------------- |
144
+ | 400 | Bad request (invalid data) |
145
+ | 401 | Unauthorized (check token) |
146
+ | 403 | Forbidden (no permission) |
147
+ | 404 | Issue not found |
148
+ | 429 | Rate limited |
@@ -0,0 +1,91 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Add Comment to Jira Ticket
4
+
5
+ Adds a comment to an existing Jira issue.
6
+
7
+ Usage:
8
+ python add_comment.py --ticket <key> --comment <text> [options]
9
+
10
+ Arguments:
11
+ --ticket Ticket key (required)
12
+ --comment Comment text (required)
13
+ --visibility Restrict to group (optional)
14
+ --mention Mention users (comma-separated)
15
+
16
+ Exit Codes:
17
+ 0 - Success
18
+ 1 - Invalid arguments
19
+ 2 - Ticket not found
20
+ 3 - Comment error
21
+ """
22
+
23
+ import argparse
24
+ import json
25
+ import sys
26
+ from pathlib import Path
27
+
28
+ sys.path.insert(0, str(Path(__file__).parent))
29
+ from jira_client import get_client
30
+
31
+
32
+ def main():
33
+ parser = argparse.ArgumentParser(
34
+ description='Add a comment to a Jira ticket',
35
+ formatter_class=argparse.RawDescriptionHelpFormatter,
36
+ epilog=__doc__
37
+ )
38
+ parser.add_argument('--ticket', required=True, help='Ticket key')
39
+ parser.add_argument('--comment', required=True, help='Comment text')
40
+ parser.add_argument('--visibility', help='Restrict to group')
41
+ parser.add_argument('--mention', help='Mention users (comma-separated)')
42
+ args = parser.parse_args()
43
+
44
+ client = get_client()
45
+ ticket = args.ticket.upper()
46
+
47
+ print(f"💬 Adding comment to {ticket}...", file=sys.stderr)
48
+
49
+ # Verify ticket exists
50
+ success, issue = client.get_issue(ticket)
51
+ if not success:
52
+ print(f"❌ Error: Could not find ticket {ticket}: {issue}", file=sys.stderr)
53
+ sys.exit(2)
54
+
55
+ # Build comment text with mentions
56
+ comment_text = args.comment
57
+ if args.mention:
58
+ mentions = [f"[~{u.strip()}]" for u in args.mention.split(',')]
59
+ comment_text = f"{' '.join(mentions)} {comment_text}"
60
+
61
+ # Build visibility if specified
62
+ visibility = None
63
+ if args.visibility:
64
+ visibility = {
65
+ 'type': 'group',
66
+ 'value': args.visibility
67
+ }
68
+
69
+ # Add comment
70
+ success, result = client.add_comment(ticket, comment_text, visibility)
71
+
72
+ if not success:
73
+ print(f"❌ Error adding comment: {result}", file=sys.stderr)
74
+ sys.exit(3)
75
+
76
+ comment_id = result.get('id', 'Unknown')
77
+
78
+ output = {
79
+ 'success': True,
80
+ 'ticket': ticket,
81
+ 'comment_id': comment_id,
82
+ 'url': f"{client.base_url}/browse/{ticket}?focusedCommentId={comment_id}"
83
+ }
84
+ print(json.dumps(output, indent=2))
85
+
86
+ print(f"✅ Comment added to {ticket}", file=sys.stderr)
87
+ sys.exit(0)
88
+
89
+
90
+ if __name__ == '__main__':
91
+ main()