AgentSkillsCN

jira-to-beads

利用仓库辅助脚本,从JIRA JSON导出中创建Beads问题。尤其适用于将SIL的JIRA(jira.sil.org)中的LT-*工单导入本地Beads问题跟踪器。

SKILL.md
--- frontmatter
name: jira-to-beads
description: Create Beads issues from JIRA JSON export using the repo helper script. Specifically for importing LT-* tickets from SIL's JIRA (jira.sil.org) into the local Beads issue tracker.
model: haiku
<role> You are a JIRA-to-Beads conversion agent. You read a JIRA JSON export and create a Beads parent bug with sequenced child tasks. You avoid duplicates by external reference, map each stage to a skill label, and report a concise summary. </role> <context> This skill imports **LT-prefixed tickets** from SIL's JIRA instance: - **JIRA Base URL:** `https://jira.sil.org` - **Browse URL pattern:** `https://jira.sil.org/browse/LT-XXXXX` - **Project key:** `LT` (Language Technology)

Use this skill when:

  • User wants to bulk import JIRA issues into the local Beads tracker
  • Converting upstream LT-* tickets to actionable work items </context>
<inputs> You will receive: - Path to JIRA JSON export (default: `.cache/jira_assigned.json`) - Optional assignee override (default: use JIRA assignee from JSON) - Optional labels override (default: `jira` for parent and `jira,subtask` for children) </inputs> <workflow> 1. **Export Assigned Issues (if needed)** - Use the Jira read-only skill helper script to create the export: ``` python .github/skills/jira-to-beads/scripts/export_jira_assigned.py ``` - This writes `.cache/jira_assigned.json` and a selection file `.cache/jira_assigned.selection.txt` by default.
  1. Validate Input

    • Confirm the JIRA JSON file exists and contains issues.
    • If missing or empty, stop and report the error.
  2. Run Conversion Script

    • Execute the repo helper script:
      code
      python .cache/create_beads_from_jira.py
      
    • The script:
      • Reads .cache/jira_assigned.json
      • Skips issues already mapped via external_ref
      • Creates a parent bug with the JIRA key as external_ref
    • Creates child task items with labels jira,subtask,<skill-label>
    • Wires dependencies in order: 2→1, 3→2, 4→3
  3. Verify Output

    • Review script output for each JIRA key:
      • skipped if an external_ref already exists
      • created with parent and child IDs
    • If any creation failed, stop and report the error.
  4. Return Summary Provide a concise summary:

    • Total created vs skipped
    • Parent and child IDs for created items
    • Any errors encountered </workflow>

<child_tasks> The script creates these child tasks (do not change unless instructed):

  1. Plan / design (skill: skill-plan-design)
  2. Execute / implement (skill: skill-execute-implement)
  3. Review (skill: skill-review)
  4. Verify / test (skill: skill-verify-test) </child_tasks>

<error_handling>

  • Missing JSON file: report the missing path and stop.
  • No issues in JSON: report and stop.
  • Beads CLI errors: surface stderr and stop.
  • Partial creation: report which JIRA key failed; do not retry automatically. </error_handling>
<constraints> - Do NOT create issues without a valid JIRA key and summary. - Do NOT duplicate issues when `external_ref` already exists. - Always use the helper script; do not re-implement logic inline. - Preserve the default labels unless explicitly instructed. </constraints> <notes> - The JIRA JSON export is expected at `.cache/jira_assigned.json`. - Override input/output with `--input` (create) or `--output` (export) if needed. - Selection file can be edited by removing the leading `#` from chosen issue keys. - Use `--select-file` to point at a custom selection file. - JIRA keys map to Beads `external_ref` for deduplication. - The helper script is at `./scripts/create_beads_from_jira.py`. </notes>