一键导入
jira-create-epic-from-plan
Create a Jira epic and child tickets from a plan or spec, with dependency links, phase labels, and a bulk link script.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Create a Jira epic and child tickets from a plan or spec, with dependency links, phase labels, and a bulk link script.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Set up the restore-context hook so skills can resume workflows after /clear and /compact. Use when setting up a new project or after cloning a repo that uses restore-context skills.
Manage restore context files so skills can survive /clear and /compact. Use to write, delete, check, or list .agent-restore-context-* files.
Fetch Jira ticket, create branch, implement changes, commit, push, open PR.
Generate AI-assisted navigation aids to help humans start reviewing a pull request more efficiently. Use when starting a PR review to get oriented on large or unfamiliar changes.
Persist guidelines, conventions, and architectural decisions into the repository's knowledge base. Use when told to remember something for future sessions.
Perform migrations for Renovate dependency upgrades based on breaking changes identified in a review. Use after running /renovate-review.
| name | jira-create-epic-from-plan |
| description | Create a Jira epic and child tickets from a plan or spec, with dependency links, phase labels, and a bulk link script. |
| disable-model-invocation | false |
| argument-hint | [plan-file-path] [--dry-run] |
| allowed-tools | Bash, Grep, Glob, Read, Write, Agent |
You are a project planning specialist. This skill creates a Jira epic from a plan document, then creates child tickets under that epic, and generates dependency links between them.
Given a plan (markdown file, OpenSpec proposal, or inline description), this skill will:
Parse the request to determine the operation:
If no mode is specified, default to create.
FEC if not specifiedRead and analyze the plan to understand:
Generate a Markdown epic description from the plan: 1-2 sentence goal summary, key deliverables as bullets, and definition of done.
Suggest 3 epic names following the project's naming conventions. Existing epics use these patterns — match the style:
{Feature Area}: {goal} — e.g., "Design System: MCP Server"{Verb} {subject} — e.g., "Migrate to Jest 30", "Setup shared renovate config"{Feature Area} {noun phrase} — e.g., "Identity improvements"Use AskUserQuestion to let the user pick a number or type a custom name. Then
create the epic via mcp__atlassian__createJiraIssue with
issueTypeName: "Epic" and record the returned key as the parent for all child
tickets.
You MUST extract from the plan:
Each ticket MUST have:
| Field | Required | Description |
|---|---|---|
| summary | Yes | Short title — see Phase Title Format below |
| description | Yes | Markdown body with scope and acceptance criteria |
| issueType | Yes | Task, Story, or Spike |
| labels | Yes | Feature label + phase-task label — see Phase Labels below |
| component | No | Jira component if applicable |
When the plan contains multiple phases, you MUST include the phase number in every ticket summary. The format is:
{Feature Area} Phase {N}: {concise description of deliverables}
Examples:
AI Tooling Phase 1: Create mc-ai-tooling repo with templates; add new skills to agent-skillsAI Tooling Phase 2: Create /review skill in agent-skillsNimbus MCP Phase 1: Implement token flattener data processorNimbus MCP Phase 3: Add documentation generation endpointIf the plan has only a single phase (or no phases), omit the phase prefix and
use the standard {Feature Area}: {title} format.
When phases are present, each ticket MUST have a compound label combining the
phase number and task type, formatted as Phase-{N}:{task-type}. The task type
SHOULD be a short lowercase descriptor of the work category.
Examples:
Phase-1:infra — infrastructure or setup workPhase-1:rollout — deployment or rollout tasksPhase-2:skills — skill creation or updatesPhase-2:testing — test creation or coverage workPhase-3:docs — documentation tasksEach ticket MUST also retain the feature-area label (e.g., nimbus-mcp,
ai-tooling) alongside the phase-task label.
Every ticket description MUST follow this structure:
[Scope description — what needs to be built/done]
- Bullet points with specific deliverables
- Include file paths, API signatures, or config details where known
**Acceptance:**
- Concrete, verifiable acceptance criteria
- Testable conditions (not vague "works correctly")
You MUST NOT include:
Analyze the plan for sequencing relationships:
| Relationship | Jira link meaning | When to use |
|---|---|---|
| Sequential | A is predecessor of B | B cannot start until A completes |
| Data dependency | A is predecessor of B | B needs output/artifacts from A |
| Fan-out | A is predecessor of B, C, D | Multiple tickets depend on one |
| Fan-in | A, B, C are all predecessors of D | One ticket needs all others complete |
Create a table mapping all dependencies:
| Predecessor | Successor | Reason |
| ----------- | --------- | ------ |
| PROJ-XXXX | PROJ-YYYY | [why] |
Before creating or updating ANY tickets in Jira (including the epic), you MUST present a human-readable preview to the user and wait for explicit approval.
Display each ticket in a clear, scannable format:
## Ticket Preview — {N} tickets under {EPIC-KEY}
### 1. [{issueType}] {summary}
**Labels:** {label1}, {label2}
**Dependencies:** {predecessor tickets, or "None"}
{description text — full scope and acceptance criteria}
---
### 2. [{issueType}] {summary}
...
After the ticket list, include the dependency table:
## Dependency Map
| # | Predecessor | Successor | Reason |
| --- | ----------- | --------- | ------ |
| 1 | Ticket 1 | Ticket 3 | [why] |
You MUST pass all description fields as Markdown text, NOT Atlassian
Document Format (ADF). The Atlassian MCP tools accept plain Markdown strings and
handle conversion automatically. Sending ADF will result in malformed ticket
descriptions.
Use mcp__atlassian__createJiraIssue for each ticket:
cloudId: "commercetools.atlassian.net"
projectKey: <derived from epic>
issueTypeName: "Task" | "Story" | "Spike"
parent: <epic-key>
summary: "<Feature Area> Phase <N>: <title>"
description: <markdown description>
additional_fields:
labels: [<feature-label>, "Phase-<N>:<task-type>"]
components: [{"id": "<component-id>"}] # if applicable
The Atlassian MCP tool does NOT support creating issue links. The issuelinks
field requires the Jira REST API update mechanism, which the MCP tool's
fields parameter does not expose. This is a
known limitation.
Since the MCP tool cannot create issue links, generate a shell script that uses the Jira REST API directly.
The script MUST first query available link types from the instance:
curl -s \
-H "Authorization: Basic $AUTH" \
"$JIRA_HOST/rest/api/3/issueLinkType"
The Jira REST API outwardIssue/inwardIssue fields have unintuitive
semantics. The direction is:
inwardIssue = the predecessor (the ticket done first)outwardIssue = the successor (the ticket done after)This means for a link type with outward: "is predecessor of" and
inward: "is successor of":
inwardIssue displays the outward label ("is predecessor of")outwardIssue displays the inward label ("is successor of")Use the predecessor/successor link type, NOT "Blocks". Predecessor/successor conveys sequencing; "Blocks" implies a hard impediment.
Common Jira type names for predecessor/successor:
| Type name | outward | inward |
|---|---|---|
dependency | is predecessor of | is successor of |
Sequence | is predecessor of | is successor of |
Gantt: finish-start | has to be done before | has to be done after |
The script SHOULD default to dependency (the most common name at
commercetools) and accept an override via environment variable.
Generate the script at scripts/jira-link-{feature}.sh:
#!/usr/bin/env bash
# Creates predecessor/successor links for {feature} tickets.
#
# Usage:
# JIRA_EMAIL="you@example.com" JIRA_API_TOKEN="token" bash scripts/jira-link-{feature}.sh
#
# Get an API token at: https://id.atlassian.com/manage-profile/security/api-tokens
set -euo pipefail
JIRA_HOST="https://commercetools.atlassian.net"
LINK_API="$JIRA_HOST/rest/api/3/issueLink"
if [[ -z "${JIRA_EMAIL:-}" || -z "${JIRA_API_TOKEN:-}" ]]; then
echo "Error: Set JIRA_EMAIL and JIRA_API_TOKEN environment variables."
exit 1
fi
AUTH=$(printf '%s:%s' "$JIRA_EMAIL" "$JIRA_API_TOKEN" | base64)
LINK_TYPE="${JIRA_LINK_TYPE:-dependency}"
OK_COUNT=0
FAIL_COUNT=0
create_link() {
local predecessor="$1"
local successor="$2"
local reason="$3"
local status
status=$(curl -s -o /dev/null -w "%{http_code}" \
-X POST "$LINK_API" \
-H "Authorization: Basic $AUTH" \
-H "Content-Type: application/json" \
-d "{
\"type\": { \"name\": \"$LINK_TYPE\" },
\"inwardIssue\": { \"key\": \"$predecessor\" },
\"outwardIssue\": { \"key\": \"$successor\" }
}")
if [[ "$status" == "201" ]]; then
echo " OK $predecessor -> $successor ($reason)"
OK_COUNT=$((OK_COUNT + 1))
else
echo " FAIL[$status] $predecessor -> $successor ($reason)"
FAIL_COUNT=$((FAIL_COUNT + 1))
fi
}
# --- Links ---
# create_link PREDECESSOR SUCCESSOR "reason"
# --- Summary ---
# echo ""
# echo "=== Summary ==="
# echo " OK: $OK_COUNT"
# echo " FAIL: $FAIL_COUNT"
# echo " Total: $((OK_COUNT + FAIL_COUNT))"
chmod +x)((var++)) for counters — with set -e, post-increment
from 0 returns falsy and kills the script. Use var=$((var + 1)) instead.--cleanup flag to remove links from a prior bad
run (query each ticket's links, filter by type, DELETE each link ID)After creating tickets, you MUST update the plan/tickets markdown file to:
Before declaring done, verify:
inwardIssue = predecessor)dependency type (not Blocks)If links are created backwards (predecessor shows "is successor of"):
--cleanup flag to delete bad linkscreate_link function uses inwardIssue for predecessorJIRA_LINK_TYPE env var to the correct type nameSequence, Gantt: finish-start, Gantt DependencyThis is expected. The Atlassian MCP tool does not support the update mechanism
needed for issue links. Use the generated shell script instead.
The key words "MUST", "MUST NOT", "SHOULD", "SHOULD NOT", and "MAY" in this document are to be interpreted as described in RFC 2119.
Execute epic and ticket creation for: $ARGUMENTS