get-ticket-id

Extract Jira-style ticket IDs from branch names and commit messages.

1|1|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/williamthorsen/codeassembly --skill get-ticket-id-williamthorsen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: get-ticket-id
Source: https://github.com/williamthorsen/codeassembly/tree/main/packages/agents/content/skills/get-ticket-id
Command: npx skills add https://github.com/williamthorsen/codeassembly --skill get-ticket-id-williamthorsen

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Developers working in ticket-driven workflows need a consistent ticket identifier for naming artifacts, sessions, and directories, but branch names and commit messages vary widely in format. This Skill resolves a canonical ticket ID from the current Git context without manual parsing. ## Core Features & Use Cases - Branch-based extraction: Parses Jira-style IDs (e.g., ABC-123) from branch names regardless of separator style or author/scope prefixes, with a bare-issue-number fallback formatted via the ticket_ref_prefix preference. - Commit-based extraction: Greps commit messages for the ticket pattern and uppercases the result. - Context resolution: Combines branch and commit results using a decision table, flagging conflicts for developer confirmation. - Use Case: When starting an agent session on branch feat/COMPPLAN-795-add-foo, resolve the ticket ID COMPPLAN-795 to name the session's artifact directory. ## Quick Start Ask the agent to extract the ticket ID from the current branch or commit context.

Frequently Asked Questions about get-ticket-id

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract a Jira ticket ID from a Git branch name?

Run the get-ticket-id.sh script with an optional branch name, defaulting to the current branch. It matches the case-insensitive Jira pattern (two or more letters, hyphen, digits) anywhere in the name and returns the uppercased ID, or an empty string if none is found.

How to get a ticket ID from a commit message in Git?

Pipe the commit subject through grep with the pattern [A-Z]{2}-[0-9]+ using case-insensitive matching, take the first match, and uppercase it. The Skill's from-commit argument does this for HEAD or any specified ref.

What happens when a branch name has no Jira-style ticket ID?

The script falls back to a bare issue number anchored at the start of the branch name. It then reads project.ticket_ref_prefix from .agents/preferences.yaml to format the result, returning the bare number, a prefixed ID like MAC-147, or the number alone when the prefix is #.

Why does a branch like feat-2 produce a ticket ID?

The Jira-style pattern is unanchored and case-insensitive, so kebab-case words followed by digits match and are uppercased, yielding IDs like FEAT-2. This behavior is intentional per the extraction contract shared with the session-context deriver.

Does the extraction handle PR identifiers without backing tickets?

Yes, PR-<n> identifiers like PR-123 match the two-letter prefix pattern and resolve as valid IDs, supplying a branch name and artifact directory. The session-context deriver treats them as non-tickets and builds no ticket URL for them.