Skip to content
Back to skills

Jira

CSecurity

Manage Jira issues, sprints, epics, and boards via `jira` CLI (ankitpokhrel/jira-cli) across Jira Cloud (basic auth), Server/Data Center (bearer auth), and multi-instance configs. Use when finding, viewing, creating, updating, transitioning, commenting, assigning, linking, or running JQL on Jira tickets (e.g., PROJ-123). Do not use for Todoist, GitHub Issues, Linear, or non-Jira planning.

  • 2 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 24, 2026
ai-agentsgoshellbashgitapi

Works with

  • cli
  • api

Security analysis

C67/100
  • mediumUses curl or wget to download content
  • criticalSends environment variables or credentials to an external URL

Pro scans all 8 files and shows the line behind each finding

Scanned December 5, 2026

npx -y skills add tkolleh/skills --skill jira --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Jira?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Jira
[![Security: C — Skills Directory](https://www.skillsdirectory.com/api/skills/tkolleh-jira/badge)](https://www.skillsdirectory.com/skills/tkolleh-jira)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: jira
description: >-
  Manage Jira issues, sprints, epics, and boards via `jira` CLI
  (ankitpokhrel/jira-cli) across Jira Cloud (basic auth), Server/Data Center
  (bearer auth), and multi-instance configs. Use when finding, viewing,
  creating, updating, transitioning, commenting, assigning, linking, or running
  JQL on Jira tickets (e.g., PROJ-123). Do not use for Todoist, GitHub Issues,
  Linear, or non-Jira planning.
license: MIT
compatibility: "Requires jira CLI (https://github.com/ankitpokhrel/jira-cli) authenticated via `jira init`. A user may have several instances configured, one config file per instance. Optional: jq, pandoc (gfm→jira)."
metadata:
  audience: developers
  workflow: project-management
  tools: "jira, jq, pandoc"
---

# Jira CLI

Bridge natural language to a Jira CLI. Portable across users, projects, instances, and auth models — never hardcode project keys, usernames, servers, tenant hostnames, or board IDs.

A user may have **more than one Jira instance** configured on their machine (e.g. a Server/DC instance alongside a Cloud tenant), each with its own jira-cli config file and token, usually reached through a wrapper shell function. Work phases in order for each request. Skip only phases marked optional when their precondition is unmet.

## Phase 0 — Pick the instance (multi-instance setups only)

Skip this phase entirely if only one instance is configured — go straight to Prerequisites below.

1. **Detect wrappers** — list candidates rather than guessing a name: `alias | grep -i jira` and `declare -f | grep -i jira` (or `type -a` per candidate). Wrappers typically set `JIRA_CONFIG_FILE` (one file per instance under `~/.config/.jira/`) and `JIRA_API_TOKEN` for a single `jira` invocation. If more than one turns up, ask which maps to which instance rather than assuming from the name. Do not hardcode alias names — they are user-chosen and machine-specific.
2. **Match the request to an instance** — explicit project key prefix, current repo, or a stated instance name. If more than one instance plausibly applies, ask once before any write.
3. **Use the wrapper, not bare `jira`** — bare `jira` reads `~/.config/.jira/.config.yml` and whatever `JIRA_API_TOKEN` happens to be ambient, which may belong to a different instance and yields a confusing 401.

## Cloud auth (when a Cloud instance returns 401, empty results, or 404s)

Jira Cloud accepts API tokens over **basic** auth (`--auth-type basic`, login = account email). A 401 is almost always the host or token type, not an org-wide ban — do not conclude a tenant is "OAuth-only" from a `WWW-Authenticate: OAuth` header; Atlassian Cloud sends that on every 401.

- **Use the canonical `*.atlassian.net` host as `server`.** Vanity/custom domains (the URL people use in the browser) can reject API tokens. Find the canonical host and cloud ID unauthenticated: `curl -s https://<host>/_edge/tenant_info`.
- **Scoped tokens** ("API token with scopes") only work through the gateway: `server: https://api.atlassian.com/ex/jira/<cloudId>`. Unscoped tokens work on the site host.
- **`401 ... scope does not match`** on boards/sprints (`/rest/agile/1.0`) means the scoped token lacks Jira Software board/sprint scopes — regenerate with those scopes, or unscoped. Core issue commands can still work in that state.
- Probe before reconfiguring: `curl -s -o /dev/null -w '%{http_code}' -u "$EMAIL:$JIRA_API_TOKEN" "$SERVER/rest/api/3/myself"` — 200 means the server/token pair is good.
- **`jira me` proves nothing about auth** — it prints the configured `login` without calling the API, even with a bogus token. "`jira me` works but `jira project list` is empty and `issue view` 404s" means requests are running **anonymously**: Cloud answers a rejected token with anonymous access (`x-seraph-loginreason: AUTHENTICATED_FAILED` header, 401 on `/myself`), not an error. Confirm with the `/myself` probe. If it is 401, first check the wrapper is passing the intended per-instance token (an ambient/inherited `JIRA_API_TOKEN` can override it; scope the token per instance in the wrapper). If the intended token is also 401 on both the site host and the gateway, it is revoked or expired: issue a new one and update wherever it is stored. Long-lived shells or agent sessions that exported the old value keep it until restarted. Neither case means the tenant is OAuth-only, and neither is fixed by switching CLIs.

## Prerequisites (fail fast)

```bash
command -v jira >/dev/null || { echo "jira CLI missing — install ankitpokhrel/jira-cli"; exit 1; }
jira me >/dev/null 2>&1 || { echo "jira not configured — run: jira init"; exit 1; }
```

`jira me` only checks that a config exists. Treat empty results or 404s on keys you expect to see as a possible auth failure, and probe `/myself` (Cloud auth above).

On failure: report the exact fix (`brew install jira-cli` / `jira init`) and STOP. Do not invent issue keys or statuses. For a Cloud 401, work through **Cloud auth** above before regenerating tokens.

Optional tools: `jq` (JSON field extract), `pandoc` (Markdown→Jira wiki for descriptions/comments). If missing, prefer `--plain` text or pass simple plain text bodies.

## Phase 1 — Resolve context

Establish **active issue key**, **project**, and **acting user** before writes.

1. **Issue key** — Prefer explicit key in the user message (`[A-Z][A-Z0-9]+-\d+`). Else parse current git branch (`feat/PROJ-123-…`, `PROJ-123-…`). Else search (Phase 2). Never invent keys.
2. **Project** — Explicit `-p KEY` / user text wins. Else default from config (`jira` uses `~/.config/.jira/.config.yml`, override with `JIRA_CONFIG_FILE`). For another project always pass `-p KEY` or JQL `project = KEY`.
3. **User** — `ME=$(jira me)` for "me" / "my". Assignees accept email or exact display name; self-assign: `jira issue assign KEY "$(jira me)"`.
4. **Session memory (optional)** — If a memory tool exists, read/write active key as `JIRA_ACTIVE_KEY`. If none, keep the key in conversation only. Do not require serena/openmemory.

Completion: you can name the target key and/or project, or you are about to search with an explicit JQL/filter plan.

## Phase 2 — Read (prefer structured output)

| Goal | Command |
|------|---------|
| View one issue | `jira issue view KEY --plain` (human) or `jira issue view KEY --raw` (JSON) |
| List / search | `jira issue list [flags] --plain` or `--raw` |
| My open work | `jira issue list -a"$(jira me)" -s~Done --plain --columns key,status,summary,priority` |
| Recent | `jira issue list --history --plain` |
| Cross-project JQL | `jira issue list -q'project IS NOT EMPTY AND …' --plain` |
| Sprint issues | `jira sprint list --current --plain` (needs board in config) |
| Epics | `jira epic list --table --plain` |

**Rules**
- Use `--plain` or `--raw` in agents — never the interactive TUI.
- There is **no** `--output json`. JSON is `--raw`.
- Default list is **project-scoped** to config project. Broaden with `-p` or `-q`.
- Paginate: `--paginate 0:50` (max 100/page).
- With `--raw` + `jq`, extract only needed fields. List items look like `{key, fields:{summary,status:{name},assignee:{displayName},issueType:{name},…}}`. View `--raw` uses standard Jira API issue JSON (`fields.status.name`, etc.).
- Do not dump full JSON into chat.

Common list flags: `-tType` `-sStatus` (repeatable; `-s~Done` = not Done) `-aAssignee` `-rReporter` `-yPriority` `-lLabel` `-q'JQL'` `--updated week`.

Deep JQL: load `references/jql.md` only if needed.

## Phase 3 — Write (confirm first)

**Confirm with the user before any create, edit, comment, assign, transition, delete, or bulk change.** One confirmation can cover a stated batch. Reads need no confirmation.

Always pass non-interactive flags where available (`--no-input` on create/edit/comment).

| Action | Command |
|--------|---------|
| Create | `jira issue create -tTYPE -s"Summary" -b"Body" --no-input` (`-pKEY` if not default) |
| Edit | `jira issue edit KEY -s"…" -b"…" --no-input` |
| Comment | `jira issue comment add KEY "body"` or `--template -` / `--template FILE` |
| Assign | `jira issue assign KEY "email-or-name"` or `KEY "$(jira me)"` · unassign: `KEY x` |
| Transition | `jira issue move KEY "State Name"` |
| Delete | `jira issue delete KEY` — extra explicit confirm |

### Formatting (descriptions / comments)

Jira wiki ≠ Markdown. If body has headings, lists, or code and `pandoc` exists:

```bash
body=$(printf '%s\n' "$MARKDOWN" | pandoc -f gfm -t jira)
jira issue comment add KEY "$body" --no-input
# or: printf '%s\n' "$body" | jira issue comment add KEY --template -
```

Else use short plain text (no reliance on MD rendering). Details: `references/formatting.md`.

### Transitions (no `--list` flag)

`jira issue move` has **no** `--list`. Target state is the **transition name** for that workflow (instance-specific).

1. Read current status: `jira issue view KEY --plain` (or `--raw` → `.fields.status.name`).
2. Prefer the exact state name the user asked for (quote spaces: `"In Progress"`).
3. On error, show the CLI error, suggest common names (`In Progress`, `Done`, `To Do`, `Backlog`) or ask the user for the exact workflow transition — do not invent transition IDs.
4. Optional: comment while moving: `jira issue move KEY "Done" --comment "…"`.

Details: `references/transitions.md`.

## Phase 4 — Report

After each mutating command: state key, action, new status/assignee if known. On failure: paste the CLI error, what you tried, and the next safe step. Never claim success without a successful command exit.

## Anti-patterns

- Inventing issue keys, projects, or statuses
- Interactive TUI (`jira issue list` without `--plain`/`--raw`)
- `jira issue move KEY --list` (invalid flag)
- `--output json` (use `--raw`)
- Hardcoding one company's project/board/username into commands
- Bulk edit/delete without confirmation
- Dumping raw multi-issue JSON into the user chat
- Running bare `jira` in a multi-instance setup instead of the instance's wrapper (Phase 0)
- Pointing a Cloud config at a vanity domain instead of the canonical `*.atlassian.net` host or gateway (Cloud auth)
- `jira board list --plain` (`board list` has no `--plain` flag)

## Examples

**User:** "my open tickets"
→ `jira issue list -a"$(jira me)" -s~Done --plain --columns key,status,summary,priority --paginate 0:50`

**User:** "show ACME-42"
→ `jira issue view ACME-42 --plain`

**User:** "comment on ACME-42: fixed in abc123" (after confirm)
→ pandoc (if needed) then `jira issue comment add ACME-42 "…" --no-input`

**User:** "move ACME-42 to In Progress" (after confirm)
→ `jira issue move ACME-42 "In Progress"`

**User:** "bugs in project OPS filed by me last week"
→ `jira issue list -pOPS -tBug -r"$(jira me)" --created week --plain --columns key,status,summary`

More: `references/examples.md`.

Files in this skill

  • SKILL.md11 KB
  • SKILL.md.bak-202611069.9 KB
  • evals/evals.json4.6 KB
  • references/examples.md2.2 KB
  • references/examples.md.bak-202611062 KB
  • references/formatting.md1.2 KB
  • references/jql.md2.2 KB
  • references/transitions.md1.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.