Jira
Natural language interaction with Jira using the jira CLI.
Required CLI
This skill only supports the jira CLI.
Run this check first:
which jira
- If
jira is available, use the CLI commands below.
- If
jira is not available, stop and tell the user the CLI is required.
- Do not install the CLI, run package-manager commands, or run
jira init unless the user explicitly asks you to perform setup.
When CLI Is Missing
If which jira fails:
- Explain that this skill requires the local
jira CLI.
- Provide setup instructions for the user to run themselves.
- Ask the user to install/configure it and then retry.
- Only run installation or setup commands if the user explicitly asks you to do so.
Suggested user-run setup:
brew install ankitpokhrel/jira-cli/jira-cli
jira init
jira me
Project: https://github.com/ankitpokhrel/jira-cli
Quick Reference
| 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" |
| Create issue under epic |
jira issue create -tStory -pPROJ --parent EPIC-KEY -s"Summary" -b"Description" |
| Move/transition |
jira issue move ISSUE-KEY "State" |
| Assign to me |
jira issue assign ISSUE-KEY $(jira me) |
| Assign to someone |
jira issue assign ISSUE-KEY "user@example.com" |
| 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 |
Triggers
- "create a jira ticket"
- "show me PROJ-123"
- "list my tickets"
- "move ticket to done"
- "what's in the current sprint"
Issue Key Detection
Issue keys follow the pattern: [A-Z]+-[0-9]+ (e.g., PROJ-123, ABC-1).
When a user mentions an issue key in conversation, use:
jira issue view KEY
or, if the user wants to open it in a browser:
jira open KEY
Workflow
Creating tickets:
- Research context if user references code/tickets/PRs.
- Check project requirements when needed.
- Draft ticket content.
- Review with user.
- Create with
jira issue create.
- Verify the created issue.
Body markup and the create vs edit quirk:
- Some Jira instances (Server / Data Center) render wiki markup, not
Markdown. On those, write descriptions in wiki markup (
h2. headings,
* bullets, # numbered lists, {{...}} monospace, {code}{code}
blocks).
jira issue create converts a Markdown -b body to the instance format,
but jira issue edit sends the body raw. So a body that rendered fine
on create can break on a later edit. Pass already-final wiki markup to
edit on wiki-markup instances.
- Do not pass wiki markup to
jira issue create -b on a wiki-markup
instance: the Markdown conversion mangles it. Observed damage: the blank
line between a heading and the list under it is dropped, gluing the first
list item onto the heading (h2. Done when* first item), and special
characters get backslash-escaped (nba2\-core, hashed\_password,
\(...\)). Headings survive only because h2. is not Markdown.
- Recommended pattern on wiki-markup instances: create with a minimal body,
then
jira issue edit -b the final wiki markup (edit sends it raw, so it
stores verbatim), and verify with jira issue view KEY --raw.
Alternatively, write the create body in real Markdown and let the
converter produce the wiki markup.
Epic / parent handling:
- If the user mentions an epic, parent epic, parent issue, or asks for a Story/Task to be under an epic, use
--parent EPIC-KEY when creating the issue.
- Do not use
--custom fields for Epic Link. With jira CLI, epic placement is done with --parent.
- On non-cloud Jira (Server / Data Center, classic projects), the Epic Link of an existing issue is stored in an instance-specific
customfield_*, not in fields.parent. When inspecting raw issue JSON to find which epic an issue belongs to, scan the customfield_* entries rather than assuming fields.parent is populated. The specific field id varies by instance, so detect it per ticket instead of hardcoding.
Updating tickets:
- Fetch issue details first with
jira issue view ISSUE-KEY.
- Check status, assignee, linked issues, and relevant fields.
- Show current vs proposed changes.
- Get approval before updating.
- Apply the CLI command.
- Verify the updated issue.
- Add a comment explaining significant changes when appropriate.
Before Any Operation
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, and sprint context when relevant. A "simple edit" might notify many 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? Verify issue keys, transition names, project keys, users, and sprint IDs before acting.
NEVER
NEVER transition without fetching current status first. Workflows may require intermediate states. "To Do" -> "Done" might fail if "In Progress" is required first.
NEVER edit description without showing original content or a clear summary of what will change. Jira has no undo.
NEVER use --no-input without all required fields. It can fail with cryptic errors. Check the project's required fields first.
NEVER use --custom to set Epic Link when creating issues. Use --parent EPIC-KEY instead.
NEVER assume transition names are universal. "Done", "Closed", and "Complete" vary by project. If unsure, inspect the issue or use interactive/browser flow.
NEVER bulk-modify without explicit approval. Each ticket change can notify watchers.
NEVER install, upgrade, or configure the jira CLI unless the user explicitly asks you to perform setup. If the CLI is missing, provide instructions for the user to run.
Safety
- Always show the CLI command before running it.
- Always get approval before modifying tickets.
- Preserve original information when editing.
- Verify updates after applying.
- Surface authentication and permission issues clearly so the user can resolve them.
Deep Dive
LOAD references/commands.md when:
- Creating issues with complex fields or multi-line content.
- Building JQL queries beyond simple filters.
- Troubleshooting CLI errors or authentication issues.
- Working with transitions, linking, or sprints.
Do NOT load reference for:
- Simple view/list operations where the Quick Reference above is sufficient.
- Basic status checks (
jira issue view KEY).
- Opening issues in browser.
| Task |
Load Reference? |
| View single issue |
No |
| List my tickets |
No |
| Create with description |
Yes: CLI needs /tmp pattern for multi-line content |
| Transition issue |
Yes: review transition command patterns |
| JQL search |
Yes: for complex queries |
| Link issues |
Yes: review link syntax |
Reference:
- CLI patterns:
references/commands.md
1---2name: jira3description: Use when the user mentions Jira issues (e.g., "PROJ-123"), asks about tickets, wants to create/view/update issues with the jira CLI, check sprint status, or manage their Jira workflow. Triggers on keywords like "jira", "issue", "ticket", "sprint", "backlog", or issue key patterns.4---56# Jira78Natural language interaction with Jira using the `jira` CLI.910## Required CLI1112This skill only supports the `jira` CLI.1314**Run this check first:**1516```bash17which jira18```1920- If `jira` is available, use the CLI commands below.21- If `jira` is not available, stop and tell the user the CLI is required.22- Do not install the CLI, run package-manager commands, or run `jira init` unless the user explicitly asks you to perform setup.2324## When CLI Is Missing2526If `which jira` fails:27281. Explain that this skill requires the local `jira` CLI.292. Provide setup instructions for the user to run themselves.303. Ask the user to install/configure it and then retry.314. Only run installation or setup commands if the user explicitly asks you to do so.3233Suggested user-run setup:3435```bash36brew install ankitpokhrel/jira-cli/jira-cli37jira init38jira me39```4041Project: https://github.com/ankitpokhrel/jira-cli4243---4445## Quick Reference4647| Intent | Command |48|--------|---------|49| View issue | `jira issue view ISSUE-KEY` |50| List my issues | `jira issue list -a$(jira me)` |51| My in-progress | `jira issue list -a$(jira me) -s"In Progress"` |52| Create issue | `jira issue create -tType -s"Summary" -b"Description"` |53| Create issue under epic | `jira issue create -tStory -pPROJ --parent EPIC-KEY -s"Summary" -b"Description"` |54| Move/transition | `jira issue move ISSUE-KEY "State"` |55| Assign to me | `jira issue assign ISSUE-KEY $(jira me)` |56| Assign to someone | `jira issue assign ISSUE-KEY "user@example.com"` |57| Unassign | `jira issue assign ISSUE-KEY x` |58| Add comment | `jira issue comment add ISSUE-KEY -b"Comment text"` |59| Open in browser | `jira open ISSUE-KEY` |60| Current sprint | `jira sprint list --state active` |61| Who am I | `jira me` |6263---6465## Triggers6667- "create a jira ticket"68- "show me PROJ-123"69- "list my tickets"70- "move ticket to done"71- "what's in the current sprint"7273---7475## Issue Key Detection7677Issue keys follow the pattern: `[A-Z]+-[0-9]+` (e.g., PROJ-123, ABC-1).7879When a user mentions an issue key in conversation, use:8081```bash82jira issue view KEY83```8485or, if the user wants to open it in a browser:8687```bash88jira open KEY89```9091---9293## Workflow9495**Creating tickets:**961. Research context if user references code/tickets/PRs.972. Check project requirements when needed.983. Draft ticket content.994. Review with user.1005. Create with `jira issue create`.1016. Verify the created issue.102103**Body markup and the create vs edit quirk:**104- Some Jira instances (Server / Data Center) render **wiki markup**, not105 Markdown. On those, write descriptions in wiki markup (`h2.` headings,106 `*` bullets, `#` numbered lists, `{{...}}` monospace, `{code}{code}`107 blocks).108- `jira issue create` converts a Markdown `-b` body to the instance format,109 but `jira issue edit` sends the body **raw**. So a body that rendered fine110 on create can break on a later edit. Pass already-final wiki markup to111 `edit` on wiki-markup instances.112- Do **not** pass wiki markup to `jira issue create -b` on a wiki-markup113 instance: the Markdown conversion mangles it. Observed damage: the blank114 line between a heading and the list under it is dropped, gluing the first115 list item onto the heading (`h2. Done when* first item`), and special116 characters get backslash-escaped (`nba2\-core`, `hashed\_password`,117 `\(...\)`). Headings survive only because `h2.` is not Markdown.118- Recommended pattern on wiki-markup instances: create with a minimal body,119 then `jira issue edit -b` the final wiki markup (edit sends it raw, so it120 stores verbatim), and verify with `jira issue view KEY --raw`.121 Alternatively, write the create body in real Markdown and let the122 converter produce the wiki markup.123124**Epic / parent handling:**125- If the user mentions an epic, parent epic, parent issue, or asks for a Story/Task to be under an epic, use `--parent EPIC-KEY` when creating the issue.126- Do not use `--custom` fields for Epic Link. With `jira` CLI, epic placement is done with `--parent`.127- On non-cloud Jira (Server / Data Center, classic projects), the Epic Link of an existing issue is stored in an instance-specific `customfield_*`, not in `fields.parent`. When inspecting raw issue JSON to find which epic an issue belongs to, scan the `customfield_*` entries rather than assuming `fields.parent` is populated. The specific field id varies by instance, so detect it per ticket instead of hardcoding.128129**Updating tickets:**1301. Fetch issue details first with `jira issue view ISSUE-KEY`.1312. Check status, assignee, linked issues, and relevant fields.1323. Show current vs proposed changes.1334. Get approval before updating.1345. Apply the CLI command.1356. Verify the updated issue.1367. Add a comment explaining significant changes when appropriate.137138---139140## Before Any Operation141142Ask yourself:1431441. **What's the current state?** Always fetch the issue first. Don't assume status, assignee, or fields are what user thinks they are.1451462. **Who else is affected?** Check watchers, linked issues, parent epics, and sprint context when relevant. A "simple edit" might notify many people.1471483. **Is this reversible?** Transitions may have one-way gates. Some workflows require intermediate states. Description edits have no undo.1491504. **Do I have the right identifiers?** Verify issue keys, transition names, project keys, users, and sprint IDs before acting.151152---153154## NEVER155156- **NEVER transition without fetching current status first**. Workflows may require intermediate states. "To Do" -> "Done" might fail if "In Progress" is required first.157158- **NEVER edit description without showing original content or a clear summary of what will change**. Jira has no undo.159160- **NEVER use `--no-input` without all required fields**. It can fail with cryptic errors. Check the project's required fields first.161162- **NEVER use `--custom` to set Epic Link when creating issues**. Use `--parent EPIC-KEY` instead.163164- **NEVER assume transition names are universal**. "Done", "Closed", and "Complete" vary by project. If unsure, inspect the issue or use interactive/browser flow.165166- **NEVER bulk-modify without explicit approval**. Each ticket change can notify watchers.167168- **NEVER install, upgrade, or configure the `jira` CLI unless the user explicitly asks you to perform setup**. If the CLI is missing, provide instructions for the user to run.169170---171172## Safety173174- Always show the CLI command before running it.175- Always get approval before modifying tickets.176- Preserve original information when editing.177- Verify updates after applying.178- Surface authentication and permission issues clearly so the user can resolve them.179180---181182## Deep Dive183184**LOAD `references/commands.md` when:**185- Creating issues with complex fields or multi-line content.186- Building JQL queries beyond simple filters.187- Troubleshooting CLI errors or authentication issues.188- Working with transitions, linking, or sprints.189190**Do NOT load reference for:**191- Simple view/list operations where the Quick Reference above is sufficient.192- Basic status checks (`jira issue view KEY`).193- Opening issues in browser.194195| Task | Load Reference? |196|------|-----------------|197| View single issue | No |198| List my tickets | No |199| Create with description | **Yes**: CLI needs `/tmp` pattern for multi-line content |200| Transition issue | **Yes**: review transition command patterns |201| JQL search | **Yes**: for complex queries |202| Link issues | **Yes**: review link syntax |203204Reference:205- CLI patterns: `references/commands.md`