AgentSkillsCN

create-jira-issue

创建新的 Jira 问题,确保正确关联、结合语义代码搜索以获取上下文,并向团队发送通知。适用于用户输入“创建 Jira”、“提交 bug”、“新建问题”或“创建工单”时使用。

SKILL.md
--- frontmatter
name: create-jira-issue
description: Create a new Jira issue with proper linking, semantic code search for context, and team notification. Use when user says "create Jira", "file a bug", "new issue", or "create ticket".

Create Jira Issue

Creates Jira issues with:

  • Semantic code search for related code (adds file references to description)
  • Linking to related issues
  • Slack notification to team channel

Inputs

InputTypeDefaultPurpose
summarystringrequiredIssue summary/title
descriptionstring""Issue description (markdown)
issue_typestringTaskBug, Task, Story, Sub-task
projectstringAAPJira project key
repostringautomation-analytics-backendRepository for code search
search_codebooltrueSearch codebase for related code
notify_teambooltrueSend Slack notification
labelsstring-Comma-separated labels
prioritystringnormalblocker, critical, major, normal, minor
link_tostring-Issue key to link to
link_typestringrelates torelates to, blocks, is blocked by, duplicates
start_progressboolfalseTransition to In Progress immediately
user_storystring-For Story type: "As a..., I want..., so that..."
acceptance_criteriastring-For Story type
componentsstring-Comma-separated (e.g., Automation Analytics)

Workflow

1. Load Persona

  • persona_load(persona="developer")

2. Knowledge & Known Issues

  • check_known_issues(tool_name="jira", error_text="")
  • knowledge_query(project="automation-analytics-backend", persona="developer", section="patterns")

3. Semantic Code Search (if search_code=true)

  • code_search(query=summary, project=repo, limit=5) — Find related code
  • Parse results: extract file paths, modules, relevance scores
  • Build enhanced description: append "Related Code" section with file references

4. Create Issue

  • jira_create_issue(project=project, summary=summary, description=enhanced_description, problem_description=description or summary, issue_type=issue_type, priority=priority, labels=labels, user_story=user_story, acceptance_criteria=acceptance_criteria, components=components)
  • Parse result: extract issue_key (AAP-XXXXX pattern)

5. Link Issues (if link_to)

  • jira_add_link(from_issue=created_issue_key, to_issue=link_to, link_type=link_type)

6. Update Labels (if inputs.labels)

  • jira_update_issue(issue_key=created_issue_key, fields="labels", values=labels)

7. Transition (if start_progress)

  • jira_transition(issue_key=created_issue_key, transition="Start Progress")

8. Get Final State

  • jira_view_issue(issue_key=created_issue_key)

9. Memory & Notify

  • memory_session_log(action="Created Jira issue {key}", details=summary)
  • memory_append(key="state/current_work", list_path="active_issues", item={key, status, type, summary})
  • If notify_team: skill_run(skill_name="notify_team", inputs='{"message": "New {type} created: {key} - {summary}", "type": "info"}')

10. Learning from Failures

  • If "unauthorized": learn_tool_fix("jira_create_issue", "unauthorized", "Jira auth failed", "Check Jira credentials")
  • If "project not found": learn_tool_fix("jira_create_issue", "project not found", "Project key incorrect", "Verify project key")

Output Format

markdown
## 🎫 Create Jira Issue
### ✅ Issue Created
**Key:** [AAP-12345](https://issues.redhat.com/browse/AAP-12345)
**Summary:** ...
**Type:** Task
**Priority:** normal
**Team notified:** ✅
**Linked to:** [AAP-12344](link) (relates to)

### Next Steps
- jira_view_issue(issue_key='AAP-12345')
- skill_run("start_work", '{"issue_key": "AAP-12345"}')

Key MCP Tools

  • persona_load, code_search, jira_create_issue, jira_add_link, jira_update_issue, jira_transition, jira_view_issue, memory_session_log, memory_append, skill_run, learn_tool_fix, check_known_issues, knowledge_query