Skill v1.0.3
currentAutomated scan100/10010 files
version: "1.0.3" name: project-jira description: Jira issue tracking and incident management. Use when creating, searching, or updating Jira issues. Supports JQL queries for incident ticket analysis and alert fatigue tracking. allowed-tools: Bash(python *)
Jira Integration
Authentication
IMPORTANT: In proxy/production mode, credentials are injected automatically by a proxy layer. Do NOT check for JIRA_API_TOKEN or JIRA_EMAIL in environment variables in that mode — they won't be visible to you. Just run the scripts directly; authentication is handled transparently.
In direct/local mode the scripts also support self-hosted Jira Data Center via a Personal Access Token (PAT). Set the following env vars (see .env.example for the full block):
- Cloud (atlassian.net):
JIRA_URL,JIRA_EMAIL,JIRA_API_TOKEN. LeaveJIRA_AUTH_SCHEME/JIRA_API_VERSIONunset → defaults to Basic auth + REST API v3 (ADF bodies). - Data Center (self-hosted):
JIRA_URL,JIRA_API_TOKEN,JIRA_AUTH_SCHEME=bearer,JIRA_API_VERSION=2. OmitJIRA_EMAIL. The token is sent asAuthorization: Bearer <token>and requests go to/rest/api/2.
Do not set JIRA_AUTH_SCHEME=bearer for Cloud — Cloud API tokens require Basic auth (email:token). Bearer is for Data Center PATs only.
Configuration environment variables you CAN check (non-secret):
JIRA_URL- Jira instance URL (e.g.,https://your-company.atlassian.netfor Cloud,https://jira.yourcorp.comfor Data Center)JIRA_API_VERSION-3(Cloud, default) or2(Data Center)JIRA_AUTH_SCHEME-bearerfor Data Center PAT auth; unset for Cloud Basic auth
Search endpoint note (Cloud vs Data Center)
Jira Cloud removed classic /rest/api/3/search (returns HTTP 410). search_issues.py / list_issues.py use POST /rest/api/3/search/jql when JIRA_API_VERSION is unset/3. Data Center (JIRA_API_VERSION=2) still uses GET /rest/api/2/search.
Body format note (v2 vs v3)
Write --description / --comment text as plain Markdown (headings, lists, tables, code fences, bold/italic, links). The scripts convert it automatically: Cloud (v3) gets a real Atlassian Document Format document with your formatting preserved; Data Center (v2) currently receives the text as-is, so for v2 you may write Jira Wiki Markup directly if you want rich formatting there.
Assignee format note (v2 vs v3)
The --assignee arg also adapts to the API version: Cloud (v3) expects the Atlassian accountId; Data Center (v2) expects the username (e.g. jane.doe). The scripts pick the right field key (accountId vs name) from JIRA_API_VERSION.
Available Scripts
All scripts are in .claude/skills/project-jira/scripts/
search_issues.py - Search with JQL
Powerful search using Jira Query Language. Best for finding incident tickets, patterns, action items.
python .claude/skills/project-jira/scripts/search_issues.py --jql "JQL_QUERY" [--max-results N]# Examples:python .claude/skills/project-jira/scripts/search_issues.py --jql "type = Bug AND status != Done AND created >= -7d"python .claude/skills/project-jira/scripts/search_issues.py --jql "labels = incident AND created >= -30d" --max-results 50
get_issue.py - Get Issue Details
python .claude/skills/project-jira/scripts/get_issue.py --issue-key PROJ-123
create_issue.py - Create New Issue
python .claude/skills/project-jira/scripts/create_issue.py --project PROJ --summary "Title" --description "Details" [--type Bug] [--priority High] [--labels "incident,p1"] [--fields '{"customfield_12345": {"value": "Yes"}}']
--fields accepts a JSON object merged into the create payload (after built-in fields) for required project custom fields. Use --description for the issue body; do not put description in --fields (the script appends the OpenSRE link there).
Troubleshooting: HTTP 400 on create usually means the project requires extra fields. Query GET /rest/api/2/issue/createmeta or /rest/api/3/issue/createmeta (with projectKeys / expand=projects.issuetypes.fields) to find required fields, then pass them via --fields instead of calling the REST API directly.
OpenSRE investigation tickets
When creating an issue from an OpenSRE investigation (any channel), put this in --description as Markdown:
- What was already discussed
- Likely causes and what was ruled out
- Evidence (errors, env, jobs, dashboards, log lines)
Do not invent or paste an OpenSRE dashboard URL. create_issue.py appends [View in OpenSRE](...) when WEB_UI_PUBLIC_BASE_URL and this thread's run id are available.
update_issue.py - Update Existing Issue
python .claude/skills/project-jira/scripts/update_issue.py --issue-key PROJ-123 [--summary "New title"] [--status "In Progress"] [--priority High]
add_comment.py - Add Comment
python .claude/skills/project-jira/scripts/add_comment.py --issue-key PROJ-123 --comment "Investigation findings..."
list_issues.py - List Project Issues
python .claude/skills/project-jira/scripts/list_issues.py --project PROJ [--max-results 20]
JQL Quick Reference
Common Patterns
# Recent bugstype = Bug AND created >= -7d ORDER BY created DESC# Open incidentstype = Incident AND status != Done# By labellabels IN ("incident", "p1", "alert-tuning")# Text searchsummary ~ "high CPU" OR description ~ "timeout"# Stale issuesupdated <= -90d AND status != Done
Operators
| Operator | Meaning | Example | |
|---|---|---|---|
| = | Equals | status = Done | |
| != | Not equals | status != Done | |
| ~ | Contains text | summary ~ "error" | |
| IN | In list | status IN ("Open", "In Progress") | |
| >= | Greater/equal | created >= -7d | |
| ORDER BY | Sort | ORDER BY created DESC |
Investigation Workflow
Incident Ticket Analysis
1. Search for related incidents:search_issues.py --jql "type = Incident AND created >= -30d"2. Get details of specific incident:get_issue.py --issue-key INC-4563. Add investigation findings:add_comment.py --issue-key INC-456 --comment "Root cause: ..."4. Update status:update_issue.py --issue-key INC-456 --status "Resolved"