atlassian-attachments
БесплатноБез исполняемых скриптовНе проверенAttach documents, screenshots, PDFs, and files to Jira issues and Confluence pages via REST API. Use when uploading evidence, documentation, or media to…
Об этом скилле
Atlassian Attachments Skill
Attach files, screenshots, and documents to Jira issues and Confluence pages using the Atlassian REST API.
Authentication Setup
API Token (Required)
Generate an API token at: https://id.atlassian.com/manage-profile/security/api-tokens
Environment Variables
export ATLASSIAN_DOMAIN="your-domain"
export ATLASSIAN_EMAIL="[email protected]"
export ATLASSIAN_API_TOKEN="your-api-token"
Setup via .envrc (Recommended)
If environment variables are not set, add them to .envrc in your project root for automatic loading with direnv:
# .envrc
export ATLASSIAN_DOMAIN="your-domain"
export ATLASSIAN_EMAIL="[email protected]"
export ATLASSIAN_API_TOKEN="your-api-token"
Then allow the file:
direnv allow
Security Note: Add .envrc to .gitignore to prevent committing credentials:
echo ".envrc" >> .gitignore
Check Environment Setup
# Verify variables are set
echo "Domain: ${ATLASSIAN_DOMAIN:-NOT SET}"
echo "Email: ${ATLASSIAN_EMAIL:-NOT SET}"
echo "Token: ${ATLASSIAN_API_TOKEN:+SET}"
If any show "NOT SET", prompt the user to configure .envrc.
Base URLs
Jira: https://{domain}.atlassian.net/rest/api/3
Confluence: https://{domain}.atlassian.net/wiki/rest/api
Jira REST API - Upload Attachments
Endpoint
POST https://{domain}.atlassian.net/rest/api/3/issue/{issueIdOrKey}/attachments
Required Headers
| Header | Value | Purpose |
|---|---|---|
X-Atlassian-Token |
no-check |
CSRF protection bypass (required) |
Content-Type |
multipart/form-data |
File upload format |
cURL Command
curl --location --request POST \
'https://your-domain.atlassian.net/rest/api/3/issue/PROJ-123/attachments' \
-u '[email protected]:<api_token>' \
-H 'X-Atlassian-Token: no-check' \
--form 'file=@"./screenshots/bug-evidence.png"'
Python Example
import requests
from requests.auth import HTTPBasicAuth
def upload_jira_attachment(domain, email, api_token, issue_key, file_path):
url = f"https://{domain}.atlassian.net/rest/api/3/issue/{issue_key}/attachments"
auth = HTTPBasicAuth(email, api_token)
headers = {
"X-Atlassian-Token": "no-check"
}
with open(file_path, 'rb') as file:
files = {'file': file}
response = requests.post(url, auth=auth, headers=headers, files=files)
if response.status_code == 200:
return response.json()
else:
raise Exception(f"Upload failed: {response.status_code} - {response.text}")
# Usage
result = upload_jira_attachment(
domain="your-domain",
email="[email protected]",
api_token="your-api-token",
issue_key="PROJ-123",
file_path="./screenshots/bug-evidence.png"
)
Bash Script - Multiple Files
#!/bin/bash
DOMAIN="your-domain"
EMAIL="[email protected]"
API_TOKEN="your-api-token"
ISSUE_KEY="PROJ-123"
FILES_DIR="./qa-tests/screenshots/"
for file in "$FILES_DIR"*.png; do
echo "Uploading: $file"
curl --silent --location --request POST \
"https://${DOMAIN}.atlassian.net/rest/api/3/issue/${ISSUE_KEY}/attachments" \
-u "${EMAIL}:${API_TOKEN}" \
-H "X-Atlassian-Token: no-check" \
--form "file=@\"$file\""
echo " Done"
done
Confluence REST API - Upload Attachments
Endpoint
POST https://{domain}.atlassian.net/wiki/rest/api/content/{pageId}/child/attachment
Required Headers
| Header | Value | Purpose |
|---|---|---|
X-Atlassian-Token |
nocheck |
CSRF protection bypass (required) |
Content-Type |
multipart/form-data |
File upload format |
cURL Command - Basic Auth
curl -u "${USER_EMAIL}:${API_TOKEN}" \
-X POST \
-H "X-Atlassian-Token: nocheck" \
-F "file=@./diagram.png" \
-F "comment=Uploaded via REST API" \
"https://${DOMAIN}.atlassian.net/wiki/rest/api/content/${PAGE_ID}/child/attachment"
cURL Command - Personal Access Token
curl -X POST \
-H "Authorization: Bearer ${PAT_TOKEN}" \
-H "X-Atlassian-Token: no-check" \
-H "Content-Type: multipart/form-data" \
-F "file=@./document.pdf" \
"https://${DOMAIN}.atlassian.net/wiki/rest/api/content/${PAGE_ID}/child/attachment"
Python Example
import requests
from requests.auth import HTTPBasicAuth
def upload_confluence_attachment(domain, email, api_token, page_id, file_path, comment=""):
url = f"https://{domain}.atlassian.net/wiki/rest/api/content/{page_id}/child/attachment"
auth = HTTPBasicAuth(email, api_token)
headers = {
"X-Atlassian-Token": "nocheck"
}
with open(file_path, 'rb') as file:
files = {'file': file}
data = {'comment': comment} if comment else {}
response = requests.post(url, auth=auth, headers=headers, files=files, data=data)
if response.status_code in [200, 201]:
return response.json()
Установить atlassian-attachments в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл atlassian-attachments?
Attach documents, screenshots, PDFs, and files to Jira issues and Confluence pages via REST API. Use when uploading evidence, documentation, or media to Atlassian products.
Как установить скилл atlassian-attachments?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл atlassian-attachments запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic