agentleFS
Lukk17Lukk17/agent-standards/.agents/skills/jira-integration/SKILL.md

jira-integration

Skill1 starsChanged 59 days agoMITView on GitHub

Jira mechanics from a coding session: fetching an issue and its comments, running JQL, adding progress comments, transitioning status through the project workflow, and linking branches back to the key, through the Atlassian MCP server or the REST v3 API. Use when you say "pull up PROJ-1234", "move this ticket to In Review", "comment the PR link on the ticket", or "find my open issues this sprint". Not for how a work item should be written or closed, use `project-tracking`.

  • Sends data out

6 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 6 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    No MCP configuration file in this repository declares a Jira server.

    line 37
  2. Distinctive:

    Create the token at the Atlassian account security page, store it in the environment or a secrets manager, and scope it to the projects you …

    line 58
  3. Distinctive:

    Read the available transitions:

    line 104
  4. Distinctive:

    Create or modify an issue only when the user asked for it, and create each new issue only after the user approved that one issue.

    line 175
  5. Distinctive:

    Every row below is a proposal, not an action.

    line 198
  6. Distinctive:

    Keep each comment short and link outward rather than pasting content.

    line 209

“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “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 Integration

How to talk to Jira from a coding session: authenticate, read an issue, act on it, and record progress against it. The content rules for a work item, what it should say and when it may close, live in project-tracking, and this skill defers to them rather than restating them.


When to activate

  • Fetching a Jira issue to understand what is being asked
  • Searching for issues with a JQL query
  • Adding a progress comment to an issue during or after implementation
  • Transitioning an issue through the project workflow
  • Linking a branch, pull request or merge request back to an issue key
  • Diagnosing a failing Jira call, such as a 401 or a rejected transition

When not to activate

  • Deciding what an item should contain, how it is sized, or when it may close, use project-tracking
  • Operating GitHub issues, pull requests and releases, use github-ops
  • Naming the branch or writing the commit message that carries the key, use git-workflow
  • Writing the tests the acceptance criteria imply, use tdd-workflow or the language test skill
  • Reviewing the code the ticket produced, use code-reviewer

Add Atlassian's remote MCP server yourself

No MCP configuration file in this repository declares a Jira server. The MCP tools below come from Atlassian's own remote MCP server, which each user adds to the MCP file or command their agent tool uses, following Getting started with the Atlassian MCP Server. Atlassian hosts it, so there is no package to install or pin. It signs in through an OAuth 2.1 browser flow, or through an API token in an Authorization header for a headless client.

One rule holds regardless of tool. A token comes from the process environment or a secrets manager, never as a literal value inside a configuration file that can be committed.

Pass:

Server added with the OAuth sign-in. No token in any committed file.

Fail:

{"headers": {"Authorization": "Basic the-real-token-pasted-into-a-committed-file"}}

Create the token at the Atlassian account security page, store it in the environment or a secrets manager, and scope it to the projects you actually need. Rotate it immediately if it ever reaches git history.


Fall back to REST v3 when no MCP server is available

The REST API answers the same questions over curl. It needs the same three environment variables.

VariableWhat it holds
JIRA_URLThe instance base URL
JIRA_EMAILThe Atlassian account email
JIRA_API_TOKENThe API token, from the environment only

Validate that all three are set before the first call and fail with a clear message if not, because an unset variable produces a 401 that reads like a permissions problem.


Know which MCP tool answers which question

ToolUse it for
searchJiraIssuesUsingJqlJQL queries across a project
getJiraIssueFull detail for one key
createJiraIssueCreating a Task, Bug, Story or Epic
editJiraIssueChanging summary, description or assignee
listJiraIssueTransitionsThe transitions valid for this issue right now
transitionJiraIssueMoving status
addOrEditJiraIssueCommentProgress updates
getJiraBoardSprintDataEverything in the active sprint of a board
createJiraIssueLinkBlocks, relates to, duplicates

These names come from Atlassian's supported tools page. A client connected before the current server version can still list older names, such as getTransitionsForJiraIssue and addCommentToJiraIssue, so call the name the connected server actually lists.


Read a transition ID before transitioning

Transition IDs are per project workflow and change between projects, so an ID that worked on one board fails on the next. Ask for the available transitions first, match on the name, then execute.

Read the available transitions:

curl -s -u "$JIRA_EMAIL:$JIRA_API_TOKEN" "$JIRA_URL/rest/api/3/issue/PROJ-1234/transitions" | jq '.transitions[] | {id, name}'

Then execute the one you matched:

curl -s -X POST -u "$JIRA_EMAIL:$JIRA_API_TOKEN" -H "Content-Type: application/json" -d '{"transition": {"id": "31"}}' "$JIRA_URL/rest/api/3/issue/PROJ-1234/transitions"

Pass:

Fetched transitions, "In Review" is id 31 on this board, transitioned with 31.

