jira-ticket-prioritizer
Original:🇺🇸 English
Translated
1 scriptsChecked / no sensitive code detected
Analyze JIRA tickets to determine priority and dependency order. Outputs an ordered JIRA ID list. Use before implement/forge, or when asked to "prioritize tickets", "order these JIRAs", "what should I work on first".
3installs
Sourcedelexw/claude-code-misc
Added on
NPX Install
npx skill4agent add delexw/claude-code-misc jira-ticket-prioritizerTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →JIRA Ticket Prioritizer
Analyze a set of JIRA tickets to determine optimal execution order based on dependencies and priority. Produces an ordered list usable standalone or as a pre-step before /.
implementforgeArguments
- — Comma-separated ticket keys (e.g.
$ARGUMENTS[0]) OR a JQL query (detected by presence ofEC-100,EC-101,EC-102,=,AND)OR - — (optional) Additional context for prioritization (e.g. "focus on backend", "frontend first")
$ARGUMENTS[1]
System Requirements
- CLI installed and configured (https://github.com/ankitpokhrel/jira-cli)
jira - Environment variable set with a valid Jira API token. Important: When checking this variable, verify at least 2 times before concluding it is not set. Never expose the value — use existence checks only.
JIRA_API_TOKEN
Execution
Step 1 — Parse Input
- Check if contains
$ARGUMENTS[0],=, orAND(case-insensitive) to detect JQLOR - If JQL detected: run to resolve to ticket keys
jira issue list --jql "$ARGUMENTS[0]" --plain --columns key --no-headers - If comma-separated: split on and trim whitespace
, - Validate each key matches
[A-Z]+-\d+ - If fewer than 2 valid tickets, report the single ticket and exit
Step 2 — Fetch All Tickets
- Create temp directory:
mkdir -p .jira-ticket-prioritizer-tmp/tickets - For each ticket key, fetch via jira CLI:
jira issue view {KEY} --raw > .jira-ticket-prioritizer-tmp/tickets/{KEY}.json - Parse each ticket using the jira-ticket-viewer parse script:
node ../jira-ticket-viewer/scripts/parse-ticket.js < .jira-ticket-prioritizer-tmp/tickets/{KEY}.json > .jira-ticket-prioritizer-tmp/tickets/{KEY}-parsed.json - Collect all parsed outputs into a single JSON array and write to
.jira-ticket-prioritizer-tmp/all-tickets.json
Step 3 — Build Dependency Graph
- Run:
node ./scripts/build-dependency-graph.js < .jira-ticket-prioritizer-tmp/all-tickets.json > .jira-ticket-prioritizer-tmp/graph.json - Review graph output for cycles or warnings
- See references/dependency-analysis.md for relationship mapping rules
Step 4 — Semantic Dependency Analysis
- For tickets flagged with links or no explicit links in the graph output, analyze their
"relates to",description, andsummaryfor implicit dependenciescommentSummary - Look for:
- References to other ticket keys in the input set
- Shared component or module mentions
- Functional ordering hints ("builds on", "requires", "after", "depends on")
- Add soft edges with confidence levels (high/medium/low) to the graph
- Re-run topological sort if new edges were added:
- Update with additional
all-tickets.jsonand re-runsoftEdgesbuild-dependency-graph.js
- Update
Step 5 — Priority Scoring
- For tickets at the same dependency layer, score using weights from references/priority-weights.md
- Skip tickets with status "Done" — list them as excluded in the report
- Sort within each layer by descending score
- Apply context as a tiebreaker or boost (e.g. "focus on backend" boosts tickets with backend labels/components)
$ARGUMENTS[1]
Step 6 — Generate Output
- Write — full details including scores, justifications, dependency graph, excluded tickets, and warnings (see references/output-format.md for schema)
.jira-ticket-prioritizer-tmp/detailed-report.json - Write — ticket keys grouped by dependency layer (array of arrays), sorted by priority score within each layer
.jira-ticket-prioritizer-tmp/output.json - Present only (the simple sorted array) to the user. The detailed report is saved for reference but not displayed.
output.json
Reference Files
| Name | When to Read |
|---|---|
| references/priority-weights.md | Step 5 — scoring rules and factor weights |
| references/output-format.md | Step 6 — report template and JSON schema |
| references/dependency-analysis.md | Steps 3-4 — dependency detection rules |