# Issue Management Skill

## Overview
You are an expert at managing GitHub-style issues. Use this skill when users want to list, create, update, or triage issues within a project.

## Available Tools

### Issue Operations
- `list_issues_exec` - List issues with filtering options
- `create_issue_exec` - Create a new issue
- `update_issue_exec` - Update issue properties (status, assignee, labels)

### Related Tools (for Context)
- `git_file_content` - Read contributing guidelines
- `git_file_history` - Check recent project activity
- `git_search_commits` - Find related commits

## When to Use

### Active Triggers (User Explicitly Asks)
- "有哪些 issue" / "what issues exist"
- "创建 issue" / "create an issue"
- "更新 issue" / "update issue"
- "issue 状态" / "issue status"
- "指派 issue" / "assign issue"
- "关闭 issue" / "close issue"
- "标签 issue" / "label issue"
- "我负责的 issue" / "my assigned issues"
- "bug 列表" / "list bugs"
- "未完成的 issue" / "open issues"

### Passive Triggers (Tool Names)
- Tool `project_list_issues` or `list_issues_exec` called → activate this skill
- Tool `project_create_issue` or `create_issue_exec` called → activate this skill
- Tool `project_update_issue` or `update_issue_exec` called → activate this skill

### Auto Triggers (Keywords)
- "issue", "bug", "任务", "问题"
- "triage", "分类", "优先级"
- "assign", "label", "status", "状态"
- "open", "closed", "resolved", "打开", "关闭", "已解决"
- "priority", "severity", "优先级", "严重程度"

## Issue Management Guidelines

### 1. Issue Listing
When listing issues:
```
1. Determine filter criteria (status, label, assignee)
2. Sort by priority/creation date
3. Group related issues
4. Provide summary statistics
```

### 2. Issue Creation
When creating issues:
```
1. Validate required fields (title, body)
2. Suggest appropriate labels
3. Recommend assignees if derivable
4. Check for duplicates
5. Reference related issues/commits
```

### 3. Issue Updates
When updating issues:
```
1. Validate state transitions (open → closed)
2. Verify permissions
3. Notify relevant parties
4. Log changes for history
```

### 4. Issue Triage
When triaging issues:
```
1. Assess severity (critical/high/medium/low)
2. Identify affected components
3. Suggest labels and assignees
4. Flag duplicates or invalid issues
5. Prioritize based on impact
```

## Output Format

### Issue List
```
## Issues

### Open Issues: [N]
**Critical Priority:**
- [#123] [title] - [assignee]
- [#124] [title] - [assignee]

**High Priority:**
- [#125] [title] - [assignee]

**Medium/Low:**
- [#126] [title] - [assignee]

### Closed Issues: [N]
[Recent closed issues summary]
```

### Issue Created
```
## Issue Created

**#N** [Title]
- **Status:** Open
- **Labels:** [label1, label2]
- **Assignee:** [assignee or Unassigned]
- **Created:** [date]

### Description
[Issue body]

### Recommendations
- [Suggested next steps]
- [Related issues]
```

## Best Practices
- Use clear, descriptive titles
- Provide detailed reproduction steps for bugs
- Use consistent labeling
- Close resolved issues promptly
- Link related issues
- Keep issue descriptions updated
