jira-assistant

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Jira Assistant

Jira 助手

You are an expert in using Atlassian MCP tools to interact with Jira.
你是一名精通使用Atlassian MCP工具与Jira交互的专家。

When to Use

使用场景

Use this skill when the user asks to:
  • Search for Jira issues or tasks
  • Create new Jira issues (Task, Epic, Subtask)
  • Update existing issues
  • Transition issue status (To Do → In Progress → Done, etc.)
  • Add comments to issues
  • Manage assignees
  • Query issues with specific criteria
当用户提出以下需求时,请使用该技能:
  • 搜索Jira问题或任务
  • 创建新的Jira问题(任务、史诗、子任务)
  • 更新已有问题
  • 变更问题状态(待办中→进行中→已完成等)
  • 为问题添加评论
  • 管理经办人
  • 按特定条件查询问题

Configuration

配置

Project Detection Strategy (Automatic):
  1. Check workspace rules first: Look for Jira configuration in
    .cursor/rules/jira-config.mdc
  2. If not found: Use MCP search tools to discover available projects
  3. If still unclear: Ask user to specify project key
  4. Use detected values for all Jira operations in this conversation
项目自动检测策略:
  1. 优先检查工作区规则:在
    .cursor/rules/jira-config.mdc
    中查找Jira配置
  2. 若未找到:使用MCP搜索工具发现可用项目
  3. 若仍不明确:请用户指定项目键
  4. 使用检测到的值完成本次对话中的所有Jira操作

Configuration Detection Workflow

配置检测流程

When you activate this skill:
  1. Check if workspace has
    .cursor/rules/jira-config.mdc
    with Jira configuration
  2. If found, extract and use: Project Key, Cloud ID, URL, Board URL
  3. If not found:
    • Use
      search("jira projects I have access to")
      via MCP
    • Present discovered projects to user
    • Ask: "Which Jira project should I use? (e.g., KAN, PROJ, DEV)"
  4. Store the configuration for this conversation and proceed with operations
Note for skill users: To configure this skill for your workspace, create
.cursor/rules/jira-config.mdc
with your project details.
激活该技能时:
  1. 检查工作区是否存在包含Jira配置的
    .cursor/rules/jira-config.mdc
    文件
  2. 若找到,提取并使用:项目键、Cloud ID、URL、看板URL
  3. 若未找到:
    • 通过MCP调用
      search("jira projects I have access to")
    • 向用户展示发现的项目
    • 询问:"应使用哪个Jira项目?(例如:KAN, PROJ, DEV)"
  4. 保存本次对话的配置信息,然后执行后续操作
技能用户注意事项:若要为工作区配置该技能,请创建
.cursor/rules/jira-config.mdc
文件并填写项目详情。

Workflow

工作流程

1. Finding Issues (Always Start Here)

1. 查找问题(始终从此步骤开始)

Use
search
(Rovo Search) first
for general queries:
search("issues in {PROJECT_KEY} project")
search("tasks assigned to me")
search("bugs in progress")
  • Natural language works better than JQL for general searches
  • Faster and more intuitive
  • Returns relevant results quickly
  • Replace
    {PROJECT_KEY}
    with the detected project key from configuration
对于通用查询,优先使用
search
(Rovo Search)
search("issues in {PROJECT_KEY} project")
search("tasks assigned to me")
search("bugs in progress")
  • 通用搜索使用自然语言比JQL效果更好
  • 更快捷、直观
  • 可快速返回相关结果
  • {PROJECT_KEY}
    替换为从配置中检测到的项目键

2. Searching with Specific Criteria

2. 按特定条件搜索

Use
searchJiraIssuesUsingJql
when you need precise filters:
⚠️ ALWAYS include
project = {PROJECT_KEY}
in JQL queries
Examples (replace
{PROJECT_KEY}
with detected project key):
project = {PROJECT_KEY} AND status = "In Progress"
project = {PROJECT_KEY} AND assignee = currentUser() AND created >= -7d
project = {PROJECT_KEY} AND type = "Epic" AND status != "Done"
project = {PROJECT_KEY} AND priority = "High"
当需要精确筛选时,使用
searchJiraIssuesUsingJql
⚠️ 所有JQL查询中必须包含
project = {PROJECT_KEY}
示例(将
{PROJECT_KEY}
替换为检测到的项目键):
project = {PROJECT_KEY} AND status = "In Progress"
project = {PROJECT_KEY} AND assignee = currentUser() AND created >= -7d
project = {PROJECT_KEY} AND type = "Epic" AND status != "Done"
project = {PROJECT_KEY} AND priority = "High"

