name: planExportGithub description: Export PROJECT_PLAN.md tasks as GitHub Issues
Plan Export to GitHub Issues
Export PROJECT_PLAN.md tasks as GitHub Issues with labels and dependencies.
Usage
/planExportGithub
Step 0: Load Configuration
function getConfig() {
if (fileExists("./.plan-config.json")) {
try { return JSON.parse(readFile("./.plan-config.json")) } catch {}
}
const globalPath = expandPath("~/.config/claude/plan-plugin-config.json")
if (fileExists(globalPath)) {
try { return JSON.parse(readFile(globalPath)) } catch {}
}
return { "language": "en" }
}
const config = getConfig()
const language = config.language || "en"
const t = JSON.parse(readFile(`../locales/${language}.json`))
Step 1: Read PROJECT_PLAN.md
If not found:
{t.commands.update.planNotFound}
{t.commands.update.runPlanNew}
Step 2: Check Prerequisites
Check GitHub CLI
gh --version
GitHub CLI Not Found Card:
╭──────────────────────────────────────────────────────────────────────────────╮
│ ❌ ERROR │
├──────────────────────────────────────────────────────────────────────────────┤
│ │
│ {t.commands.export.ghNotFound} │
│ │
│ {t.commands.export.ghInstall} │
│ {t.commands.export.ghUrl} │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
Check Authentication
gh auth status
Not Authenticated Card:
╭──────────────────────────────────────────────────────────────────────────────╮
│ ❌ ERROR │
├──────────────────────────────────────────────────────────────────────────────┤
│ │
│ {t.commands.export.ghNotAuth} │
│ │
│ 💡 {t.ui.labels.nextSteps} │
│ • {t.commands.export.ghAuthCommand} │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
Check Git Repository
git rev-parse --is-inside-work-tree
Not a Git Repository Card:
╭──────────────────────────────────────────────────────────────────────────────╮
│ ⚠️ WARNING │
├──────────────────────────────────────────────────────────────────────────────┤
│ │
│ Not a Git repository. │
│ │
│ To export to GitHub Issues: │
│ 1. Initialize a Git repo: git init │
│ 2. Create a GitHub repo: gh repo create │
│ 3. Or run this command in an existing Git repo │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
Step 3: Parse Project Data
Extract from PROJECT_PLAN.md:
- Project name
- All tasks (ID, name, status, complexity, estimate, dependencies, description)
- Phases
Step 4: Create Labels
Create these labels (if they don't exist):
phase-1,phase-2,phase-3,phase-4complexity-low,complexity-medium,complexity-highstatus-todo,status-in-progress,status-done,status-blockedplan-plugin
Step 5: Create Issues
For each task:
Issue Title Format
[Phase N] TX.Y: Task Name
Issue Body Format
## Task Details
**Phase**: [N] - [Phase Name]
**Complexity**: [Low/Medium/High]
**Estimated Effort**: [X] hours
**Status**: [TODO/IN_PROGRESS/DONE/BLOCKED]
## Description
[Full task description from plan]
## Dependencies
[List of dependency task IDs, or "None"]
---
*Exported from PROJECT_PLAN.md*
*Created by plan-plugin*
Create Issue Command
gh issue create \
--title "[Phase 1] T1.1: Project Setup" \
--body "$(cat <<'EOF'
[Issue body content here]
EOF
)" \
--label "phase-1,complexity-low,status-todo,plan-plugin"
Step 6: Show Progress
Success Card:
╭──────────────────────────────────────────────────────────────────────────────╮
│ ✅ SUCCESS │
├──────────────────────────────────────────────────────────────────────────────┤
│ │
│ GitHub Issues created! │
│ │
│ ── Created Issues ──────────────────────────────────────────────────────── │
│ │
│ ✅ [Phase 1] T1.1: Project Setup (#1) │
│ ✅ [Phase 1] T1.2: Database Setup (#2) │
│ ✅ [Phase 1] T1.3: Authentication (#3) │
│ ... │
│ │
│ ── Export Summary ──────────────────────────────────────────────────────── │
│ │
│ 📋 Total Issues Created: 18 │
│ │
│ 🏷️ Labels Created: │
│ • phase-1, phase-2, phase-3, phase-4 │
│ • complexity-low, complexity-medium, complexity-high │
│ │
├──────────────────────────────────────────────────────────────────────────────┤
│ │
│ 💡 View all issues: │
│ • gh issue list --label plan-plugin │
│ • https://github.com/user/repo/issues │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
Error Handling
GitHub CLI Error Card:
╭──────────────────────────────────────────────────────────────────────────────╮
│ ❌ ERROR │
├──────────────────────────────────────────────────────────────────────────────┤
│ │
│ gh command failed. │
│ │
│ [Error message from gh CLI] │
│ │
│ ── Possible Solutions ──────────────────────────────────────────────────── │
│ │
│ 1. Authenticate: gh auth login │
│ 2. Check repo access: gh repo view │
│ 3. Verify network connection │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