Fail:

Used transition id 21 because that was "In Review" on the last project.

Fetch an issue with the fields you need

curl -s -u "$JIRA_EMAIL:$JIRA_API_TOKEN" "$JIRA_URL/rest/api/3/issue/PROJ-1234" | jq '{key, summary: .fields.summary, status: .fields.status.name, type: .fields.issuetype.name, labels: .fields.labels, description: .fields.description}'

Fetch the comment thread separately, because it is large and usually not needed:

curl -s -u "$JIRA_EMAIL:$JIRA_API_TOKEN" "$JIRA_URL/rest/api/3/issue/PROJ-1234?fields=comment" | jq '.fields.comment.comments[] | {author: .author.displayName, created: .created[:10], body: .body}'

Search with JQL:

curl -s -G -u "$JIRA_EMAIL:$JIRA_API_TOKEN" --data-urlencode "jql=project = PROJ AND status = 'In Progress'" "$JIRA_URL/rest/api/3/search"

Post a comment in Atlassian document format

The v3 comment endpoint takes a structured document, not a plain string. A plain string is rejected with a 400 that does not say why.

curl -s -X POST -u "$JIRA_EMAIL:$JIRA_API_TOKEN" -H "Content-Type: application/json" -d '{"body":{"version":1,"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"Branch feat/PROJ-1234 pushed."}]}]}}' "$JIRA_URL/rest/api/3/issue/PROJ-1234/comment"

Pass:

Comment body wrapped in the doc structure with a paragraph node.

Fail:

{"body": "Branch pushed."}

Write the parent and labels, and only the other fields the user named

Create or modify an issue only when the user asked for it, and create each new issue only after the user approved that one issue. A new issue always gets its parent epic and the labels the project's tracking conventions require: at least one area label and at most one nature-of-work label, taken only from the project's own documented label list and never invented. Every other field, meaning priority, components, sprint and assignee, is set only when the user names it. Adding one of those on your own edits somebody else's board, and the change is invisible until a filter returns the wrong set. Take the description template from the tracker rather than inventing one.

Pass:

Asked for a bug in PROJ with that summary and description. Created it with those two fields, the parent epic and the area label from the project's list.

Fail:

Created it with no parent, invented a "misc" label, and added priority High and the current sprint, since that seemed right.

Propose updates as you go, at the points that carry information

Every row below is a proposal, not an action. Tell the user the transition or the comment you would make, and run it only after they approve that one action.

Moment in the workWhat to propose for the issue
Work startsTransition to the in-progress status
Branch createdComment with the branch name
Tests writtenComment with what they cover
Pull request openedComment with the link, and link the issue
Pull request mergedTransition to the next status in the workflow

Keep each comment short and link outward rather than pasting content. A comment that reproduces a test report goes stale the moment the report is regenerated, and a link never does.

Pass:

PR opened: <link>. 6 tests added covering the 429 path. Ready for review.

Fail:

[400 lines of pasted test output]

Defer the content of the item to project-tracking

What a good acceptance criterion looks like, how to size and split an item, which label taxonomy is allowed, and what has to be true before an item closes are all owned by project-tracking. Read that skill before you write a description, criteria or a closure comment, and use this skill only for getting that content into and out of Jira.

Where criteria are vague, ask before writing code rather than inventing an interpretation, and check linked issues first so you understand the full scope of the feature.


Troubleshooting

SymptomCauseFix
401 UnauthorizedToken invalid, expired, or not exported into the agent's processCheck the environment, regenerate if needed
403 ForbiddenToken lacks permission on that projectCheck token scope and project access
404 Not FoundWrong key or wrong base URLVerify JIRA_URL and the issue key
400 on a commentBody sent as a plain stringWrap it in the Atlassian document structure
Transition rejectedID belongs to a different workflowRead the transitions for this issue first
Connection timeoutNetwork or VPNCheck VPN and firewall rules
MCP tools missing or asking to sign inServer URL not in the agent's MCP file, or the OAuth sign-in never finishedAdd the remote server URL, then finish the browser sign-in

Related skills

  • project-tracking owns item kinds, sizing, acceptance criteria, labels, statuses and closure rules
  • github-ops owns the same operational surface when the tracker is GitHub issues
  • git-workflow owns branch naming and commit messages that carry the issue key
  • code-reviewer owns reviewing the change the issue produced
  • security-review owns handling and rotation of the API token itself

Checklist

  • Credentials come from the process environment, never a literal in a config file
  • The MCP server is declared in the file the running tool actually reads
  • Each MCP tool called is one the connected server actually lists
  • Every transition and comment ran only after the user approved that one action
  • Transitions were read for this issue before one was executed
  • A new issue carries its parent epic and the required labels from the project's list
  • Every other field written was one the user named
  • Comments link outward rather than pasting reports
  • Item content follows project-tracking, not conventions invented here

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.