Use when the user mentions Jira issues (e.g., "PROJ-123"), asks about tickets, wants to create/view/update issues, check sprint status, or manage their Jira wor
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-jira-f31fc4147196 ,按照其中的说明把「jira」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Natural language interaction with Jira. Supports multiple backends.
Run this check first to determine which backend to use:
1. Check if jira CLI is available:
→ Run: which jira
→ If found: USE CLI BACKEND
2. If no CLI, check for Atlassian MCP:
→ Look for mcp__atlassian__* tools
→ If available: USE MCP BACKEND
3. If neither available:
→ GUIDE USER TO SETUP
| Backend | When to Use | Reference |
|---|---|---|
| CLI | jira command available | references/commands.md |
| MCP | Atlassian MCP tools available | references/mcp.md |
| None | Neither available | Guide to install CLI |
Skip this section if using MCP backend.
| Intent | Command |
|---|---|
| View issue | jira issue view ISSUE-KEY |
| List my issues | jira issue list -a$(jira me) |
| My in-progress | jira issue list -a$(jira me) -s"In Progress" |
| Create issue | jira issue create -tType -s"Summary" -b"Description" |
| Move/transition | jira issue move ISSUE-KEY "State" |
| Assign to me | jira issue assign ISSUE-KEY $(jira me) |
| Unassign | jira issue assign ISSUE-KEY x |
| Add comment | jira issue comment add ISSUE-KEY -b"Comment text" |
| Open in browser | jira open ISSUE-KEY |
| Current sprint | jira sprint list --state active |
| Who am I | jira me |
Skip this section if using CLI backend.
| Intent | MCP Tool |
|---|---|
| Search issues | mcp__atlassian__searchJiraIssuesUsingJql |
| View issue | mcp__atlassian__getJiraIssue |
| Create issue | mcp__atlassian__createJiraIssue |
| Update issue | mcp__atlassian__editJiraIssue |
| Get transitions | mcp__atlassian__getTransitionsForJiraIssue |
| Transition | mcp__atlassian__transitionJiraIssue |
| Add comment | mcp__atlassian__addCommentToJiraIssue |
| User lookup | mcp__atlassian__lookupJiraAccountId |
| List projects | mcp__atlassian__getVisibleJiraProjects |
See references/mcp.md for full MCP patterns.
Issue keys follow the pattern: [A-Z]+-[0-9]+ (e.g., PROJ-123, ABC-1).
When a user mentions an issue key in conversation:
jira issue view KEY or jira open KEYmcp__atlassian__jira_get_issue with the keyCreating tickets:
Updating tickets:
Ask yourself:
What's the current state? — Always fetch the issue first. Don't assume status, assignee, or fields are what user thinks they are.
Who else is affected? — Check watchers, linked issues, parent epics. A "simple edit" might notify 10 people.
Is this reversible? — Transitions may have one-way gates. Some workflows require intermediate states. Description edits have no undo.
Do I have the right identifiers? — Issue keys, transition IDs, account IDs. Display names don't work for assignment (MCP).
NEVER transition without fetching current status — Workflows may require intermediate states. "To Do" → "Done" might fail silently if "In Progress" is required first.
NEVER assign using display name (MCP) — Only account IDs work. Always call lookupJiraAccountId first, or assignment silently fails.
NEVER edit description without showing original — Jira has no undo. User must see what they're replacing.
NEVER use --no-input without all required fields (CLI) — Fails silently with cryptic errors. Check project's required fields first.
NEVER assume transition names are universal — "Done", "Closed", "Complete" vary by project. Always get available transitions first.
NEVER bulk-modify without explicit approval — Each ticket change notifies watchers. 10 edits = 10 notification storms.
If neither CLI nor MCP is available, guide the user:
To use Jira, you need one of:
1. **jira CLI** (recommended):
https://github.com/ankitpokhrel/jira-cli
Install: brew install ankitpokhrel/jira-cli/jira-cli
Setup: jira init
2. **Atlassian MCP**:
Configure in your MCP settings with Atlassian credentials.
LOAD reference when:
Do NOT load reference for:
jira issue view KEY)| Task | Load Reference? |
|---|---|
| View single issue | No |
| List my tickets | No |
| Create with description | Yes — CLI needs /tmp pattern |
| Transition issue | Yes — need transition ID workflow |
| JQL search | Yes — for complex queries |
| Link issues | Yes — MCP limitation, need script |
References:
references/commands.mdreferences/mcp.md