ensure-story-jira-issue

Ensures a story markdown file has a corresponding Jira issue, creating it via sync-jira-story when missing.

2|Updated Feb 14, 2026
One-click install
npx skills add https://github.com/Gamaroff/agent-skills --skill ensure-story-jira-issue-gamaroff
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ensure-story-jira-issue
Source: https://github.com/Gamaroff/agent-skills/tree/main/skills/ensure-story-jira-issue
Command: npx skills add https://github.com/Gamaroff/agent-skills --skill ensure-story-jira-issue-gamaroff

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Story documents in a PRD/epic/story pipeline can drift out of sync with Jira — a story may exist as markdown but have no matching Jira issue, leaving the tracker board incomplete. This internal sub-routine closes that gap by checking the story's frontmatter for a Jira key and creating the issue when absent, so create-story and review-story always end with a linked tracker ticket. ## Core Features & Use Cases - Idempotent issue verification: Reads the story frontmatter's jira_key and verifies the issue still exists via the Atlassian MCP getJiraIssue tool, distinguishing 404 deletions from transient network errors. - Delegated creation: When no key exists, it writes the parent epic link into frontmatter and delegates creation, epic linkage, backlog add, and ADF rendering to the sync-jira-story script, then captures the freshly written jira_key and jira_url. - Non-blocking failure handling: Every failure path (missing file, auth error, non-Jira tracker) returns an empty STORY_JIRA_KEY with an appropriate log level so the calling pipeline continues. - Use Case: During a create-story run on a Jira-tracked project, this sub-routine runs automatically after the story file is written, producing a linked Jira issue (e.g. PROJ-123) recorded in the story frontmatter. ## Quick Start Invoke the create-story or review-story skill on a story markdown file in a Jira-configured project and this sub-routine will ensure the corresponding Jira issue exists.

Frequently Asked Questions about ensure-story-jira-issue

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

FAQPage Schema
How do I create a Jira issue from a story markdown file?▼

Run the create-story or review-story skill, which calls this sub-routine automatically. It reads the story frontmatter, delegates creation to the sync-jira-story script with the file path, and writes the resulting jira_key and jira_url back into the frontmatter.

What happens if the Jira issue linked in frontmatter was deleted?▼

A 404 from the getJiraIssue verification is treated as critical: the sub-routine logs that the issue may have been deleted, returns an empty STORY_JIRA_KEY, and does not silently re-create it, because that would orphan the original Jira issue.

Can I invoke ensure-story-jira-issue directly as a slash command?▼

No. It is an internal sub-routine designed to be called by create-story and review-story, which set the required inputs (STORY_FILE_PATH, EPIC_JIRA_KEY, TRACKER) before invocation. Direct invocation lacks this caller context.

Does this work with GitHub-tracked projects?▼

No. It is Jira-only: when TRACKER is not jira it exits immediately with an informational message and an empty output. GitHub projects use the sibling sub-routine ensure-story-github-issue instead, selected by the caller based on TRACKER.

Why does story Jira creation fail with an auth error?▼

Creation delegates to sync-jira-story, which needs JIRA_URL plus Atlassian MCP credentials. If delegation exits non-zero or reports missing auth, the sub-routine logs a warning and returns an empty key without blocking the calling pipeline.