acli-jira
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePurpose
用途
Use this skill when you need to interact with Jira: reading tickets, creating new work items, updating existing ones, searching with JQL, transitioning status, assigning, commenting, or browsing projects. provides full Jira Cloud management from the CLI.
acli jira当你需要与Jira交互时使用此技能:查看工单、创建新工作项、更新现有工单、使用JQL搜索、状态流转、分配工单、添加评论或浏览项目。 提供了从CLI对Jira Cloud的完整管理功能。
acli jiraWhen to use what
场景选择
- : View a specific ticket by key. Use to read ticket details, description, status, assignee, etc.
acli jira workitem view - : Find tickets using JQL queries. Use for any search, filtering, or listing of work items.
acli jira workitem search - : Create a new ticket. Use when the user wants to file a bug, task, story, or epic.
acli jira workitem create - : Modify an existing ticket's summary, description, labels, type, or assignee.
acli jira workitem edit - : Move a ticket to a new status (e.g., "In Progress", "Done").
acli jira workitem transition - : Change or remove a ticket's assignee.
acli jira workitem assign - : Add a comment to a ticket.
acli jira workitem comment create - : Read comments on a ticket.
acli jira workitem comment list - : List available projects. Use to discover project keys.
acli jira project list - : View details of a specific project.
acli jira project view - : List tickets in a sprint (requires
acli jira sprint list-workitemsand--sprintIDs).--board - : Find boards by name or keyword.
acli jira board search
- :通过工单编号查看特定工单。用于查看工单详情、描述、状态、经办人等信息。
acli jira workitem view - :使用JQL查询查找工单。适用于任何搜索、筛选或列出工作项的场景。
acli jira workitem search - :创建新工单。适用于用户需要提交Bug、任务、故事或史诗的场景。
acli jira workitem create - :修改现有工单的摘要、描述、标签、类型或经办人。
acli jira workitem edit - :将工单切换至新状态(例如“进行中”、“已完成”)。
acli jira workitem transition - :更改或移除工单的经办人。
acli jira workitem assign - :为工单添加评论。
acli jira workitem comment create - :查看工单的评论列表。
acli jira workitem comment list - :列出可用项目。用于查找项目编号。
acli jira project list - :查看特定项目的详情。
acli jira project view - :列出迭代中的工单(需要
acli jira sprint list-workitems和--sprintID)。--board - :通过名称或关键词查找看板。
acli jira board search
Core concepts
核心概念
- Always use on read commands (
--json,view,search,comment list, etc.) to get machine-readable output.project list - Always use on mutation commands (
--yes,edit,transition) to skip interactive confirmation prompts that would hang in a non-interactive shell.assign - JQL (Jira Query Language) is used for searching. Pass it via .
--jql "..." - is a shorthand for the authenticated user (works in
@me).--assignee - Labels are comma-separated: .
--label "bug,backend,urgent" - Work item types use Jira issue types: ,
Task,Bug,Story,Epic, etc. Pass viaSub-task.--type - Keys are project-prefixed IDs like . Multiple keys are comma-separated:
PROJ-123.--key "PROJ-1,PROJ-2"
- 读取类命令(、
view、search、comment list等)始终使用project list,以获取机器可读的输出格式。--json - 写入类命令(、
edit、transition)始终使用assign,以跳过交互式确认提示,避免在非交互式Shell中挂起。--yes - JQL(Jira查询语言)用于搜索,通过传入。
--jql "..." - ****是已认证用户的简写(可在
@me中使用)。--assignee - 标签以逗号分隔:。
--label "bug,backend,urgent" - 工作项类型使用Jira的问题类型:、
Task、Bug、Story、Epic等,通过Sub-task传入。--type - 工单编号是项目前缀的ID,例如。多个编号以逗号分隔:
PROJ-123。--key "PROJ-1,PROJ-2"
Recommended workflow
推荐工作流
- Discover projects: to find available project keys.
acli jira project list --json - Search for tickets: to find relevant work items.
acli jira workitem search --jql "project = PROJ AND ..." --json - View a ticket: to read full details.
acli jira workitem view PROJ-123 --json - Create/edit/transition as needed using the commands below.
- 发现项目:使用查找可用的项目编号。
acli jira project list --json - 搜索工单:使用查找相关工作项。
acli jira workitem search --jql "project = PROJ AND ..." --json - 查看工单:使用查看完整详情。
acli jira workitem view PROJ-123 --json - 按需操作:使用以下命令进行创建/编辑/状态流转等操作。
Common JQL patterns
常用JQL示例
sh
undefinedsh
undefinedAll open tickets in a project
项目中所有未完成工单
--jql "project = PROJ AND status != Done"
--jql "project = PROJ AND status != Done"
Tickets assigned to me
分配给我的工单
--jql "assignee = currentUser()"
--jql "assignee = currentUser()"
Bugs created this week
本周创建的Bug
--jql "project = PROJ AND type = Bug AND created >= startOfWeek()"
--jql "project = PROJ AND type = Bug AND created >= startOfWeek()"
Tickets with a specific label
带有特定标签的工单
--jql "project = PROJ AND labels = backend"
--jql "project = PROJ AND labels = backend"
Search by summary text
通过摘要文本搜索
--jql "project = PROJ AND summary ~ "search term""
--jql "project = PROJ AND summary ~ "search term""
High priority open items
高优先级未完成项
--jql "project = PROJ AND priority in (High, Highest) AND status != Done"
--jql "project = PROJ AND priority in (High, Highest) AND status != Done"
Recently updated
最近更新的工单
--jql "project = PROJ AND updated >= -7d ORDER BY updated DESC"
undefined--jql "project = PROJ AND updated >= -7d ORDER BY updated DESC"
undefinedExamples
操作示例
View a ticket
查看工单
sh
acli jira workitem view PROJ-123 --jsonsh
acli jira workitem view PROJ-123 --jsonView specific fields only
仅查看特定字段
acli jira workitem view PROJ-123 --fields "summary,status,assignee,labels,comment" --json
undefinedacli jira workitem view PROJ-123 --fields "summary,status,assignee,labels,comment" --json
undefinedSearch for tickets
搜索工单
sh
undefinedsh
undefinedSearch with JQL, get JSON output
使用JQL搜索,获取JSON输出
acli jira workitem search --jql "project = PROJ AND status = 'In Progress'" --json
acli jira workitem search --jql "project = PROJ AND status = 'In Progress'" --json
Search with specific fields and a result limit
搜索特定字段并限制结果数量
acli jira workitem search --jql "project = PROJ AND assignee = currentUser()"
--fields "key,summary,status,priority,labels" --limit 20 --json
--fields "key,summary,status,priority,labels" --limit 20 --json
acli jira workitem search --jql "project = PROJ AND assignee = currentUser()"
--fields "key,summary,status,priority,labels" --limit 20 --json
--fields "key,summary,status,priority,labels" --limit 20 --json
Get count of matching tickets
获取匹配工单的数量
acli jira workitem search --jql "project = PROJ AND type = Bug" --count
undefinedacli jira workitem search --jql "project = PROJ AND type = Bug" --count
undefinedCreate a ticket
创建工单
sh
undefinedsh
undefinedBasic creation
基础创建
acli jira workitem create
--project "PROJ"
--type "Task"
--summary "Implement feature X"
--description "Detailed description here"
--label "backend,feature"
--assignee "@me"
--json
--project "PROJ"
--type "Task"
--summary "Implement feature X"
--description "Detailed description here"
--label "backend,feature"
--assignee "@me"
--json
acli jira workitem create
--project "PROJ"
--type "Task"
--summary "实现功能X"
--description "详细描述在此"
--label "backend,feature"
--assignee "@me"
--json
--project "PROJ"
--type "Task"
--summary "实现功能X"
--description "详细描述在此"
--label "backend,feature"
--assignee "@me"
--json
Create a bug with a parent (sub-task)
创建带有父工单的Bug(子任务)
acli jira workitem create
--project "PROJ"
--type "Bug"
--summary "Fix login timeout"
--description "Users report timeout after 30s on the login page"
--label "bug,auth"
--parent "PROJ-100"
--json
--project "PROJ"
--type "Bug"
--summary "Fix login timeout"
--description "Users report timeout after 30s on the login page"
--label "bug,auth"
--parent "PROJ-100"
--json
acli jira workitem create
--project "PROJ"
--type "Bug"
--summary "修复登录超时问题"
--description "用户反馈登录页面30秒后超时"
--label "bug,auth"
--parent "PROJ-100"
--json
--project "PROJ"
--type "Bug"
--summary "修复登录超时问题"
--description "用户反馈登录页面30秒后超时"
--label "bug,auth"
--parent "PROJ-100"
--json
Create with description from a file
从文件读取描述创建工单
acli jira workitem create
--project "PROJ"
--type "Story"
--summary "User onboarding flow"
--description-file description.txt
--json
--project "PROJ"
--type "Story"
--summary "User onboarding flow"
--description-file description.txt
--json
undefinedacli jira workitem create
--project "PROJ"
--type "Story"
--summary "用户引导流程"
--description-file description.txt
--json
--project "PROJ"
--type "Story"
--summary "用户引导流程"
--description-file description.txt
--json
undefinedEdit a ticket
编辑工单
sh
undefinedsh
undefinedEdit summary and labels
编辑摘要和标签
acli jira workitem edit --key "PROJ-123"
--summary "Updated summary"
--labels "backend,urgent"
--yes --json
--summary "Updated summary"
--labels "backend,urgent"
--yes --json
acli jira workitem edit --key "PROJ-123"
--summary "更新后的摘要"
--labels "backend,urgent"
--yes --json
--summary "更新后的摘要"
--labels "backend,urgent"
--yes --json
Change assignee
更改经办人
acli jira workitem edit --key "PROJ-123"
--assignee "user@company.com"
--yes --json
--assignee "user@company.com"
--yes --json
acli jira workitem edit --key "PROJ-123"
--assignee "user@company.com"
--yes --json
--assignee "user@company.com"
--yes --json
Remove labels
移除标签
acli jira workitem edit --key "PROJ-123"
--remove-labels "stale"
--yes --json
--remove-labels "stale"
--yes --json
undefinedacli jira workitem edit --key "PROJ-123"
--remove-labels "stale"
--yes --json
--remove-labels "stale"
--yes --json
undefinedTransition a ticket
状态流转
sh
undefinedsh
undefinedMove to In Progress
切换至进行中
acli jira workitem transition --key "PROJ-123" --status "In Progress" --yes --json
acli jira workitem transition --key "PROJ-123" --status "In Progress" --yes --json
Mark as Done
标记为已完成
acli jira workitem transition --key "PROJ-123" --status "Done" --yes --json
acli jira workitem transition --key "PROJ-123" --status "Done" --yes --json
Transition multiple tickets
批量流转工单
acli jira workitem transition --key "PROJ-1,PROJ-2,PROJ-3" --status "Done" --yes --json
undefinedacli jira workitem transition --key "PROJ-1,PROJ-2,PROJ-3" --status "Done" --yes --json
undefinedAssign a ticket
分配工单
sh
undefinedsh
undefinedAssign to self
分配给自己
acli jira workitem assign --key "PROJ-123" --assignee "@me" --yes --json
acli jira workitem assign --key "PROJ-123" --assignee "@me" --yes --json
Assign to someone else
分配给他人
acli jira workitem assign --key "PROJ-123" --assignee "user@company.com" --yes --json
acli jira workitem assign --key "PROJ-123" --assignee "user@company.com" --yes --json
Remove assignee
移除经办人
acli jira workitem assign --key "PROJ-123" --remove-assignee --yes --json
undefinedacli jira workitem assign --key "PROJ-123" --remove-assignee --yes --json
undefinedComments
评论操作
sh
undefinedsh
undefinedAdd a comment
添加评论
acli jira workitem comment create --key "PROJ-123" --body "This is ready for review"
acli jira workitem comment create --key "PROJ-123" --body "此工单已准备好审核"
List comments
列出评论
acli jira workitem comment list --key "PROJ-123" --json
undefinedacli jira workitem comment list --key "PROJ-123" --json
undefinedProjects
项目操作
sh
undefinedsh
undefinedList all projects
列出所有项目
acli jira project list --json
acli jira project list --json
View a specific project
查看特定项目
acli jira project view --key "PROJ" --json
acli jira project view --key "PROJ" --json
List recently viewed projects
列出最近查看的项目
acli jira project list --recent --json
undefinedacli jira project list --recent --json
undefinedSprints and boards
迭代与看板
sh
undefinedsh
undefinedFind a board
查找看板
acli jira board search --name "My Team" --json
acli jira board search --name "My Team" --json
List sprints on a board
列出看板中的迭代
acli jira board list-sprints --id 42 --json
acli jira board list-sprints --id 42 --json
List tickets in a sprint
列出迭代中的工单
acli jira sprint list-workitems --sprint 101 --board 42 --json
undefinedacli jira sprint list-workitems --sprint 101 --board 42 --json
undefinedImportant tips
重要提示
- When creating tickets, always ask the user for the project key if not already known. Use to discover available projects.
acli jira project list --json - When creating tickets, infer appropriate labels from context (e.g., the area of the codebase, the type of work). Labels help with discoverability.
- Prefer output for all read operations so you can parse and summarize results for the user.
--json - Use on all write operations to avoid interactive prompts.
--yes - For large result sets, use to cap results or
--limitto fetch everything.--paginate - Status names for transitions are project-specific. If a transition fails, the error message will list valid statuses.
- To set custom fields (not exposed as CLI flags), use with
--from-json. Generate a template withadditionalAttributes.acli jira workitem create --generate-json
- 创建工单时,如果用户未提供项目编号,务必询问。可使用查找可用项目。
acli jira project list --json - 创建工单时,根据上下文推断合适的标签(例如代码库领域、工作类型),标签有助于提高可发现性。
- 所有读取操作优先使用输出,以便解析并为用户汇总结果。
--json - 所有写入操作使用以避免交互式提示。
--yes - 对于大型结果集,使用限制结果数量或
--limit获取全部结果。--paginate - 状态流转的状态名称是项目特定的。如果流转失败,错误消息会列出有效的状态。
- 要设置未作为CLI flag暴露的自定义字段,请使用和
--from-json。可使用additionalAttributes生成模板。acli jira workitem create --generate-json
Board-specific conventions
看板特定规范
For project-specific board conventions (required fields, custom field mappings, labels, templates), read the file if it exists. It contains board-specific conventions needed before creating or managing tickets on known boards.
~/.config/opencode/skills/acli-jira/boards.mdThis allows board conventions to be kept private (not checked into version control) while the core skill remains public.
关于项目特定的看板规范(必填字段、自定义字段映射、标签、模板),如果存在文件,请阅读该文件。其中包含在已知看板上创建或管理工单所需的看板特定规范。
~/.config/opencode/skills/acli-jira/boards.md这样可以将看板规范保密(不提交到版本控制),同时核心技能保持公开。