jira-workflow
This Jira workflow orchestration skill manages the complete lifecycle of Jira issues in Next-Gen projects, from story proposal through approval to completion. Use it when creating user stories with SAFe formatting, obtaining stakeholder approval before issue creation, transitioning items through custom workflow states (To Do, In Review, Progressing, Out Review, Done), and syncing Claude Code task completion back to Jira status updates.
git clone --depth 1 https://github.com/aiskillstore/marketplace /tmp/jira-workflow && cp -r /tmp/jira-workflow/skills/01000001-01001110/jira-workflow ~/.claude/skills/jira-workflowSKILL.md
# Jira Workflow Orchestration Skill
> Complete workflow management for Jira: building stories (SAFe), getting approvals, and transitioning items through the development lifecycle (To Do → Progressing → Done).
**IMPORTANT**: This project uses Next-Gen (Team-managed) Jira with custom workflow states. The actual states are:
- `To Do` (backlog)
- `In Review`
- `Progressing` (active work)
- `Out Review`
- `Done`
Always query available transitions first: `GET /rest/api/3/issue/{key}/transitions`
## When to Use
- Creating new user stories, epics, or tasks for the project
- Getting user approval before creating Jira items
- Moving stories through workflow states as work progresses
- Syncing Claude Code task completion with Jira status
- Managing sprint planning and backlog refinement
- Tracking development progress in real-time
## Prerequisites
**Environment Variables:**
```bash
JIRA_EMAIL=your.email@domain.com
JIRA_API_TOKEN=your_api_token
JIRA_BASE_URL=https://your-org.atlassian.net
JIRA_PROJECT_KEY=SCRUM
JIRA_BOARD_ID=1
```
**Project Configuration:**
- Must know if project is Next-Gen (Team-managed) or Classic (Company-managed)
- Next-Gen: Use `parent` field for Epic links
- Classic: Use `customfield_10014` for Epic links
---
## Core Workflow Pattern
### The Approval-Create-Track Loop
```
1. PLAN: Analyze task requirements
↓
2. PROPOSE: Present story to user for approval
↓
3. APPROVE: User confirms or modifies
↓
4. CREATE: Issue created in Jira backlog
↓
5. START: Transition to "Progressing" when work begins
↓
6. COMPLETE: Transition to "Done" when work verified
↓
7. SYNC: Update Jira with implementation details
```
---
## Phase 1: Story Building (SAFe Format)
### Building a Story Proposal
When user requests work, build a SAFe-compliant story proposal:
```javascript
function buildStoryProposal(task) {
return {
summary: `As a ${task.persona}, I want ${task.goal}, so that ${task.benefit}`,
description: {
userStory: `As a **${task.persona}**, I want **${task.goal}**, so that **${task.benefit}**.`,
acceptanceCriteria: task.scenarios.map(s => ({
name: s.name,
given: s.given,
when: s.when,
then: s.then
})),
definitionOfDone: [
'Code reviewed and approved',
'Unit tests written and passing',
'Integration tests passing',
'Documentation updated',
'Deployed to staging',
'Validated in production'
],
technicalNotes: task.technicalNotes || []
},
category: task.category, // authentication, ui, api, database, etc.
estimatedComplexity: task.complexity || 'medium', // small, medium, large
subtasks: task.subtasks || []
};
}
```
### Presenting for Approval
**CRITICAL: Always get user approval before creating Jira items.**
Use this prompt pattern:
```markdown
## Proposed Jira Story
**Summary:** As a [persona], I want [goal], so that [benefit]
**Category:** [category]
**Complexity:** [small/medium/large]
### Acceptance Criteria
**Scenario 1: [Name]**
- **GIVEN** [precondition]
- **WHEN** [action]
- **THEN** [expected result]
### Subtasks (if any)
1. [Subtask 1]
2. [Subtask 2]
3. [Subtask 3]
---
**Do you want me to create this in Jira?**
Options:
1. **Yes, create as-is** - I'll create the story now
2. **Modify** - Tell me what to change
3. **Skip** - Don't create in Jira, just do the work
```
---
## Phase 2: Issue Creation
### Create Story in Jira
```javascript
const JIRA_EMAIL = process.env.JIRA_EMAIL;
const JIRA_API_TOKEN = process.env.JIRA_API_TOKEN;
const JIRA_BASE_URL = process.env.JIRA_BASE_URL;
const PROJECT_KEY = process.env.JIRA_PROJECT_KEY;
const auth = Buffer.from(`${JIRA_EMAIL}:${JIRA_API_TOKEN}`).toString('base64');
const headers = {
'Authorization': `Basic ${auth}`,
'Content-Type': 'application/json',
'Accept': 'application/json'
};
async function createStory(proposal, epicKey = null) {
const body = {
fields: {
project: { key: PROJECT_KEY },
issuetype: { name: 'Story' },
summary: proposal.summary,
description: buildADF(proposal.description),
labels: [proposal.category.toLowerCase().replace(/\s+/g, '-')]
}
};
// Link to Epic (Next-Gen project)
if (epicKey) {
body.fields.parent = { key: epicKey };
}
const response = await fetch(`${JIRA_BASE_URL}/rest/api/3/issue`, {
method: 'POST',
headers,
body: JSON.stringify(body)
});
if (!response.ok) {
const error = await response.text();
throw new Error(`Failed to create story: ${error}`);
}
const issue = await response.json();
console.log(`Created: ${issue.key} - ${proposal.summary}`);
// Create subtasks if any
if (proposal.subtasks?.length > 0) {
for (const subtask of proposal.subtasks) {
await createSubtask(issue.key, subtask);
await delay(100); // Rate limiting
}
}
return issue;
}
async function createSubtask(parentKey, summary) {
const body = {
fields: {
project: { key: PROJECT_KEY },
issuetype: { name: 'Subtask' }, // Note: 'Subtask' for Next-Gen
parent: { key: parentKey },
summary: summary
}
};
const response = await fetch(`${JIRA_BASE_URL}/rest/api/3/issue`, {
method: 'POST',
headers,
body: JSON.stringify(body)
});
if (!response.ok) {
const error = await response.text();
throw new Error(`Failed to create subtask: ${error}`);
}
return response.json();
}
function delay(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
```
### Build Atlassian Document Format (ADF)
```javascript
function buildADF(content) {
const sections = [];
// User Story Section
sections.push({
type: 'heading',
attrs: { level: 2 },
contentLet Codex use Google Antigravity CLI (agy) for repository exploration, bounded feature work, and project-scale implementation. Use when a Codex task benefits from delegated repository work while Codex retains diff review, verification, repair, and delivery assurance.
Use when replying. Refresh current date and time.
Create polished, validated architecture, workflow, sequence, data-flow, and lifecycle/state diagrams as explorable standalone HTML with inline SVG, dark/light themes, optional trace motion, and PNG/JPEG/WebP/SVG/WebM export. Accept plain-language requirements or pasted Mermaid flowchart, sequenceDiagram, and stateDiagram input; inspect repository evidence when the diagram must reflect real code. Use when the user asks to visualize system architecture, infrastructure, cloud/security/network topology, technical workflows, API call sequences, request lifecycles, data pipelines, ETL/ELT, data lineage, state machines, or to convert/beautify Mermaid.
Design systems, plan implementations, review architecture decisions - Use when you need to plan a complex feature, design system architecture, or make high-level technical decisions.
Use when automating iOS Simulator interactions, capturing screenshots/video, or inspecting accessibility via AXe CLI.
Use when working with Canton Network participants, DAML smart contracts, Splice applications, or debugging LF version and package ID issues.
>
HSK4級レベルから流暢さを目指す学習者向け。中国語表現の使用場面・自然さを分析し、作文を「ネイティブらしい流暢な表現」に改善。bilibili等のコンテンツ理解とネイティブとの会話をサポート。実際の用例をWeb検索で提示