link-ticket

A workflow that links a GitHub pull request—a proposed code change—to its Jira ticket using ticket IDs found in branch names or commits.

In plain words
What is it for?
Use it to find a ticket from the current branch or commit, link it to a pull request, and move the Jira ticket through matching statuses.
Why use it?
It keeps Jira status aligned with pull-request activity, so developers do not have to update both systems manually.

Command for Claude Code

Part of the claude-workflow plugin — 10 skills, 25 commands, 3 agents, 6 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/parkerm2/create-claude-workflow/link-ticket
Clone the repo
git clone --depth 1 https://github.com/ParkerM2/create-claude-workflow

Made for: Claude Code.

Or install claude-workflow, the plugin that ships this one along with the rest of its 10 skills, 25 commands, 3 agents, 6 hooks.

Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,369 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00017 $0.02369
Opus 5 $0.00009 $0.01184
Sonnet 5 $0.00003 $0.00474
Haiku 4.5 $0.00002 $0.00237

Measured 3d ago against content hash acb809947b6a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

link-ticket scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/link-ticket.md · 292 lines

How it starts

The opening of the file, as written. The whole thing — 292 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Auto-sync GitHub PRs to Jira tickets with intelligent status transitions based on branch patterns, PR state, and ticket availability.

Integration Points

  • Jira MCP: jira_get_issue, jira_change_issue_status, jira_get_transitions, jira_add_comment
  • GitHub MCP: Current branch detection, PR URL parsing
  • Memory: Project key storage, recent linkages
  • Anthropic Engineering Plugin: Deployment status updates (via status transitions)

Workflow Phases

Phase 1: Detection (Branch & Ticket Extraction)

Extract ticket identifiers from current context:

  1. Branch Pattern Parsing

    • Support patterns:
      • feature/DEV-1234-descriptionDEV-1234
      • fix/PROJ-567/bug-titlePROJ-567
      • DEV-1234/descriptionDEV-1234
      • DEV-1234DEV-1234
      • Commits with [DEV-1234]DEV-1234
    • Regex: ([A-Z][A-Z0-9]+-\d+)
    • Extract all matches, prioritize first occurrence
  2. Current Context Resolution

    • Try: current git branch → git commit message → provided argument
    • Command: git rev-parse --abbrev-ref HEAD
    • If no branch pattern, prompt user for ticket key or PR URL
  3. Project Key Inference

    • Extract from ticket (e.g., DEV-1234DEV)
    • Check memory for cached project keys
    • If new project, store in memory/project-keys.yaml

Verification Checklist:

  • Ticket key matches pattern [A-Z]+-\d+
  • Project key cached or inferrable
  • No ambiguous matches (e.g., two different projects in branch name)

Phase 2: Validation (Jira & GitHub)

Verify that ticket and (if applicable) PR exist:

  1. Jira Ticket Validation

    • Call jira_get_issue with extracted ticket key
    • If not found: Graceful degradation — log warning, ask user to create ticket or correct key
    • Extract ticket metadata: summary, status, type, assignee, current transitions
    • Store full issue data for Phase 4
  2. GitHub PR Detection (if applicable)

    • If user provides PR URL: validate format and existence
    • If linking existing PR: verify branch matches ticket pattern
    • Call GitHub API to get PR state (open/closed/merged)
    • Extract PR number, branch, creator

Read the full file on GitHub · 292 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 292 lines · 17 tokens per session scan A acb809947b6a

Subscribe to this mod's changes

link-ticket is a command published in the GitHub repository ParkerM2/create-claude-workflow (4 stars, last pushed 5mo ago), licensed MIT. It adds 17 tokens to every session and 2,369 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.