Jira Tasks
Query and search Jira issues using the bundled main.py script. This skill is currently READ-ONLY.
EXECUTION PROTOCOL
1. Authentication & Secret Resolution
- The bundled script
scripts/main.pyautomatically resolvesJIRA_URL,JIRA_USER,JIRA_API_TOKEN, andJIRA_PROJECTusingDF_SECRET_GET_CMDor existing environment variables. - You do not need to provide these credentials manually.
- If the script fails due to missing credentials (e.g., "Error: Jira URL is required."), inform the user and stop.
2. Information Gathering
- IF the user's request is vague (e.g., "find the login bugs"), THEN:
- Use
scripts/main.py fieldsto find relevant field names if searching custom fields. - Construct a broad JQL search to find candidate issues.
- Use
- IF specific ticket keys are mentioned, THEN use
scripts/main.py issuesto fetch full details. - Reporting & History: When asked for "how long" a ticket has been in a status, or to perform any "Aging" or "Metrics" report, ALWAYS include
--expand changelogin theissuesorjqlcommand to fetch the transition history.
3. Command Selection & Execution
JQL Search
Use jql for finding issues based on criteria.
python3 scripts/main.py jql "project = PROJ AND status = 'In Progress' ORDER BY updated DESC" --max-results 10
Pagination & Extra Parameters
When a jql search returns "isLast": false, a "nextPageToken" will be included in the response. You MUST use this token via the --param flag to fetch the next page of results. DO NOT use startAt for pagination.
# Example: Fetching the next page
python3 scripts/main.py jql "project = PROJ" --max-results 10 --param nextPageToken=YOUR_TOKEN_HERE
The --param key=value option can also be used to inject any other arbitrary parameters into the JSON payload of the API request.
Fetch Specific Issues
Use issues for deep-dives into known tickets.
python3 scripts/main.py issues PROJ-123 PROJ-456 --fields "summary,status,description,assignee,priority,comment"
Advanced History & Metrics
To perform analysis on status aging, lead time, or history, include the --expand changelog flag. This works with both jql and issues subcommands.
# Fetch history for specific issues
python3 scripts/main.py issues PROJ-123 --expand changelog
# Fetch history for all issues matching a search
python3 scripts/main.py jql "project = PROJ AND status = Blocked" --expand changelog
When this flag is used, the script provides a metrics object for each issue containing:
time_in_status_seconds: Total work seconds (excluding weekends) spent in each status.time_in_category_seconds: Total work seconds spent in each generic Jira category (To Do,In Progress,Done).current_status_duration_seconds: Time spent in the current status.transition_count: Number of times the status has changed.work_day_seconds: The duration of a single work day used for calculations (default 30600s / 8.5h).
List/Filter Fields
Use fields to discover field IDs (e.g., finding the ID for "Story Points").
python3 scripts/main.py fields "Story Points"
Schema & Metadata Discovery
Use these subcommands to understand the Jira instance structure.
- Statuses:
python3 scripts/main.py statuses(Returns map of ID -> {name, category}) - Issue Types:
python3 scripts/main.py types(Returns map of ID -> {name, subtask}) - Priorities:
python3 scripts/main.py priorities - Resolutions:
python3 scripts/main.py resolutions - Projects:
python3 scripts/main.py projects - Users:
python3 scripts/main.py users "John Doe"(Search for users by name or email)
Direct API Call (Escape Hatch)
Use call for any endpoint not covered by specific subcommands.
# Example: Fetch transitions for a specific issue
python3 scripts/main.py call GET "/rest/api/3/issue/PROJ-123/transitions"
4. REPORTING RECIPES
When asked to generate reports, use the following "Discover -> Fetch -> Synthesize" patterns. Do NOT assume status names; use metadata to map the project's specific dialect.
A. Queue Aging & Bottleneck Report
Goal: Identify work stuck in "handover" states (e.g., waiting for QA, Review, or UAT).
- Discover: Run
python3 scripts/main.py statusesto identify which statuses map tostatusCategory: In Progressbut represent "Passive/Waiting" states in this project. - Fetch: Run
jqlwith--expand changelogfor all non-Done tickets. - Synthesize: Use
metrics.current_status_duration_formattedto list tickets in those passive states, sorted by the longest duration.
B. The "Blocker Pulse"
Goal: Identify why work is stopped and for how long.
- Discover: Use
statusesto find the exact name for "Blocked" or "On Hold". - Fetch: Run
jqlfor those statuses with--expand changelog. - Synthesize: Create a table with
Key|Assignee|Days Blocked (metrics.current_status_duration_formatted)|Latest Comment. Use themetrics.rework_countto flag if this is a recurring block.
C. Developer Workload & Flow
Goal: Assess team capacity and individual "churn."
- Discover: Use
fieldsto find the ID for estimation (e.g., "Story Points"). - Fetch: Run
jqlforstatusCategory = "In Progress"with--expand changelog. - Synthesize: Group by
assignee. CalculateTotal Points,Active Tickets, andAvg. Rework Rate (metrics.rework_count). High rework + low throughput suggests a person is stuck in a feedback loop.
D. Epic Health & Progress
Goal: High-level status of a large initiative.
- Fetch: Run
jqlfor child issues (parent = EPIC-KEY) with--expand changelog. - Synthesize: Calculate
% Completebased onDonestatus category. Usemetrics.lead_time_formattedof completed children to estimate the "velocity" of this Epic. Flag if any children have highrework_count.
E. Quality & Rework Audit
Goal: Identify "Ping-Ponging" and process instability.
- Fetch: Run
jqlfor recently updated issues with--expand changelog. - Synthesize: Highlight tickets where
metrics.rework_count > 1. Look atmetrics.status_visit_countsto see exactly which status is being re-entered (e.g., if "In Progress" visit count > 1, it was sent back from a later stage).
F. Individual Developer Deep-Dive
Goal: Detailed view of a developer's focus, handover, and impediments.
- Discover: Identify all non-Done statuses and their categories.
- Fetch: Run
jqlforassignee = "DEVELOPER_NAME" AND statusCategory != Donewith--expand changelog. - Synthesize: Group the developer's work into three zones:
- Active: Tickets in
In Progresscategories. Usemetrics.current_status_duration_formattedto show how long they've been on it. - Handover: Tickets in
In Progresscategory but "Passive" (e.g., In QA, Peer Review). - Impediments: Tickets in
BlockedorOn Holdstatuses.
- Active: Tickets in
- Blocker Analysis: For any Impediment, check:
- Who blocked it? Check
changelogfor the user who moved it to the Blocked status. - Why is it blocked? Extract the most recent comment from the developer (or others) that justifies the block.
- Rework? Flag if
metrics.rework_count > 0to see if they've been here before.
- Who blocked it? Check
5. Data Synthesis
- Templates: For common reports (Developer Deep-Dive, Daily Report), use the predefined structures found in
./templates/reports.md. - Present search results in a scannable markdown table.
- For single issues, provide a structured summary of status, assignee, and recent activity.
- Use status categories (To Do, In Progress, Done) to group and summarize work status.
- MUST NOT include raw JSON in the final response to the user; format it as clean markdown.
CONSTRAINTS
- READ-ONLY: MUST NOT attempt to create, edit, or delete Jira issues.
- Quoting: ALWAYS quote JQL queries to prevent shell parsing errors.
- Max Results: Default to
--max-results 10for general searches to save context; increase only if requested.
COMMON JQL PATTERNS
- By Assignee:
assignee = currentUser()orassignee = "email@example.com" - By Status:
status in ("To Do", "In Progress") - Text Search:
text ~ "search term" - Project + Type:
project = "PROJ" AND issuetype = "Bug"
VALIDATION CHECKLIST
- [ ] JQL query is valid, properly quoted, and escapes necessary characters.
- [ ]
--max-resultsis explicitly limited (default 10) to avoid context overflow. - [ ] If
isLast: falseis returned, pagination is handled vianextPageTokenor the user is informed that more results exist. - [ ] No modification commands (POST/PUT/DELETE) are attempted via the
callescape hatch. - [ ] If searching custom fields, the
fieldssubcommand was used to discover the correct field ID. - [ ] Results are synthesized into readable markdown, not raw JSON.