From jira
Wraps curl for JIRA API calls with secure token handling, preventing exposure in process listings and history.
How this skill is triggered — by the user, by Claude, or both
Slash command
/jira:jira-issues-by-componentThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill provides a secure curl wrapper script for the `jira:issues-by-component` command. The wrapper prevents JIRA authentication token exposure in process listings and command history.
This skill provides a secure curl wrapper script for the jira:issues-by-component command. The wrapper prevents JIRA authentication token exposure in process listings and command history.
This skill is automatically used by the jira:issues-by-component command. You typically don't need to invoke it directly unless you're:
The jira_curl.sh wrapper script provides:
ps aux)Secure curl wrapper that automatically adds JIRA authentication headers.
Location: plugins/jira/skills/jira-issues-by-component/jira_curl.sh
Usage:
jira_curl.sh [curl arguments...]
Required Environment Variables:
JIRA_URL: JIRA instance URL (e.g., https://redhat.atlassian.net)JIRA_API_TOKEN: Authentication tokenJIRA_USERNAME: Atlassian account email for Basic authExample:
# Set credentials
export JIRA_URL="https://redhat.atlassian.net"
export JIRA_API_TOKEN="your-token-here"
export JIRA_USERNAME="[email protected]"
# Use wrapper (token hidden from process list)
jira_curl.sh -s -X POST -d '{"jql":"project=OCPBUGS"}' https://redhat.atlassian.net/rest/api/3/search/jql
JIRA_URL and authentication token are setJIRA_API_TOKEN for Atlassian Cloud authenticationAuthorization: Basic <base64> header inside the script using JIRA_USERNAME and JIRA_API_TOKENexec curl to replace the script process with curlThe wrapper uses the same security pattern as the oc auth skill:
# Token and username are read from environment variables inside the script
AUTH_TOKEN="${JIRA_API_TOKEN:-}"
JIRA_USER="${JIRA_USERNAME:-}"
# Execute curl with Basic authentication header
# Credentials are constructed here, never visible in parent process command line
AUTH_HEADER=$(printf '%s:%s' "$JIRA_USER" "$AUTH_TOKEN" | base64)
exec curl -H "Authorization: Basic $AUTH_HEADER" -H "Accept: application/json" "$@"
Why exec?
The script provides clear error messages for common scenarios:
Missing JIRA_URL:
Error: JIRA_URL environment variable is required
Please set JIRA credentials:
export JIRA_URL='https://redhat.atlassian.net'
export JIRA_API_TOKEN='your-token-here'
Alternatively, source a credentials file:
source ~/.jira-credentials
Missing Token:
Error: JIRA authentication token is required
Please set:
export JIRA_API_TOKEN='your-token-here'
export JIRA_USERNAME='[email protected]'
Get your token from:
- Atlassian API Token: https://id.atlassian.com/manage-profile/security/api-tokens
export JIRA_URL="https://redhat.atlassian.net"
export JIRA_API_TOKEN="your-token-here"
export JIRA_USERNAME="[email protected]"
Create ~/.jira-credentials:
# ~/.jira-credentials
export JIRA_URL="https://redhat.atlassian.net"
export JIRA_API_TOKEN="your-token-here"
export JIRA_USERNAME="[email protected]"
Secure the file:
chmod 600 ~/.jira-credentials
Source it when needed:
source ~/.jira-credentials
JIRA_API_TOKEN# Credentials exposed in process list and history!
curl -u "[email protected]:${JIRA_API_TOKEN}" -X POST \
-H "Content-Type: application/json" \
-d '{"jql":"..."}' \
https://redhat.atlassian.net/rest/api/3/search/jql
Problems:
ps aux# Token hidden inside wrapper script
jira_curl.sh -X POST -H "Content-Type: application/json" \
-d '{"jql":"..."}' https://redhat.atlassian.net/rest/api/3/search/jql
Benefits:
The jira:issues-by-component command uses this wrapper to fetch JIRA issues securely:
# Get path to secure curl wrapper
PLUGIN_DIR="plugins/jira/skills/jira-issues-by-component"
JIRA_CURL="${PLUGIN_DIR}/jira_curl.sh"
# Fetch issues with pagination (token hidden)
HTTP_CODE=$("$JIRA_CURL" -s -w "%{http_code}" \
-o "batch-${BATCH_NUM}.json" \
"${API_URL}")
This approach:
npx claudepluginhub openshift-eng/ai-helpers --plugin jiraManages Jira issues, sprints, boards, worklogs, attachments, users, and fields via CLI scripts. Auto-triggers on Jira URLs and issue keys (PROJ-123).
Search, create, update, and transition Jira issues, manage sprints and boards from the command line using jira-cli.
Manages Jira Cloud issues via jira CLI with JSON output: create, view, update, search issues, fetch hierarchies, manage sprints.