跳到正文
Skillpedia
任务与项目6.1k · #14430

jira-cli

它能做什么

这项技能教 AI 如何使用 jira 命令行工具处理 Jira 议题和项目数据。适合在 Jira 中管理任务、并希望 AI 处理日常工作的人。

适用场景

  • ✓当你想查找符合某个筛选条件的 Jira 议题时,例如你未关闭的工单。
  • ✓当你需要创建新的 Jira 议题,或修改现有议题的字段时。
  • ✓当你想以清晰的格式获取 Jira 数据,用于报告或摘要时。

技能链接

https://github.com/ankitpokhrel/jira-cli/blob/main/skills/jira-cli/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/ankitpokhrel/jira-cli/blob/main/skills/jira-cli/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请找出所有分配给我、尚未关闭的 Jira 工单,并列出它们的标题和状态。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体使用该工具的内置帮助找到正确的命令,然后以便于处理的简单格式读取 Jira 数据。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Jira CLI

Use this skill when operating Jira through the jira command. Start with jira --help, then inspect the relevant command and subcommand help (for example, jira issue list --help) before using them. The installed CLI's help is the source of truth for its available commands, flags, and syntax; it also contains command-specific examples. This skill adds agent-oriented safety guidance and useful workflow patterns that may not be obvious from the flags.

Prefer machine-readable output

List commands are interactive by default. When reading data programmatically, prefer an output format intended for parsing:

# JSON
jira issue list --raw

# Plain text, optionally selecting fields and omitting headers
jira issue list --plain --columns key,summary --no-headers

# CSV
jira issue list --csv

Use --raw when supported and JSON is needed. Otherwise, use --plain with --columns and --no-headers to minimize parsing ambiguity.

Configuration and fields

The default configuration file is:

$XDG_CONFIG_HOME/.jira/.config.yml

When XDG_CONFIG_HOME is unset, it is:

~/.config/.jira/.config.yml

The configuration file can be used as a data source. It contains the configured project, issue types, and custom field definitions. In particular, inspect issue.types and issue.fields.custom before constructing create, edit, or --custom commands.

Use --config/-c or JIRA_CONFIG_FILE to select another configuration file.

This metadata is created during jira init and, over time, can become out of sync with Jira. Refreshing the configuration with jira init changes local configuration. NEVER do it without obtaining explicit confirmation first.

For custom fields, use --custom key=value. The key is derived from the configured field name in lowercase with words separated by hyphens (for example, Story Points becomes story-points). The expected value format depends on the field type; array values are comma-separated. Only use fields present in the configuration, and inspect their schema rather than guessing the format.

Do not guess a field name, ID, allowed value, or issue type when it is missing or inconsistent. Instead, use another authorized source of truth, such as the Jira UI or API. Some error messages contain relevant data; for instance, when jira issue move fails due to an invalid transition state, it lists available states in the error output. If everything fails, ask the user.

Useful JQL patterns

Use jira issue list --jql (-q) when the built-in filters are insufficient. For example, raw JQL can search across multiple projects, use a saved filter, or approximate a backlog query:

# Issues in either project
jira issue list -q "project IN (PRJ1, PRJ2)"

# Issues matching a saved Jira filter
jira issue list -q "filter='my saved filter'"

# Backlog-style issues (adapt statuses and issue types to the project workflow)
jira issue list -s~Done -q "sprint is empty and issuetype not in (Epic, Sub-task)" --order-by rank --reverse

When the JQL itself contains a project condition, it takes precedence over --project (-p); do not expect -p to further restrict that query.

Safe execution

  • NEVER expose JIRA_API_TOKEN or config credentials; --debug may print auth headers.
  • ALWAYS confirm destructive actions and externally visible changes the user did not explicitly request.
  • Read an issue before updating it when its current state matters. Verify consequential or uncertain updates.
  • Use jira <command> [<subcommand>] --help for flags, requirements, and examples. Supply explicit arguments and use --no-input when supported.
  • Cache useful discoveries for the session.
常见问题

我需要安装 Jira CLI 吗?

需要。这项技能运行 jira 命令,因此必须先安装并设置好该工具。

它既能读取也能修改 Jira 工单吗?

能。这项技能涵盖创建和更新议题,而不仅仅是搜索。

它在哪里找到我的 Jira 设置?

它读取你配置文件夹中的一个配置文件,其中列出了你的项目和自定义字段。

详情

作者的原始描述

Use Jira-CLI to search, inspect, create, or update Jira issues and related project data. Covers machine-readable output, configuration metadata, command discovery, and safe execution.

repo: ankitpokhrel/jira-cli

热度

GitHub 星标
6.1k
排名
#14430
许可证
MIT
更新时间
2026/10/17

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

相似技能