Generate Jira tickets from discussions, PRs, issues, or files
Generate Jira tickets from discussions, PRs, issues, or files. Creates high-level, copy-paste ready Jira issues from any source reference.
/plugin marketplace add chmouel/claude-code-plugins/plugin install jira-ticket@chmouel-cc-pluginsreferenceCreate a high-level Jira issue from a discussion, PR, issue, file, or conversation.
Arguments: $ARGUMENTS (required)
Goal: Identify what the argument references and gather relevant context
Actions:
Create a todo list with all phases:
Mark Phase 1 as in_progress
Analyze $ARGUMENTS to determine the type:
https://github.com/owner/repo/pull/123):
gh pr view <number> -R owner/repohttps://github.com/owner/repo/issues/456):
gh issue view <number> -R owner/repogh pr view $ARGUMENTS firstgh issue view $ARGUMENTSgh issue view ${ARGUMENTS#\#}gh pr view <number>git log --format="%h %s%n%b" $ARGUMENTSGather the context based on the identified type:
Present a brief summary of gathered context to confirm with user:
**Context Gathered**:
Type: [PR/Issue/File/Commits/Conversation]
Source: [specific reference]
Summary: [1-2 sentence summary]
Proceeding to generate Jira issue...
Mark Phase 1 as completed, Phase 2 as in_progress
Error Handling:
Goal: Create a high-level Jira issue following the template
Actions:
Using the gathered context, generate a Jira issue that:
Generate a recommended title (one line, descriptive, under 100 characters)
Use this Jira template structure:
h1. Story (Required)
As a <PERSONA> trying to <ACTION> I want <THIS OUTCOME>
_<Describes high level purpose and goal for this story. Answers the questions: Who is impacted, what is it and why do we need it? How does it improve the customer's experience?>_
h2. *Background (Required)*
_<Describes the context or background related to this story>_
h2. *Out of scope*
_<Defines what is not included in this story>_
h2. *Approach (Required)*
_<Description of the general technical path on how to achieve the goal of the story. Include details like json schema, class definitions>_
h2. *Dependencies*
_<Describes what this story depends on. Dependent Stories and EPICs should be linked to the story.>_
h2. *Acceptance Criteria (Mandatory)*
_<Describe edge cases to consider when implementing the story and defining tests>_
_<Provides a required and minimum list of acceptance tests for this story. More is expected as the engineer implements this story>_
IMPORTANT Guidelines:
Mark Phase 2 as completed, Phase 3 as in_progress
Goal: Validate the generated issue and get user approval
Actions:
Validate that all required fields are filled:
Present the generated Jira issue to the user:
**Recommended Title**:
[Generated title]
**Jira Issue Body**:
[Show the full generated Jira issue in a code block]
Ask user: "Does this Jira issue look good? Should I save it to a file?"
WAIT FOR USER RESPONSE
If user wants changes:
If user approves:
If user rejects:
Error Handling:
Goal: Save the Jira issue to a file with a smart filename
Actions:
Generate a filename slug from the title:
.md extensionAsk user for save location using AskUserQuestion tool:
/tmp/jira-[slug].md./jira-[slug].mdSave the file to the chosen location:
<!-- Generated by Claude Code jira-ticket plugin -->
<!-- Source: [context source] -->
<!-- Date: [current date] -->
Report success to user:
✓ Jira issue saved successfully!
**File**: [full path to saved file]
**Title**: [recommended title]
**Next Steps**:
1. Review the file: `cat [path]`
2. Copy to clipboard: `cat [path] | pbcopy` (macOS) or `cat [path] | xclip -selection clipboard` (Linux)
3. Paste into Jira and use the recommended title above
Mark Phase 4 as completed
Error Handling: