From jira-pat-skill
Manage Jira issues on self-hosted/enterprise instances using Personal Access Tokens (PAT). Use this skill when working with Jira that uses SSO/SAML authentication where Basic Auth fails.
How this skill is triggered — by the user, by Claude, or both
Slash command
/jira-pat-skill:jira-patThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill provides patterns for interacting with Jira REST API using Personal Access Tokens (PAT).
This skill provides patterns for interacting with Jira REST API using Personal Access Tokens (PAT).
Personal Access Token (PAT): Create one in Jira:
JIRA_PAT)Jira Base URL: Your Jira instance URL (e.g., https://issues.redhat.com)
# Set these in your shell or .bashrc/.zshrc
export JIRA_PAT="your-personal-access-token"
export JIRA_URL="https://issues.redhat.com"
Fetch full details of a Jira issue by its key:
curl -s -H "Authorization: Bearer $JIRA_PAT" \
"$JIRA_URL/rest/api/2/issue/TC-3494" | jq
Get specific fields only:
curl -s -H "Authorization: Bearer $JIRA_PAT" \
"$JIRA_URL/rest/api/2/issue/TC-3494?fields=summary,status,description" | jq
Search using JQL (Jira Query Language):
# Find all child issues of an epic
curl -s -H "Authorization: Bearer $JIRA_PAT" \
"$JIRA_URL/rest/api/2/search?jql=parent=TC-3494" | jq
# Search with URL encoding for complex queries
curl -s -H "Authorization: Bearer $JIRA_PAT" \
"$JIRA_URL/rest/api/2/search?jql=project%3DTCS%20AND%20status%3DOpen" | jq
Common JQL examples:
parent=EPIC-123 - Child issues of an epicproject=TCS AND status=Open - Open issues in projectassignee=currentUser() - Issues assigned to youlabels=security - Issues with specific labelupdated >= -7d - Recently updatedBefore changing issue status, get available transitions:
curl -s -H "Authorization: Bearer $JIRA_PAT" \
"$JIRA_URL/rest/api/2/issue/TC-3496/transitions" | jq '.transitions[] | {id, name}'
Example output:
{"id": "11", "name": "To Do"}
{"id": "21", "name": "In Progress"}
{"id": "31", "name": "In Review"}
{"id": "41", "name": "Done"}
{"id": "61", "name": "Closed"}
Close an issue with a comment:
curl -s -X POST \
-H "Authorization: Bearer $JIRA_PAT" \
-H "Content-Type: application/json" \
-d '{
"transition": {"id": "61"},
"update": {
"comment": [
{"add": {"body": "Closed via API. Implementation complete in PR #123."}}
]
}
}' \
"$JIRA_URL/rest/api/2/issue/TC-3496/transitions"
Move to "In Progress" without comment:
curl -s -X POST \
-H "Authorization: Bearer $JIRA_PAT" \
-H "Content-Type: application/json" \
-d '{"transition": {"id": "21"}}' \
"$JIRA_URL/rest/api/2/issue/TC-3496/transitions"
curl -s -X POST \
-H "Authorization: Bearer $JIRA_PAT" \
-H "Content-Type: application/json" \
-d '{"body": "This is a comment added via API."}' \
"$JIRA_URL/rest/api/2/issue/TC-3496/comment"
curl -s -X PUT \
-H "Authorization: Bearer $JIRA_PAT" \
-H "Content-Type: application/json" \
-d '{
"fields": {
"summary": "Updated summary",
"labels": ["api", "security"]
}
}' \
"$JIRA_URL/rest/api/2/issue/TC-3496"
curl -s -X POST \
-H "Authorization: Bearer $JIRA_PAT" \
-H "Content-Type: application/json" \
-d '{
"fields": {
"project": {"key": "TCS"},
"summary": "New issue created via API",
"description": "Issue description here",
"issuetype": {"name": "Task"},
"parent": {"key": "TC-3494"}
}
}' \
"$JIRA_URL/rest/api/2/issue"
# Get just summary and status
curl -s -H "Authorization: Bearer $JIRA_PAT" \
"$JIRA_URL/rest/api/2/issue/TC-3494" | \
jq '{key: .key, summary: .fields.summary, status: .fields.status.name}'
# List all child issues with status
curl -s -H "Authorization: Bearer $JIRA_PAT" \
"$JIRA_URL/rest/api/2/search?jql=parent=TC-3494" | \
jq '.issues[] | {key: .key, summary: .fields.summary, status: .fields.status.name}'
# Get issue links
curl -s -H "Authorization: Bearer $JIRA_PAT" \
"$JIRA_URL/rest/api/2/issue/TC-3494" | \
jq '.fields.issuelinks[] | {type: .type.name, key: (.inwardIssue // .outwardIssue).key}'
Add these to your .bashrc or .zshrc for convenience:
# Get issue details
jira-get() {
curl -s -H "Authorization: Bearer $JIRA_PAT" \
"$JIRA_URL/rest/api/2/issue/$1" | jq
}
# Get issue summary
jira-summary() {
curl -s -H "Authorization: Bearer $JIRA_PAT" \
"$JIRA_URL/rest/api/2/issue/$1" | \
jq -r '"\(.key): \(.fields.summary) [\(.fields.status.name)]"'
}
# Search issues
jira-search() {
curl -s -H "Authorization: Bearer $JIRA_PAT" \
"$JIRA_URL/rest/api/2/search?jql=$1" | \
jq '.issues[] | "\(.key): \(.fields.summary) [\(.fields.status.name)]"' -r
}
# List epic children
jira-children() {
curl -s -H "Authorization: Bearer $JIRA_PAT" \
"$JIRA_URL/rest/api/2/search?jql=parent=$1" | \
jq '.issues[] | "\(.key): \(.fields.summary) [\(.fields.status.name)]"' -r
}
# Get available transitions
jira-transitions() {
curl -s -H "Authorization: Bearer $JIRA_PAT" \
"$JIRA_URL/rest/api/2/issue/$1/transitions" | \
jq '.transitions[] | "\(.id): \(.name)"' -r
}
# Close an issue
jira-close() {
local issue=$1
local comment=${2:-"Closed via API"}
curl -s -X POST \
-H "Authorization: Bearer $JIRA_PAT" \
-H "Content-Type: application/json" \
-d "{\"transition\": {\"id\": \"61\"}, \"update\": {\"comment\": [{\"add\": {\"body\": \"$comment\"}}]}}" \
"$JIRA_URL/rest/api/2/issue/$issue/transitions"
echo "Closed $issue"
}
Usage:
jira-get TC-3494
jira-summary TC-3601
jira-search "project=TCS AND status=Open"
jira-children TC-3494
jira-transitions TC-3496
jira-close TC-3496 "Completed in PR #123"
Bearer <token> (not Bearer: <token>)jira) doesn't work well with self-hosted Jira instances using SSOnpx claudepluginhub dejanb/jira-pat-skill --plugin jira-pat-skillInteracts with Jira issues via CLI scripts: search, create, update, transition, comment, log work, manage sprints/boards/attachments/links. Auto-triggers on Jira URLs and issue keys.
Manages Jira Cloud issues via jira CLI with JSON output: create, view, update, search issues, fetch hierarchies, manage sprints.
Views Jira issues, generates branch names from tickets, creates tickets, and transitions status via Atlassian MCP. Activates on ticket key mentions or /jira command.