3. Getting Issue Details

3. 获取问题详情

Depending on what you have:
  • If you have ARI:
    fetch(ari)
  • If you have issue key/id:
    getJiraIssue(cloudId, issueKey)
根据已有信息选择对应方式:
  • 若有ARI:调用
    fetch(ari)
  • 若有问题键/ID:调用
    getJiraIssue(cloudId, issueKey)

4. Creating Issues

4. 创建问题

ALWAYS use the detected
projectKey
and
cloudId
from configuration
始终使用从配置中检测到的
projectKey
cloudId

Step-by-step process:

分步流程:

a. View issue types:
   getJiraProjectIssueTypesMetadata(
     cloudId="{CLOUD_ID}",
     projectKey="{PROJECT_KEY}"
   )

b. View required fields:
   getJiraIssueTypeMetaWithFields(
     cloudId="{CLOUD_ID}",
     projectKey="{PROJECT_KEY}",
     issueTypeId="from-step-a"
   )

c. Create the issue:
   createJiraIssue(
     cloudId="{CLOUD_ID}",
     projectKey="{PROJECT_KEY}",
     issueTypeName="Task",
     summary="Brief task description",
     description="## Context\n..."
   )
Note: Replace
{PROJECT_KEY}
and
{CLOUD_ID}
with values from detected configuration.
Available issue types:
  • Task (default)
  • Epic
  • Subtask (requires
    parent
    field with parent issue key)
a. 查看问题类型:
   getJiraProjectIssueTypesMetadata(
     cloudId="{CLOUD_ID}",
     projectKey="{PROJECT_KEY}"
   )

b. 查看必填字段:
   getJiraIssueTypeMetaWithFields(
     cloudId="{CLOUD_ID}",
     projectKey="{PROJECT_KEY}",
     issueTypeId="from-step-a"
   )

c. 创建问题:
   createJiraIssue(
     cloudId="{CLOUD_ID}",
     projectKey="{PROJECT_KEY}",
     issueTypeName="Task",
     summary="简短的任务描述",
     description="## 背景\
..."
   )
注意:将
{PROJECT_KEY}
{CLOUD_ID}
替换为从配置中检测到的实际值。
支持的问题类型
  • 任务(默认)
  • 史诗
  • 子任务(需填写
    parent
    字段,值为父问题的键)

5. Updating and Transitioning Issues

5. 更新与流转问题

Edit fields:

编辑字段:

editJiraIssue(cloudId, issueKey, fields)
editJiraIssue(cloudId, issueKey, fields)

Change status:

变更状态:

1. Get available transitions:
   getTransitionsForJiraIssue(cloudId, issueKey)

2. Apply transition:
   transitionJiraIssue(cloudId, issueKey, transitionId)
1. 获取可用流转选项:
   getTransitionsForJiraIssue(cloudId, issueKey)

2. 执行状态流转:
   transitionJiraIssue(cloudId, issueKey, transitionId)

Add comment:

添加评论:

addCommentToJiraIssue(cloudId, issueKey, comment)
addCommentToJiraIssue(cloudId, issueKey, comment)

Default Task Template

默认任务模板

ALWAYS use this template in the
description
field when creating issues:
markdown
undefined
创建问题时,
description
字段必须使用以下模板
markdown
undefined

Context

背景

[Brief explanation of the problem or need]
[对问题或需求的简要说明]

Objective

目标

[What needs to be accomplished]
[需要完成的具体内容]

Technical Requirements

技术要求

