acli-jira

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Purpose

用途

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.
acli jira
provides full Jira Cloud management from the CLI.
当你需要与Jira交互时使用此技能:查看工单、创建新工作项、更新现有工单、使用JQL搜索、状态流转、分配工单、添加评论或浏览项目。
acli jira
提供了从CLI对Jira Cloud的完整管理功能。

When to use what

场景选择

  • acli jira workitem view
    : View a specific ticket by key. Use to read ticket details, description, status, assignee, etc.
  • acli jira workitem search
    : Find tickets using JQL queries. Use for any search, filtering, or listing of work items.
  • acli jira workitem create
    : Create a new ticket. Use when the user wants to file a bug, task, story, or epic.
  • acli jira workitem edit
    : Modify an existing ticket's summary, description, labels, type, or assignee.
  • acli jira workitem transition
    : Move a ticket to a new status (e.g., "In Progress", "Done").
  • acli jira workitem assign
    : Change or remove a ticket's assignee.
  • acli jira workitem comment create
    : Add a comment to a ticket.
  • acli jira workitem comment list
    : Read comments on a ticket.
  • acli jira project list
    : List available projects. Use to discover project keys.
  • acli jira project view
    : View details of a specific project.
  • acli jira sprint list-workitems
    : List tickets in a sprint (requires
    --sprint
    and
    --board
    IDs).
  • acli jira board search
    : Find boards by name or keyword.
  • acli jira workitem view
    :通过工单编号查看特定工单。用于查看工单详情、描述、状态、经办人等信息。
  • acli jira workitem search
    :使用JQL查询查找工单。适用于任何搜索、筛选或列出工作项的场景。
  • acli jira workitem create
    :创建新工单。适用于用户需要提交Bug、任务、故事或史诗的场景。
  • 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
    :列出迭代中的工单(需要
    --sprint
    --board
    ID)。
  • acli jira board search
    :通过名称或关键词查找看板。

Core concepts

核心概念

  • Always use
    --json
    on read commands (
    view
    ,
    search
    ,
    comment list
    ,
    project list
    , etc.) to get machine-readable output.
  • Always use
    --yes
    on mutation commands (
    edit
    ,
    transition
    ,
    assign
    ) to skip interactive confirmation prompts that would hang in a non-interactive shell.
  • JQL (Jira Query Language) is used for searching. Pass it via
    --jql "..."
    .
  • @me
    is a shorthand for the authenticated user (works in
    --assignee
    ).
  • Labels are comma-separated:
    --label "bug,backend,urgent"
    .
  • Work item types use Jira issue types:
    Task
    ,
    Bug
    ,
    Story
    ,
    Epic
    ,
    Sub-task
    , etc. Pass via
    --type
    .
  • Keys are project-prefixed IDs like
    PROJ-123
    . Multiple keys are comma-separated:
    --key "PROJ-1,PROJ-2"
    .
  • 读取类命令(
    view
    search
    comment list
    project list
    等)始终使用
    --json
    ,以获取机器可读的输出格式。
  • 写入类命令(
    edit
    transition
    assign
    )始终使用
    --yes
    ,以跳过交互式确认提示,避免在非交互式Shell中挂起。
  • 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

推荐工作流

  1. Discover projects:
    acli jira project list --json
    to find available project keys.
  2. Search for tickets:
    acli jira workitem search --jql "project = PROJ AND ..." --json
    to find relevant work items.
  3. View a ticket:
    acli jira workitem view PROJ-123 --json
    to read full details.
  4. Create/edit/transition as needed using the commands below.
  1. 发现项目:使用
    acli jira project list --json
    查找可用的项目编号。
  2. 搜索工单:使用
    acli jira workitem search --jql "project = PROJ AND ..." --json
    查找相关工作项。
  3. 查看工单:使用
    acli jira workitem view PROJ-123 --json
    查看完整详情。
  4. 按需操作:使用以下命令进行创建/编辑/状态流转等操作。

Common JQL patterns

常用JQL示例

sh
undefined
sh
undefined

All 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"
undefined

Examples

操作示例

View a ticket

查看工单

sh
acli jira workitem view PROJ-123 --json
sh
acli jira workitem view PROJ-123 --json

View specific fields only

仅查看特定字段

acli jira workitem view PROJ-123 --fields "summary,status,assignee,labels,comment" --json
undefined
acli jira workitem view PROJ-123 --fields "summary,status,assignee,labels,comment" --json
undefined

Search for tickets

搜索工单

sh
undefined
sh
undefined

Search 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
acli jira workitem search --jql "project = PROJ AND assignee = currentUser()"
--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
undefined
acli jira workitem search --jql "project = PROJ AND type = Bug" --count
undefined

Create a ticket

创建工单

sh
undefined
sh
undefined

Basic creation

基础创建

acli jira workitem create
--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

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
acli jira workitem create
--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
undefined
acli jira workitem create
--project "PROJ"
--type "Story"
--summary "用户引导流程"
--description-file description.txt
--json
undefined

Edit a ticket

编辑工单

sh
undefined
sh
undefined

Edit summary and labels

编辑摘要和标签

acli jira workitem edit --key "PROJ-123"
--summary "Updated summary"
--labels "backend,urgent"
--yes --json
acli jira workitem edit --key "PROJ-123"
--summary "更新后的摘要"
--labels "backend,urgent"
--yes --json

Change assignee

更改经办人

acli jira workitem edit --key "PROJ-123"
--assignee "user@company.com"
--yes --json
acli jira workitem edit --key "PROJ-123"
--assignee "user@company.com"
--yes --json

Remove labels

移除标签

acli jira workitem edit --key "PROJ-123"
--remove-labels "stale"
--yes --json
undefined
acli jira workitem edit --key "PROJ-123"
--remove-labels "stale"
--yes --json
undefined

Transition a ticket

状态流转

sh
undefined
sh
undefined

Move 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
undefined
acli jira workitem transition --key "PROJ-1,PROJ-2,PROJ-3" --status "Done" --yes --json
undefined

Assign a ticket

分配工单

sh
undefined
sh
undefined

Assign 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
undefined
acli jira workitem assign --key "PROJ-123" --remove-assignee --yes --json
undefined

Comments

评论操作

sh
undefined
sh
undefined

Add 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
undefined
acli jira workitem comment list --key "PROJ-123" --json
undefined

Projects

项目操作

sh
undefined
sh
undefined

List 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
undefined
acli jira project list --recent --json
undefined

Sprints and boards

迭代与看板

sh
undefined
sh
undefined

Find 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
undefined
acli jira sprint list-workitems --sprint 101 --board 42 --json
undefined

Important tips

重要提示

  • When creating tickets, always ask the user for the project key if not already known. Use
    acli jira project list --json
    to discover available projects.
  • When creating tickets, infer appropriate labels from context (e.g., the area of the codebase, the type of work). Labels help with discoverability.
  • Prefer
    --json
    output for all read operations so you can parse and summarize results for the user.
  • Use
    --yes
    on all write operations to avoid interactive prompts.
  • For large result sets, use
    --limit
    to cap results or
    --paginate
    to fetch everything.
  • 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
    --from-json
    with
    additionalAttributes
    . Generate a template with
    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
~/.config/opencode/skills/acli-jira/boards.md
if it exists. It contains board-specific conventions needed before creating or managing tickets on known boards.
This 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
文件,请阅读该文件。其中包含在已知看板上创建或管理工单所需的看板特定规范。
这样可以将看板规范保密(不提交到版本控制),同时核心技能保持公开。