From odh-ai-helpers
Searches Jira tickets via JQL queries with templates for common workflows like open tickets, team backlog, recent updates, and status/type filtering.
How this skill is triggered — by the user, by Claude, or both
Slash command
/odh-ai-helpers:jira-workitem-searchThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Search for Jira tickets using JQL (Jira Query Language) queries with the `acli` CLI.
Search for Jira tickets using JQL (Jira Query Language) queries with the acli CLI.
acli must be installed and authenticated (acli jira auth)Before proceeding, verify that acli is installed and authenticated by invoking the acli-setup-check skill:
/acli-setup-check
If the setup check fails, stop execution and guide the user to fix the issue.
Before substituting user-provided values into JQL templates, validate and sanitize the inputs:
[A-Z]+ (e.g., AIPCC, RHOAIENG).[A-Z]+-[0-9]+ (e.g., AIPCC-1234).-<N>d is a positive integer.If validation fails, prompt the user with a clear error message explaining the expected format.
Replace placeholders like <PROJECT>, <STATUS>, <COMPONENT> with actual values from the user's request or conversation context.
My open tickets:
assignee = currentUser() AND resolution = Unresolved ORDER BY updated DESC
Team backlog for a project:
project = <PROJECT> AND status != Done ORDER BY priority DESC, updated DESC
Example: project = AIPCC AND status != Done ORDER BY priority DESC, updated DESC
Recent updates in a project (last N days):
project = <PROJECT> AND updatedDate >= -<N>d ORDER BY updated DESC
Example: project = RHOAIENG AND updatedDate >= -7d ORDER BY updated DESC
Tickets by status:
project = <PROJECT> AND status = "<STATUS>" ORDER BY updated DESC
Example: project = AIPCC AND status = "In Progress" ORDER BY updated DESC
Tickets by type (single):
project = <PROJECT> AND type = <TYPE> ORDER BY updated DESC
Example: project = AIPCC AND type = Feature ORDER BY updated DESC
Tickets by type (multiple):
project = <PROJECT> AND type IN (<TYPE1>, <TYPE2>, ...) ORDER BY updated DESC
Example: project = AIPCC AND type IN (Feature, Initiative) ORDER BY updated DESC
Blocked tickets:
project = <PROJECT> AND status = Blocked ORDER BY priority DESC
Tickets due soon (next 7 days):
project = <PROJECT> AND dueDate >= now() AND dueDate <= endOfWeek() AND resolution = Unresolved ORDER BY dueDate ASC
Tickets by component:
project = <PROJECT> AND component = "<COMPONENT>" ORDER BY priority DESC
Example: project = AIPCC AND component = "Wheel Package Index" ORDER BY priority DESC
Epics and their children:
project = <PROJECT> AND type = Epic ORDER BY created DESC
Unassigned tickets:
project = <PROJECT> AND assignee is EMPTY AND resolution = Unresolved ORDER BY priority DESC
Tickets mentioned in conversation: Search conversation history for ticket keys, then query:
key IN (<KEY1>, <KEY2>, ...) ORDER BY updated DESC
Example: key IN (AIPCC-1234, AIPCC-5678, RHOAIENG-910) ORDER BY updated DESC
Tips for extracting values:
project = AIPCCstatus = "In Progress"updatedDate >= -7dcomponent = "Wheel Package Index"type = Featuretype IN (Feature, Initiative)Build the JQL query from validated inputs and execute the search:
# Validate and sanitize inputs extracted from user request
PROJECT="<project-from-step-2>"
if [[ ! "$PROJECT" =~ ^[A-Z]+$ ]]; then
echo "Error: Invalid project key format. Expected uppercase letters only (e.g., AIPCC, RHOAIENG)"
exit 1
fi
# For status values with spaces, add quotes
STATUS="<status-from-step-2>"
if [[ "$STATUS" == *" "* ]]; then
STATUS="\"$STATUS\""
fi
# Build JQL query using validated variables
JQL_QUERY="project = $PROJECT AND status = $STATUS ORDER BY updated DESC"
# Execute search with validated JQL query
acli jira workitem search \
--jql "$JQL_QUERY" \
--fields key,summary,status,assignee,updated,priority \
--limit 50 \
--json
Note: The example above shows validation for a simple project + status query. Adapt the validation pattern based on the actual JQL template used (see Step 2 templates). Always validate inputs against expected patterns before building JQL.
Field Options:
key: Issue key (always include)summary: Issue title (always include)status: Current status (always include)assignee: Assignee name (recommended)updated: Last update date (recommended)priority: Priority level (optional)created: Creation date (optional)duedate: Due date (optional)labels: Labels (optional)components: Components (optional)Pagination:
--limit N to control number of results (default: 50, max: 100)--paginate to fetch all results across multiple pagesParse the JSON output and format as a table:
Found 15 tickets matching: project = AIPCC AND status = "In Progress"
KEY STATUS ASSIGNEE UPDATED SUMMARY
─────────────────────────────────────────────────────────────────────
AIPCC-1234 In Progress code-samurai 2024-03-20 Fix duplicate CI runs
AIPCC-5678 In Progress super-picky-reviewer 2024-03-19 Add wheel signing support
AIPCC-910 In Progress Unassigned 2024-03-18 Update documentation
...
For smaller result sets (< 10 tickets), show more detail:
=== 3 tickets found ===
1. AIPCC-1234: Fix duplicate CI pipeline runs
Status: In Progress → Code Review
Assignee: code-samurai
Priority: High
Updated: 2024-03-20
https://redhat.atlassian.net/browse/AIPCC-1234
2. AIPCC-5678: Add wheel signing support
Status: In Progress
Assignee: super-picky-reviewer
Priority: Medium
Updated: 2024-03-19
https://redhat.atlassian.net/browse/AIPCC-5678
3. AIPCC-910: Update documentation for new API
Status: In Progress
Assignee: Unassigned
Priority: Low
Updated: 2024-03-18
https://redhat.atlassian.net/browse/AIPCC-910
After displaying results, offer to:
jira-workitem-view skillCSV Export:
# Use the same validated JQL_QUERY from Step 3
TEMP_CSV=$(mktemp -t jira-search-results.XXXXXX.csv)
acli jira workitem search \
--jql "$JQL_QUERY" \
--fields key,summary,status,assignee,updated,priority \
--csv > "$TEMP_CSV"
echo "Results exported to: $TEMP_CSV"
Extract the list of ticket keys from results and store them for potential bulk operations:
Ticket keys: AIPCC-1234, AIPCC-5678, AIPCC-910
Use these keys with other skills for bulk operations.
project = AIPCC
AND status IN ("To Do", "In Progress")
AND assignee = currentUser()
AND priority IN (High, Highest)
ORDER BY priority DESC, updated DESC
currentUser(): Current authenticated usernow(): Current date/timestartOfWeek(), endOfWeek(): Week boundariesstartOfMonth(), endOfMonth(): Month boundariesproject = AIPCC AND text ~ "wheel building" ORDER BY updated DESC
For AIPCC-specific fields:
project = AIPCC AND "Color Status" = Red ORDER BY updated DESC
acli-setup-check skillacli-setup-check skillUser: /jira-workitem-search Show my open tickets
Assistant: [Searches with: assignee = currentUser() AND resolution = Unresolved]
Found 5 open tickets assigned to you:
[Displays results in table format]
User: What's in the AIPCC backlog?
Assistant: [Searches with: project = AIPCC AND status != Done]
Found 47 tickets in the AIPCC backlog
[Displays results with pagination]
User: What tickets were updated in the last week?
Assistant: [Searches with: updatedDate >= -7d]
Found 23 tickets updated in the last 7 days
[Displays results ordered by update time]
User: Export all AIPCC bugs to CSV
Assistant: [Searches and exports]
Exported 156 tickets to /tmp/jira-search-results.csv
User: /jira-workitem-search project = AIPCC AND status = "In Progress"
Assistant: [Shows 15 results]
User: Only show high priority ones
Assistant: [Refines to: project = AIPCC AND status = "In Progress" AND priority = High]
Found 3 high-priority tickets in progress
[Displays refined results]
npx claudepluginhub ikredhat/skills-registry --plugin odh-ai-helpersReferences Atlassian CLI (acli) commands for Jira: authenticate, create/view/edit issues, JQL searches, bulk operations, project/board/sprint management.
Searches Jira Cloud for issues by assignee/status/label/project/type/component/reporter/parent or free text. Composes safe JQL from structured flags and renders summary tables with pagination.