agentleFS
nathanchasenathanchase/claude-code-starter/.claude/skills/jira-attachments/SKILL.md

jira-attachments

Skill1 starsChanged 5 months agoMITView on GitHub

Fetch and view/analyze image and file attachments from a Jira ticket. Use when the user wants to see, describe, or analyze a screenshot/image/attachment on a Jira ticket, or references an image that only exists inside a ticket. Downloads the real bytes via the existing Atlassian MCP for metadata plus a personal API token for the binary, then reads the file so the image is actually viewable.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 1 is distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If a download fails with an auth error, the token/email/site are missing or wrong — stop and tell the user to set them.

    line 26
  2. Very specific:

    If attachment is empty, tell the user the ticket has no attachments and stop.

    line 38
  3. Very specific:

    If the user named a specific file, filter by filename.

    line 39
  4. Very specific:

    Use the real session scratchpad directory for <scratchpad>.

    line 49
  5. Very specific:

    not: use the content URL from metadata verbatim — it points at api.atlassian.com/ex/jira/..., which only accepts OAuth Bearer, not the API …

    line 59
  6. Distinctive:

    Only the byte download uses the token.

    line 61

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Jira attachments

The official Atlassian MCP returns attachment metadata (id, filename, mimeType, a content URL) but has no tool that returns the bytes — and its OAuth token can't be borrowed. This skill closes that gap: metadata comes from the MCP (existing auth), and the binary is downloaded with a personal Atlassian API token, then read from disk so the image is genuinely viewable (not just base64 text).

Prerequisites (one-time)

The download step needs these in the shell profile (~/.zshrc or a sourced file):

export ATLASSIAN_EMAIL="you@example.com"          # email on your Atlassian account
export ATLASSIAN_API_TOKEN="…"                     # id.atlassian.com/manage-profile/security/api-tokens
export ATLASSIAN_SITE="your-site.atlassian.net"    # your Jira Cloud site host

If a download fails with an auth error, the token/email/site are missing or wrong — stop and tell the user to set them; do not go hunting for credentials elsewhere.

Steps

  1. Resolve the ticket. Accept a ticket key (e.g. ABC-1234) or an issue URL. Determine the cloudId for the site by calling getAccessibleAtlassianResources (do not hardcode it — it differs per site).
  2. Get attachment metadata via the MCP (no token needed): getJiraIssue(cloudId, issueIdOrKey, fields:["summary","attachment"]). Each attachment gives id, filename, mimeType, size, content.
    • If attachment is empty, tell the user the ticket has no attachments and stop.
    • If the user named a specific file, filter by filename; otherwise take all image/* attachments (offer to include non-images too).
  3. Download each wanted attachment into the session scratchpad using the helper — pass the attachment id (the script builds the correct site-URL form itself):

    bash ~/.claude/skills/jira-attachments/fetch-attachment.sh <attachment_id> "<scratchpad>/<filename>"

    Use the real session scratchpad directory for <scratchpad>. The script prints saved: <path> (<mime>, <bytes>) on success and exits non-zero with the response body on failure.

  4. View it. Read each saved file — image files render visually — then answer the user's actual question (describe the UI, extract the error text, compare to code, etc.).

Notes

  • Download uses https://<site>/rest/api/3/attachment/content/<id> with Basic auth. Do not use the content URL from metadata verbatim — it points at api.atlassian.com/ex/jira/..., which only accepts OAuth Bearer, not the API token.
  • Only the byte download uses the token; all metadata stays on the MCP.
  • Files land in the scratchpad, so no cleanup is required and nothing enters the repo.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.