Fetch Jira issue with attachments and save to markdown. Use this skill when: fetch jira, jira issue, get ticket, jira ticket, download jira, EN-1234, AW-1234, FR-1234
This skill fetches a Jira issue including its description, comments, attachments, and linked pull requests, then saves everything to a well-organized markdown file with downloaded attachments.
issues/[issueKey]/When fetching a Jira issue, you need:
Required:
EN-4526, FR-123https://apheris.atlassian.net/browse/EN-4526Execute the following steps in order, top to bottom:
Determine Issue Identifier
IF user provides explicit issue identifier (key or URL):
[A-Z]+-\d+ patternELSE IF user says "current issue", "this branch", "this ticket", or similar:
git branch --show-current[A-Z]+-\d+)ELSE:
Fetch Issue Using Script
bun {baseDir}/scripts/fetch-issue.ts \
--issue "EN-4526"
Report Result
The scripts/fetch-issue.ts script accepts:
Command line arguments:
# Using issue key:
bun fetch-issue.ts --issue "EN-4526"
# Using full URL:
bun fetch-issue.ts --issue "https://apheris.atlassian.net/browse/EN-4526"
The generated markdown file includes:
issues/
└── EN-4526/
├── issue.md # Main issue document
├── mockup.png # Downloaded attachment
├── requirements.pdf # Downloaded attachment
└── design-spec.docx # Downloaded attachment
IF: User provides issue key
THEN: Use directly
EXAMPLES:
--issue "EN-4526"IF: User provides full Jira URL
THEN: Extract issue key from URL
EXAMPLES:
--issue "https://apheris.atlassian.net/browse/EN-4526"IF: User refers to current branch/issue
THEN: Extract issue key from current git branch name
EXAMPLES:
git branch --show-current, extract [A-Z]+-\d+ patternfeature/EN-4526-add-user-auth → Extract: EN-4526--issue "EN-4526"IF: User mentions issue in conversation
THEN: Extract issue key and offer to fetch
EXAMPLES:
Set JIRA_DEBUG=true to save raw JSON responses:
issue.json - Raw issue datacomments.json - Raw comments datadevinfo.json - Raw development info (PRs)