Uploads file attachments to Jira tickets via the Jira REST API. Verifies file existence and handles authentication with JIRA_API_TOKEN and JIRA_EMAIL.
Ships in odh-ai-helpers. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Upload file attachments to Jira tickets using the Jira REST API (since acli does not support attachment uploads).
acli must be installed and authenticated (acli jira auth) to verify the uploaduv must be installedJIRA_API_TOKEN environment variable must be set with a valid API tokenJIRA_EMAIL environment variable must be set with the email address associated with your Atlassian accountSecurity Note: The JIRA_API_TOKEN is sensitive and should be kept secure:
Before proceeding, verify that acli is installed and authenticated by invoking the acli-setup-check skill:
/acli-setup-check
If the setup check fails, stop execution and guide the user to fix the issue.
Check that the required environment variables are set:
if [[ -z "$JIRA_API_TOKEN" || -z "$JIRA_EMAIL" ]]; then
echo "Error: JIRA_API_TOKEN and JIRA_EMAIL environment variables must be set"
exit 1
fi
If either variable is missing, inform the user:
JIRA_API_TOKEN and JIRA_EMAIL environment variables are required for uploading attachments.
To set them:
export JIRA_EMAIL="[email protected]"
export JIRA_API_TOKEN="your-api-token"
Get your API token from:
https://id.atlassian.com/manage-profile/security/api-tokens
Note: The Python upload script will also validate these variables, but checking early provides better user experience.
Ticket Key:
[A-Z]+-\d+File Path:
Validate File Path Security:
Before proceeding to Step 4, validate the FILE_PATH for security:
# Resolve to absolute path and check it exists
FILE_PATH="<user-provided-path>"
REAL_PATH=$(realpath -e "$FILE_PATH" 2>/dev/null)
if [[ $? -ne 0 ]]; then
echo "Error: File does not exist or is not accessible: $FILE_PATH"
exit 1
fi
# Check if file is readable
if [[ ! -r "$REAL_PATH" ]]; then
echo "Error: File is not readable: $FILE_PATH"
exit 1
fi
# Reject parent-traversal patterns in original path
if [[ "$FILE_PATH" == *".."* ]]; then
echo "Error: Parent directory traversal (..) not allowed in file path"
exit 1
fi
# Restrict to allowed directories: current working directory or /tmp
CURRENT_DIR=$(pwd)
if [[ "$REAL_PATH" != "$CURRENT_DIR"/* ]] && [[ "$REAL_PATH" != /tmp/* ]]; then
echo "Error: File must be in current directory or /tmp for security"
echo " File location: $REAL_PATH"
echo " Allowed: $CURRENT_DIR/* or /tmp/*"
exit 1
fi
# Check for symlinks pointing outside allowed directories
if [[ -L "$FILE_PATH" ]]; then
echo "Error: Symlinks not allowed for security reasons"
exit 1
fi
If any validation fails, surface the error to the user and abort before calling upload_attachment.py.
Since acli does not support attachment uploads, use the upload
script located at scripts/upload_attachment.py relative to the
jira-workitem-attach skill directory.
Resolve the skill directory path and execute the script directly (not via python or
bash) to invoke uv via the shebang:
# Resolve skill directory path (adjust based on runtime context)
# Option 1: If skill directory is known via environment or context
SKILL_DIR="<path-to-helpers>/helpers/skills/jira-workitem-attach"
# Option 2: Compute relative to repository root if available
# SKILL_DIR="${REPO_ROOT}/helpers/skills/jira-workitem-attach"
# Option 3: Use current directory if already in skill directory
# SKILL_DIR="$(pwd)"
# Execute the upload script with resolved path
"$SKILL_DIR/scripts/upload_attachment.py" "$TICKET_KEY" "$FILE_PATH"
Note: The skill directory path resolution method depends on how the runtime provides context. Use whichever approach is available (environment variables, repository-root relative paths, or explicit path configuration).
The script will:
After the upload script completes, verify the attachment was successfully added using acli:
acli jira workitem attachment list --key <TICKET-KEY>
This command will display all attachments on the ticket, including the newly uploaded file. Confirm the file appears in the list with the correct name and size.
After successfully uploading and verifying the attachment, report to the user:
✓ Attachment uploaded to <TICKET-KEY>
File: <filename> (<size>)
View: https://redhat.atlassian.net/browse/<TICKET-KEY>
If the attachment doesn't appear in the list, report the issue and check the upload script output for errors
acli-setup-check skillacli-setup-check skillacli does not support uploading attachments, so this skill uses the Jira REST API directlyUser: Attach error.log to RHAI-1234
Assistant: [Verifies file exists, uploads via API]
Attachment uploaded to RHAI-1234
File: error.log (15.2 KB)
View: https://redhat.atlassian.net/browse/RHAI-1234
User: Attach the conversation log to RHAI-5678
Assistant: [Exports conversation, uploads to ticket]
Attachment uploaded to RHAI-5678
File: conversation-2024-03-20.md (42.1 KB)
View: https://redhat.atlassian.net/browse/RHAI-5678
User: Attach large-dataset.csv to RHAI-910
Assistant: Warning: large-dataset.csv is 15.3 MB, which exceeds the typical 10MB Jira limit.
The upload may fail. Would you like to proceed anyway?
User: Yes
Assistant: [Attempts upload]
✗ Upload failed: Request Entity Too Large (413)
Consider compressing the file or using a file sharing service instead.
User: Attach screenshot.png to RHAI-1234
Assistant: [Uploads file]
Attachment uploaded to RHAI-1234
File: screenshot.png (234 KB)
Current attachments on RHAI-1234:
- screenshot.png (234 KB) - uploaded just now
- error.log (15.2 KB) - uploaded 2024-03-19
- build.log (8.1 KB) - uploaded 2024-03-18
What SKILL.md sets; muted values are Claude Code's defaults
/odh-ai-helpers:jira-workitem-attachfrom odh-ai-helpers
odh-ai-helpers@opendatahub-skills is listed by opendatahub-io/skills-registry — review the source before installing
npx claudepluginhub opendatahub-io/skills-registry --plugin odh-ai-helpers3 plugins in one repository ship this exact skill · first indexed Sep 26, 2026
70 skills in this plugin
/acli-setup-checkVerify acli installation and authentication. Checks if acli is installed, authenticated to Jira, and can query projects. Use when troubleshooting acli issues or setting up acli for the first time./adr-reviewReview an Architectural Decision Record (ADR) using a team of six specialist reviewer subagents and produce a consolidated report as both PDF and PPTX slide deck. Use this skill whenever the user asks to review, critique, audit, or get feedback on an ADR, architecture decision, design doc, or RFC — whether the input is a Markdown file, a .docx document, or pasted text. Trigger even if the user does not explicitly say "ADR"; phrases like "review this architecture decision", "critique this design doc", or "run the reviewer panel on this" should also invoke this skill./ai-bug-fix-triageTriage JIRA bugs against repository code to classify AI fixability. Use when reviewing a backlog of bugs to determine which ones an AI agent can fix./aipcc-commit-suggestGenerate AIPCC Commits style commit messages or summarize existing commits/aipcc-cve-reportGenerate CVE remediation instructions for the user's target RHAI product release or content channel from Jira JQL, ticket keys or a ticket description. Verify fixed packages in the RHAI package index and a matching RHAI base image (RHAIBI), or prepare a focused AIPCC build-request prompt./coderabbit-reviewUse when you need to evaluate CodeRabbit PR comments and fix or replyOther plugins' skills for the same job