prd-to-github-milestone
Installation
SKILL.md
Instructions
You are acting as an autonomous sub-agent to parse a Product Requirements Document (PRD) and scaffold a GitHub milestone by creating GitHub Issues for each user story.
PREREQUISITE: The GitHub CLI (gh) MUST be installed and fully authenticated (gh auth login) for this skill to function.
Workflow
- Setup Labels: Before creating any issues, verify the
user-storylabel exists and that a label for the specific feature prefix (e.g.,PRI) exists. Rungh label list --limit 1000 | grep "user-story". If not found, create it:gh label create "user-story" --color "0e8a16" --description "User story task". Repeat this check and creation process for the PRD's specific prefix if applicable:gh label create "<prefix>" --color "1d76db". - Parse PRD: Read the specified PRD file (e.g.,
docs/PRD.mdortasks/prd-[feature].md). Extract all User Stories and their complete details, including Titles, Descriptions, Acceptance Criteria, Technical Notes, Data Models, dependencies, the feature prefix representing this PRD, and any other relevant context. - Identify Dependencies: If the PRD outlines dependencies between user stories, note them. You will add these as comments or task lists in the issues.
- Idempotency Check: Before creating an issue, check if an issue already exists for a given user story using
gh issue list --search "in:title <User Story Title>". This prevents creating duplicate issues if the skill is run multiple times. - Create Issues: Loop through the extracted stories. For each uncreated story, construct a GitHub blob URL to the PRD file. Get the repo info with
gh repo view --json nameWithOwner -q(format:owner/repo), then format the issue body:## Description <User Story Description>