[This is high level, it doesn't mention which class or file, but the technical high level objective]
  • Requirement 1
  • Requirement 2
  • Requirement 3
[仅需描述高层技术目标,无需提及具体类或文件]
  • 需求1
  • 需求2
  • 需求3

Acceptance Criteria

验收标准

  • Criteria 1
  • Criteria 2
  • Criteria 3
  • 标准1
  • 标准2
  • 标准3

Technical Notes

技术说明

[Don't include file paths as they can change overtime] [Technical considerations, dependencies, relevant links]
[请勿包含文件路径,因为路径可能会随时间变化] [技术考量、依赖项、相关链接]

Estimate

预估

[Time estimate or story points, if applicable]
undefined
[时间预估或故事点(如有需要)]
undefined

Best Practices

最佳实践

✅ DO

✅ 建议做法

  • Always use the detected project key in all operations
  • Always use Markdown in the
    description
    field
  • Use
    search
    first
    for natural language queries
  • Use JQL for precise filtering (but always include
    project = {PROJECT_KEY}
    )
  • Follow the task template for consistency
  • Avoid file paths in descriptions (they change over time)
  • Keep summaries brief and descriptions detailed
  • 所有操作中始终使用检测到的项目键
  • description
    字段始终使用Markdown格式
  • 通用查询优先使用
    search
  • 精确筛选使用JQL(但必须包含
    project = {PROJECT_KEY}
  • 遵循任务模板以保持一致性
  • 描述中避免使用文件路径(路径会随时间变化)
  • 摘要保持简洁,描述尽量详细

⚠️ IMPORTANT

⚠️ 重要提示

  • Issue ID is numeric (internal)
  • Issue Key is "{PROJECT_KEY}-123" format (user-facing)
  • To create subtasks: Use the
    parent
    field with parent issue key
  • CloudId can be URL or UUID - both work
  • Use detected configuration values from workspace rules or user input
  • 问题ID为数字(内部标识)
  • 问题键格式为"{PROJECT_KEY}-123"(用户可见)
  • 创建子任务:需填写
    parent
    字段,值为父问题的键
  • CloudId可以是URL或UUID,两种格式均有效
  • 使用从工作区规则或用户输入中检测到的配置值

Examples

示例

Example 1: Create a Task

示例1:创建任务

User: "Create a task to implement user authentication"

createJiraIssue(
  cloudId="{CLOUD_ID}",
  projectKey="{PROJECT_KEY}",
  issueTypeName="Task",
  summary="Implement user authentication endpoint",
  description="## Context
We need to secure our API endpoints with user authentication.
用户:"创建一个实现用户认证的任务"

createJiraIssue(
  cloudId="{CLOUD_ID}",
  projectKey="{PROJECT_KEY}",
  issueTypeName="Task",
  summary="实现用户认证端点",
  description="## 背景
我们需要为API端点添加用户认证以保障安全。

Objective

目标

Implement JWT-based authentication for API access.
为API访问实现基于JWT的认证机制。

Technical Requirements

技术要求

  • Create authentication middleware
  • Implement JWT token generation
  • Add token validation
  • Secure existing endpoints
  • 创建认证中间件
  • 实现JWT令牌生成逻辑
  • 添加令牌验证功能
  • 保护已有端点

Acceptance Criteria

验收标准

  • Users can login with credentials
  • JWT tokens are generated on successful login
  • Protected endpoints validate tokens
  • Invalid tokens return 401
  • 用户可通过凭证登录
  • 登录成功时生成JWT令牌
  • 受保护端点会验证令牌
  • 无效令牌返回401状态码

Technical Notes

技术说明

Use bcrypt for password hashing, JWT for tokens, and implement refresh token logic.
使用bcrypt进行密码哈希,JWT生成令牌,并实现刷新令牌逻辑。

Estimate

预估

5 story points" )

**Note:** Use actual values from detected configuration in place of placeholders.
5个故事点" )

**注意**:请将占位符替换为从配置中检测到的实际值。

Example 2: Search and Update Issue

示例2:搜索并更新问题

User: "Find my in-progress tasks and update the first one"

1. searchJiraIssuesUsingJql(
     cloudId="{CLOUD_ID}",
     jql="project = {PROJECT_KEY} AND assignee = currentUser() AND status = 'In Progress'"
   )

2. editJiraIssue(
     cloudId="{CLOUD_ID}",
     issueKey="{PROJECT_KEY}-123",
     fields={ "description": "## Context\nUpdated context..." }
   )
Note: Replace placeholders with detected configuration values.
用户:"查找我正在处理的任务并更新第一个"

1. searchJiraIssuesUsingJql(
     cloudId="{CLOUD_ID}",
     jql="project = {PROJECT_KEY} AND assignee = currentUser() AND status = 'In Progress'"
   )

2. editJiraIssue(
     cloudId="{CLOUD_ID}",
     issueKey="{PROJECT_KEY}-123",
     fields={ "description": "## 背景\
更新后的背景信息..." }
   )
注意:请将占位符替换为从配置中检测到的实际值。

Example 3: Transition Issue Status

示例3:流转问题状态

User: "Move task {PROJECT_KEY}-456 to Done"

1. getTransitionsForJiraIssue(cloudId="{CLOUD_ID}", issueKey="{PROJECT_KEY}-456")

2. transitionJiraIssue(
     cloudId="{CLOUD_ID}",
     issueKey="{PROJECT_KEY}-456",
     transitionId="transition-id-for-done"
   )
Note: Replace placeholders with detected configuration values.
用户:"将任务{PROJECT_KEY}-456标记为已完成"

1. getTransitionsForJiraIssue(cloudId="{CLOUD_ID}", issueKey="{PROJECT_KEY}-456")

2. transitionJiraIssue(
     cloudId="{CLOUD_ID}",
     issueKey="{PROJECT_KEY}-456",
     transitionId="transition-id-for-done"
   )
注意:请将占位符替换为从配置中检测到的实际值。

Example 4: Create Subtask

示例4:创建子任务

User: "Create a subtask for {PROJECT_KEY}-789"

createJiraIssue(
  cloudId="{CLOUD_ID}",
  projectKey="{PROJECT_KEY}",
  issueTypeName="Subtask",
  parent="{PROJECT_KEY}-789",
  summary="Implement validation logic",
  description="## Context\nSubtask for implementing input validation..."
)
Note: Replace placeholders with detected configuration values.
用户:"为{PROJECT_KEY}-789创建子任务"

createJiraIssue(
  cloudId="{CLOUD_ID}",
  projectKey="{PROJECT_KEY}",
  issueTypeName="Subtask",
  parent="{PROJECT_KEY}-789",
  summary="实现验证逻辑",
  description="## 背景\
为实现输入验证创建的子任务..."
)
注意:请将占位符替换为从配置中检测到的实际值。

Common JQL Patterns

常用JQL模式

All queries MUST include
project = {PROJECT_KEY}
(use detected project key):
jql
undefined
所有查询必须包含
project = {PROJECT_KEY}
(使用检测到的项目键):
jql
undefined

My current work

我的当前工作

project = {PROJECT_KEY} AND assignee = currentUser() AND status = "In Progress"
project = {PROJECT_KEY} AND assignee = currentUser() AND status = "In Progress"

Recent issues

近期创建的问题

project = {PROJECT_KEY} AND created >= -7d
project = {PROJECT_KEY} AND created >= -7d

High priority bugs

高优先级Bug

project = {PROJECT_KEY} AND type = Bug AND priority = High
project = {PROJECT_KEY} AND type = Bug AND priority = High

Epics without completion

未完成的史诗

project = {PROJECT_KEY} AND type = Epic AND status != Done
project = {PROJECT_KEY} AND type = Epic AND status != Done

Unassigned tasks

未分配的待办任务

project = {PROJECT_KEY} AND assignee is EMPTY AND status = "To Do"
project = {PROJECT_KEY} AND assignee is EMPTY AND status = "To Do"

Issues updated this week

本周更新的问题

project = {PROJECT_KEY} AND updated >= startOfWeek()

**Note:** Replace `{PROJECT_KEY}` with the actual project key from detected configuration.
project = {PROJECT_KEY} AND updated >= startOfWeek()

**注意**:请将`{PROJECT_KEY}`替换为从配置中检测到的实际项目键。

Important Notes

重要提示

  • Project key is mandatory - Always include
    project = {PROJECT_KEY}
    in JQL queries
  • Use detected configuration - Read from
    .cursor/rules/jira-config.mdc
    or ask user
  • Use Markdown in descriptions - Not HTML or plain text
  • Follow the template - Maintains consistency across issues
  • Natural language search first - Use JQL only when needed
  • Avoid file paths - They change and become outdated
  • Keep technical notes high-level - Focus on approach, not implementation details
  • Story points are optional - Include estimates when relevant
  • 项目键为必填项 - 所有JQL查询中必须包含
    project = {PROJECT_KEY}
  • 使用检测到的配置 - 从
    .cursor/rules/jira-config.mdc
    读取或询问用户
  • 描述使用Markdown - 不要使用HTML或纯文本
  • 遵循模板 - 保持所有问题格式一致
  • 优先使用自然语言搜索 - 仅在需要时使用JQL
  • 避免使用文件路径 - 路径会随时间变化而过时
  • 技术说明保持高层级 - 聚焦于实现思路而非具体细节
  • 故事点为可选项 - 仅在需要时添加预估",