Install
npx skillscat add brandonocasey/dotfiles/jira-versions Install via the SkillsCat registry.
SKILL.md
The Atlassian MCP and acli cannot manage versions. Use jira-api
(~/.local/bin/jira-api). It calls the Jira Cloud REST API v3 with curl.
Setup
JIRA_EMAILcomes from the environment (Claude and Codex set it). Never prefix it on
the command line. When unset, stop and say so.- Set
JIRA_SITEwhen the site is not thejira-apidefault. - The token comes from
JIRA_API_TOKENorpass show api/jira. - Check auth:
jira-api GET /myself(expectHTTP 200). ItsaccountIdis
the current user.
Project facts
Read the project key and the version-name format from the repository's
AGENTS.md, AGENTS_PROJECT.md, or skill config. Get projectId fromGET /project/<KEY> (.id).
Commands
Every command is jira-api <METHOD> <path> [json].
- List versions:
GET /project/<KEY>/versions - Read one:
GET /version/<id> - Create:
POST /version '{"name":"<name>","projectId":<id>,"description":"Created <YYYY-MM-DD> at the request of <name>."}' - Rename or edit:
PUT /version/<id> '{"name":"...","description":"..."}' - Release:
PUT /version/<id> '{"released":true,"releaseDate":"<YYYY-MM-DD>","driver":"<accountId>"}'
(driver: the current user'saccountId). - Archive:
PUT /version/<id> '{"archived":true}' - Delete:
DELETE /version/<id>(irreversible).
Output ends with HTTP <code>. 201 means created, 200 means ok.
Move a ticket or MR to a version
- For an MR/PR number, find the ticket key in its title, branch, or
description:glab api "projects/:id/merge_requests/<iid>"orgh pr view <n> --json title,headRefName,body. - Make sure the target version exists (
GET /project/<KEY>/versions).
If not, create it first. - Read the ticket's
fixVersions. Remove only the unreleased source version.
Add the target and keep all other versions. To take a ticket out of the
release, remove only the named version and add none. - Write the new list with the Atlassian MCP
editJiraIssue
(fields: {"fixVersions": [{"name": "<name>"}, ...]}). This field replaces
the full list. - If the project labels MRs/PRs by release, change the label. Get the label
format from the project's release skill or docs. GitLab:glab api --method PUT "projects/:id/merge_requests/<iid>" -f "add_labels=<label>" -f "remove_labels=<old>".
GitHub:gh pr edit <n> --add-label <label> --remove-label <old>.
Omit removal when the source label is absent or equals the target label.
Other platforms are unsupported: tell the user and skip this step. - Read the ticket and any changed MR/PR again to check the result.
Rules
- Before moving a ticket, check which MR/PR is merged. Merged work stays in
the version it shipped in. - Creating or editing a version is visible to the whole team. Delete needs
user approval. A user request to release a version authorizes the release only, not a delete.