ensure-story-github-issue

Creates and links GitHub issues for story markdown files with board and epic synchronization.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Story documents in a PRD workflow need a corresponding GitHub issue that stays in sync with the story file, the project board, and the parent epic. Doing this by hand means creating the issue, adding it to the board, setting Priority and Estimate fields, linking it as a sub-issue, and writing the issue number back into frontmatter — steps that are easy to skip or duplicate. ## Core Features & Use Cases - Idempotent issue creation: Reads the story's YAML frontmatter, returns immediately if github_issue is already set, and runs a dedup title search before creating so reruns never produce duplicate issues. - Board and hierarchy sync: Adds the issue to the GitHub Project board, mirrors the story's priority and effort estimate onto board fields, and links the story issue as a sub-issue of the parent epic issue. - Frontmatter write-back: Writes github_issue into the story file and inserts a cross-reference link in the Story Information table, with a two-run convergence path for restricted access modes where mutations are deferred and recorded. - Use Case: During a /create-story or /review-story run, the calling skill sets STORY_FILE_PATH and EPIC_ISSUE_NUM, invokes this sub-routine, and receives STORY_ISSUE_NUM — the story ends up with a labeled, milestoned, board-tracked GitHub issue linked under its epic. ## Quick Start Set STORY_FILE_PATH to the story markdown file and EPIC_ISSUE_NUM to the parent epic issue number, then invoke this sub-routine from create-story or review-story to create and link the story's GitHub issue.

Frequently Asked Questions about ensure-story-github-issue

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

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

Set STORY_FILE_PATH to the story file and optionally EPIC_ISSUE_NUM, then let create-story or review-story invoke this sub-routine. It parses the frontmatter, creates the issue with a summary body and labels, and writes the issue number back as github_issue.

How does the skill avoid creating duplicate GitHub issues?▼

It first checks the story frontmatter for an existing github_issue value and returns immediately if present. Otherwise it runs a gh issue list title search for the story's bracketed identifier and adopts a single match instead of creating a new issue.

Can I invoke ensure-story-github-issue directly?▼

No. It is an internal sub-routine designed to be called by create-story and review-story, which set the input variables and branch on the resolved TRACKER platform. Direct invocation without those inputs will not work correctly.

Does it work with Jira instead of GitHub?▼

No. This sub-routine handles only the GitHub path; its sibling sync-jira-story handles Jira. Callers branch on the TRACKER value resolved by references/resolve-platform.sh to pick the correct sub-routine.

What happens when tracker access is restricted or read-only?▼

Mutations are deferred and recorded as NDJSON records instead of executed, and no placeholder issue number is written to frontmatter. An operator performs the recorded actions manually, writes the real issue number into the story, and re-runs to converge.

Why is the issue body written with --body-file instead of inline?▼

The body contains backticks, command substitutions, and newlines from story content, so an inline --body would be a shell injection risk. Writing to .claude/state/issue-body-file first removes the argv injection surface.