Token导航 LogoToken导航

Agent Skill · 研究检索

atlassian-cli-jira(atlassian CLI Jira 搜索)

用于处理 Jira 项目、任务、缺陷、Sprint、负责人和状态流转。它适合让 Agent 辅助查询工单、汇总迭代进展、创建任务或整理需求和缺陷信息。使用时要确认项目权限、字段配置和工作流规则,不同团队的 Issue 类型、状态和必填字段可能不同;涉及批量改状态、改负责人或创建工单时,应先预览变更内容再执行。

atlassian-cli-jira 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 47,657。

总安装 724周安装 29GitHub Stars 2下载 234核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:atlassian-cli-jira(atlassian CLI Jira 搜索)
来源仓库:https://github.com/benjaming/ai-skills
仓库路径:skills/atlassian-cli-jira
安装命令:
npx skills add https://github.com/benjaming/ai-skills --skill atlassian-cli-jira
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/benjaming/ai-skills --skill atlassian-cli-jira

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

atlassian-cli-jira 通过 acli 命令行工具管理 Jira Cloud 项目、Sprint 和 Issue 生命周期。它支持批量更新状态、修改负责人、导出报表等操作,适合集成到 CI/CD 流水线中。使用前需完成 OAuth 登录或 API token 认证,并熟悉各项目的字段配置和工作流规则。

批量操作前建议先用 --dry-run 预览变更,防止误改关键任务属性。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/atlassian-cli-jira

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/benjaming/ai-skills --skill atlassian-cli-jira;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

atlassian-cli-jira 怎么安装?

在终端执行 npx skills add https://github.com/benjaming/ai-skills --skill atlassian-cli-jira。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

atlassian-cli-jira 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

atlassian-cli-jira 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

atlassian-cli-jira 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

atlassian-cli-jira 用的人多吗?

公开数据是累计安装 724 次,近一周安装 29 次,下载 234 次,GitHub 2 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

atlassian-cli-jira 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
atlassian-cli-jira

atlassian CLI Jira 搜索 · 本页

7242接触敏感数据未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Atlassian CLI for Jira

Overview

Atlassian CLI (acli) is the official command-line interface for Jira Cloud that enables management of work items, projects, and workflows directly from the terminal. Use this skill when:

  • Users request CLI-based Jira operations
  • Bulk operations are needed (updating multiple issues, bulk transitions)
  • Automation or scripting is required
  • Users want to avoid the Jira UI for repetitive tasks

Authentication

Before using any Jira commands, authenticate using OAuth:

# Interactive OAuth login (recommended)
acli jira auth login --web

# Login with API token (for automation)
echo <token> | acli jira auth login --site "mysite.atlassian.net" --email "user@atlassian.com" --token

Work Item Commands

Work items (issues/tickets) are the core of Jira. The CLI uses "workitem" instead of "issue".

Create Work Items

# Basic creation
acli jira workitem create --summary "Fix login bug" --project "PROJ" --type "Bug"

# With additional fields
acli jira workitem create \
  --summary "Add new feature" \
  --project "PROJ" \
  --type "Story" \
  --assignee "user@example.com" \
  --label "frontend,priority" \
  --description "Detailed description here"

# From file content
acli jira workitem create --from-file "description.txt" --project "PROJ" --type "Task"

# From JSON (for complex work items)
acli jira workitem create --generate-json  # Generate template
acli jira workitem create --from-json "workitem.json"

# With ADF description (rich formatting)
acli jira workitem create \
  --summary "Implement user authentication" \
  --project "PROJ" \
  --type "Story" \
  --description '{
    "version": 1,
    "type": "doc",
    "content": [
      {
        "type": "paragraph",
        "content": [
          {"type": "text", "text": "Implement secure user authentication with the following requirements:", "marks": [{"type": "strong"}]}
        ]
      },
      {
        "type": "bulletList",
        "content": [
          {
            "type": "listItem",
            "content": [
              {
                "type": "paragraph",
                "content": [
                  {"type": "text", "text": "OAuth 2.0 support"}
                ]
              }
            ]
          },
          {
            "type": "listItem",
            "content": [
              {
                "type": "paragraph",
                "content": [
                  {"type": "text", "text": "JWT token management"}
                ]
              }
            ]
          }
        ]
      }
    ]
  }'

# ADF description from file
acli jira workitem create \
  --summary "Database migration" \
  --project "PROJ" \
  --type "Task" \
  --description-file "description.adf.json"

Key flags:

  • --summary (required): Work item title
  • --project (required): Project key (e.g., "TEAM", "PROJ")
  • --type (required): Work item type ("Task", "Bug", "Story", "Epic")
  • --assignee: Email or account ID, use '@me' for self-assignment
  • --label: Comma-separated labels
  • --description: Plain text or Atlassian Document Format (ADF)
  • --description-file: Read description from file (plain text or ADF)

View Work Items

# View single work item
acli jira workitem view KEY-123

# View as JSON
acli jira workitem view KEY-123 --json

# View specific fields only
acli jira workitem view KEY-123 --fields summary,status,assignee,comment

# Open in browser
acli jira workitem view KEY-123 --web

Search Work Items

Use JQL (Jira Query Language) to search:

# Basic search
acli jira workitem search --jql "project = TEAM"

# Complex search with pagination
acli jira workitem search --jql "project = TEAM AND status = 'In Progress'" --paginate

# Get count only
acli jira workitem search --jql "assignee = currentUser()" --count

# Export to CSV with specific fields
acli jira workitem search \
  --jql "project = TEAM" \
  --fields "key,summary,status,assignee" \
  --csv

Common JQL patterns:

  • project = TEAM - All work items in project
  • assignee = currentUser() - Assigned to you
  • status = 'In Progress' - Specific status
  • created >= -7d - Created in last 7 days
  • priority = High - High priority items
  • labels = backend - With specific label

Edit Work Items

# Edit by key
acli jira workitem edit --key "KEY-1" --summary "Updated summary"

# Bulk edit by multiple keys
acli jira workitem edit --key "KEY-1,KEY-2,KEY-3" --assignee "user@example.com"

# Edit via JQL query (powerful for bulk operations)
acli jira workitem edit \
  --jql "project = TEAM AND status = 'To Do'" \
  --assignee "user@example.com"

# Edit via filter
acli jira workitem edit --filter 10001 --description "Updated description" --yes

# Update description from file
acli jira workitem edit --key "KEY-1" --description-file "new-description.txt"

# Update with ADF description (rich formatting)
acli jira workitem edit --key "KEY-1" --description '{
  "version": 1,
  "type": "doc",
  "content": [
    {
      "type": "paragraph",
      "content": [
        {"type": "text", "text": "Updated requirements:", "marks": [{"type": "strong"}]}
      ]
    },
    {
      "type": "orderedList",
      "content": [
        {
          "type": "listItem",
          "content": [
            {
              "type": "paragraph",
              "content": [
                {"type": "text", "text": "Add error handling"}
              ]
            }
          ]
        },
        {
          "type": "listItem",
          "content": [
            {
              "type": "paragraph",
              "content": [
                {"type": "text", "text": "Implement logging"}
              ]
            }
          ]
        }
      ]
    }
  ]
}'

# ADF description from file for bulk update
acli jira workitem edit \
  --jql "project = TEAM AND sprint = 'Sprint 10'" \
  --description-file "sprint-goals.adf.json"

# From JSON for complex updates
acli jira workitem edit --generate-json  # Generate template
acli jira workitem edit --from-json "update.json"

Key flags:

  • --key: Single or comma-separated keys
  • --jql: JQL query for bulk operations
  • --filter: Filter ID to target work items
  • --summary: Update summary
  • --description: Update description (plain text or ADF)
  • --description-file: Read description from file (plain text or ADF)
  • --assignee: Change assignee (use '@me' for self, 'default' for project default)
  • --yes: Skip confirmation (use with caution)

Transition Work Items

Change work item status through workflow transitions:

# Transition by key
acli jira workitem transition --key "KEY-1" --status "In Progress"

# Bulk transition by keys
acli jira workitem transition --key "KEY-1,KEY-2" --status "Done"

# Transition via JQL (very powerful)
acli jira workitem transition \
  --jql "project = TEAM AND status = 'To Do'" \
  --status "In Progress"

# Transition via filter
acli jira workitem transition --filter 10001 --status "Done" --yes

Assign Work Items

# Assign by key
acli jira workitem assign --key "KEY-1" --assignee "user@example.com"

# Self-assign
acli jira workitem assign --key "KEY-1" --assignee "@me"

# Assign to default
acli jira workitem assign --key "KEY-1" --assignee "default"

# Unassign
acli jira workitem assign --key "KEY-1" --assignee ""

# Bulk assign via JQL
acli jira workitem assign --jql "project = TEAM" --assignee "user@example.com"

Clone Work Items

# Clone single work item
acli jira workitem clone --key "KEY-1" --to-project "TEAM"

# Clone multiple work items
acli jira workitem clone --key "KEY-1,KEY-2" --to-project "NEWTEAM"

# Clone via JQL
acli jira workitem clone --jql "project = TEAM" --to-project "ARCHIVE"

# Clone from filter
acli jira workitem clone --filter 10001 --to-project "TEAM"

# Clone from file with work item keys
acli jira workitem clone --from-file "keys.txt" --to-project "TEAM"

Delete Work Items

# Delete single work item
acli jira workitem delete --key "KEY-1"

# Delete multiple work items
acli jira workitem delete --key "KEY-1,KEY-2,KEY-3"

# Delete via JQL
acli jira workitem delete --jql "project = OLDPROJECT"

# Delete via filter with auto-confirmation
acli jira workitem delete --filter 10001 --yes

Archive/Unarchive Work Items

# Archive work items
acli jira workitem archive --key "KEY-1,KEY-2"
acli jira workitem archive --jql "project = TEAM AND status = Done"

# Unarchive work items
acli jira workitem unarchive --key "KEY-1"
acli jira workitem unarchive --jql "project = TEAM"

Comments

Create Comments

# Create comment on single work item
acli jira workitem comment create --key "KEY-1" --body "This is a comment"

# Create comment on multiple work items
acli jira workitem comment create --key "KEY-1,KEY-2" --body "Bulk comment"

# Create comment via JQL
acli jira workitem comment create \
  --jql "project = TEAM" \
  --body "Comment on all work items"

# Create comment from file
acli jira workitem comment create --key "KEY-1" --body-file "comment.txt"

Create Comments with ADF (Rich Formatting)

ADF (Atlassian Document Format) enables rich text formatting in comments. The acli automatically detects ADF when you provide valid JSON, so no special flag is needed.

Important: Comments only support plain text or ADF. Markdown is NOT supported.

ADF Node Support: Comments vs Descriptions

Jira comments have a restricted ADF subset compared to descriptions. Using unsupported nodes will cause "Comment body is not valid!" errors.

✅ Safe for Comments:

  • Block nodes: paragraph, bulletList, orderedList, codeBlock
  • Inline nodes: text, hardBreak, mention
  • Text marks: strong, em, code, link, strike, underline

❌ NOT Supported in Comments:

  • heading (use bold paragraph instead)
  • panel (use regular paragraph)
  • table, tableRow, tableCell
  • blockquote (may not work)
  • emoji, date (may not work)
  • rule (horizontal rule - may not work)

✅ Safe for Descriptions (work item create/edit):

  • All comment nodes PLUS: heading, panel, table, and more

Best practice: Test ADF on a single work item before bulk operations.

Simple formatted comment (inline)
acli jira workitem comment create --key "KEY-1" --body '{
  "version": 1,
  "type": "doc",
  "content": [
    {
      "type": "paragraph",
      "content": [
        {"type": "text", "text": "Status update: "},
        {"type": "text", "text": "bug fixed", "marks": [{"type": "strong"}]},
        {"type": "text", "text": " and ready for testing."}
      ]
    }
  ]
}'
Comment with multiple paragraphs
acli jira workitem comment create --key "KEY-1" --body '{
  "version": 1,
  "type": "doc",
  "content": [
    {
      "type": "paragraph",
      "content": [
        {"type": "text", "text": "Completed the following tasks:"}
      ]
    },
    {
      "type": "bulletList",
      "content": [
        {
          "type": "listItem",
          "content": [
            {
              "type": "paragraph",
              "content": [
                {"type": "text", "text": "Fixed authentication bug"}
              ]
            }
          ]
        },
        {
          "type": "listItem",
          "content": [
            {
              "type": "paragraph",
              "content": [
                {"type": "text", "text": "Updated API documentation"}
              ]
            }
          ]
        }
      ]
    }
  ]
}'
Comment with code block
acli jira workitem comment create --key "KEY-1" --body '{
  "version": 1,
  "type": "doc",
  "content": [
    {
      "type": "paragraph",
      "content": [
        {"type": "text", "text": "Error found in the authentication handler:"}
      ]
    },
    {
      "type": "codeBlock",
      "attrs": {"language": "javascript"},
      "content": [
        {
          "type": "text",
          "text": "if (user.token === null) {\n  throw new Error(\"Invalid token\");\n}"
        }
      ]
    }
  ]
}'
Comment with user mention
acli jira workitem comment create --key "KEY-1" --body '{
  "version": 1,
  "type": "doc",
  "content": [
    {
      "type": "paragraph",
      "content": [
        {
          "type": "mention",
          "attrs": {"id": "557058:f58131cb-b67d-43c7-b30d-6b58d40bd077"}
        },
        {"type": "text", "text": " can you review this change?"}
      ]
    }
  ]
}'

Note: To mention a user, you need their Atlassian account ID. Get it from user profile or API.

ADF from file (recommended for complex comments)
# Create ADF file: comment.adf.json
cat > comment.adf.json << 'EOF'
{
  "version": 1,
  "type": "doc",
  "content": [
    {
      "type": "paragraph",
      "content": [
        {"type": "text", "text": "Release Notes v2.5.0", "marks": [{"type": "strong"}]}
      ]
    },
    {
      "type": "paragraph",
      "content": [
        {"type": "text", "text": "Key changes in this release:"}
      ]
    },
    {
      "type": "bulletList",
      "content": [
        {
          "type": "listItem",
          "content": [
            {
              "type": "paragraph",
              "content": [
                {"type": "text", "text": "Performance improvements", "marks": [{"type": "strong"}]}
              ]
            }
          ]
        },
        {
          "type": "listItem",
          "content": [
            {
              "type": "paragraph",
              "content": [
                {"type": "text", "text": "Bug fixes for edge cases"}
              ]
            }
          ]
        }
      ]
    }
  ]
}
EOF

# Use the ADF file
acli jira workitem comment create --key "KEY-1" --body-file "comment.adf.json"

# Or add to multiple work items
acli jira workitem comment create --key "KEY-1,KEY-2,KEY-3" --body-file "comment.adf.json"
Common ADF formatting patterns

Bold text:

{"type": "text", "text": "bold text", "marks": [{"type": "strong"}]}

Italic text:

{"type": "text", "text": "italic text", "marks": [{"type": "em"}]}

Inline code:

{"type": "text", "text": "code", "marks": [{"type": "code"}]}

Link:

{
  "type": "text",
  "text": "Click here",
  "marks": [{"type": "link", "attrs": {"href": "https://example.com"}}]
}

Multiple marks (bold + italic):

{
  "type": "text",
  "text": "bold and italic",
  "marks": [{"type": "strong"}, {"type": "em"}]
}

List Comments

# List all comments for a work item
acli jira workitem comment list --key "KEY-1"

# List as JSON
acli jira workitem comment list --key "KEY-1" --json

Get Comment Visibility Options

# Get available visibility options
acli jira workitem comment visibility

Attachments

List Attachments

# List attachments for a work item
acli jira workitem attachment list --key "KEY-1"

# List as JSON
acli jira workitem attachment list --key "KEY-1" --json

Download Attachments (API Workaround)

The CLI cannot download attachment content. Use the Jira REST API directly.

Requires env vars: JIRA_EMAIL, JIRA_API_TOKEN, JIRA_BASE_URL

Download single attachment:

# First list attachments to get ID and filename
acli jira workitem attachment list --key "KEY-1" --json

# Download by attachment ID
curl -L \
  -u "$JIRA_EMAIL:$JIRA_API_TOKEN" \
  "$JIRA_BASE_URL/rest/api/3/attachment/content/$ATTACHMENT_ID" \
  --output "$ATTACHMENT_NAME"

Download all attachments for an issue:

# Get all attachment IDs and names, then download each
acli jira workitem attachment list --key "KEY-1" --json | \
  jq -r '.[] | "\(.id) \(.filename)"' | \
  while read -r id name; do
    curl -L -u "$JIRA_EMAIL:$JIRA_API_TOKEN" \
      "$JIRA_BASE_URL/rest/api/3/attachment/content/$id" \
      --output "$name"
  done

Project Commands

List Projects

# List default projects (30)
acli jira project list

# List recently viewed projects
acli jira project list --recent

# List all projects with pagination
acli jira project list --paginate

# List with custom limit
acli jira project list --limit 50

# Export to JSON
acli jira project list --json

View Project

# View project details
acli jira project view --project-key "TEAM"

# View as JSON
acli jira project view --project-key "TEAM" --json

Create Project

# Create from existing project
acli jira project create \
  --from-project "TEAM" \
  --key "NEWTEAM" \
  --name "New Project"

# With additional details
acli jira project create \
  --from-project "TEAM" \
  --key "NEWTEAM" \
  --name "New Project" \
  --description "Project description" \
  --url "https://example.com" \
  --lead-email "user@example.com"

# From JSON
acli jira project create --generate-json  # Generate template
acli jira project create --from-json "project.json"

Update Project

# Update project key and name
acli jira project update \
  --project-key "TEAM1" \
  --key "TEAM" \
  --name "Updated Name"

# From JSON
acli jira project update --generate-json  # Generate template
acli jira project update --from-json "project.json"

Archive/Restore Projects

# Archive project
acli jira project archive --project-key "OLDTEAM"

# Restore archived project
acli jira project restore --project-key "OLDTEAM"

Delete Project

# Delete project
acli jira project delete --project-key "OLDPROJECT"

Dashboard Commands

# Dashboard operations (check documentation for specific commands)
acli jira dashboard --help

Filter Commands

# Filter operations (check documentation for specific commands)
acli jira filter --help

Best Practices

Bulk Operations

For bulk operations, use JQL or filters instead of comma-separated keys when possible:

# Good: Use JQL for flexible bulk operations
acli jira workitem edit --jql "project = TEAM AND status = 'To Do'" --assignee "@me"

# Good: Use filters for reusable bulk operations
acli jira workitem transition --filter 10001 --status "Done" --yes

Safety

Use --yes flag cautiously, especially with delete operations:

# Preview first by running without --yes
acli jira workitem delete --jql "project = OLDPROJECT"

# Add --yes only after verifying
acli jira workitem delete --jql "project = OLDPROJECT" --yes

JSON Templates

For complex operations, generate JSON templates first:

# Generate template
acli jira workitem create --generate-json > template.json

# Edit template.json with your data
# Then create from JSON
acli jira workitem create --from-json "template.json"

Output Formats

Use appropriate output formats for different use cases:

# Human-readable (default)
acli jira workitem view KEY-1

# JSON for scripting/parsing
acli jira workitem view KEY-1 --json

# CSV for spreadsheets
acli jira workitem search --jql "project = TEAM" --csv

Working with ADF

When working with ADF (Atlassian Document Format) for rich formatting:

When to use ADF vs Plain Text

Use ADF when you need:

  • Rich text formatting (bold, italic, underline)
  • Structured content (lists, headings, tables)
  • Code blocks with syntax highlighting
  • User mentions (@mentions)
  • Links embedded in text
  • Complex layouts

Use plain text when:

  • Simple status updates or short notes
  • Automation scripts where formatting isn't needed
  • Quick comments without special formatting
  • Performance is critical (ADF is more verbose)
Auto-detection

The acli automatically detects whether input is plain text or ADF JSON. No special flag is required:

# Plain text - automatically detected
acli jira workitem comment create --key "KEY-1" --body "Simple comment"

# ADF - automatically detected by JSON structure
acli jira workitem comment create --key "KEY-1" --body '{"version": 1, "type": "doc", "content": [...]}'
Best practices for ADF

1. Use files for reusability:

# Create reusable ADF templates
cat > templates/status-update.adf.json << 'EOF'
{
  "version": 1,
  "type": "doc",
  "content": [...]
}
EOF

# Reuse across multiple work items
acli jira workitem comment create --key "KEY-1,KEY-2" --body-file "templates/status-update.adf.json"

2. Test ADF before bulk operations:

# Test on single work item first
acli jira workitem comment create --key "KEY-TEST" --body-file "comment.adf.json"

# Verify it looks correct in Jira UI
acli jira workitem view KEY-TEST --web

# Then apply to multiple items
acli jira workitem comment create --jql "project = TEAM" --body-file "comment.adf.json"

3. Keep ADF simple and maintainable:

# Good: Simple, readable structure
{
  "version": 1,
  "type": "doc",
  "content": [
    {
      "type": "paragraph",
      "content": [
        {"type": "text", "text": "Status: "},
        {"type": "text", "text": "Complete", "marks": [{"type": "strong"}]}
      ]
    }
  ]
}

# Avoid: Overly complex nested structures that are hard to maintain

4. Validate ADF structure:

Ensure your ADF always includes:

  • "version": 1 - Required ADF version
  • "type": "doc" - Required root node type
  • "content": [...] - Array of block nodes (can be empty)

5. Common patterns for building ADF programmatically:

# Using jq to build ADF dynamically
ISSUE_KEY="KEY-1"
STATUS="Complete"

jq -n --arg status "$STATUS" '{
  "version": 1,
  "type": "doc",
  "content": [
    {
      "type": "paragraph",
      "content": [
        {"type": "text", "text": "Status: "},
        {"type": "text", "text": $status, "marks": [{"type": "strong"}]}
      ]
    }
  ]
}' | acli jira workitem comment create --key "$ISSUE_KEY" --body "$(cat)"
Common ADF issues and solutions

Issue: "Comment body is not valid!" error

  • Cause: Using ADF nodes that aren't supported in comments (heading, panel, table, etc.)
  • Solution: Stick to safe comment nodes: paragraph, bulletList, orderedList, codeBlock, text, and basic marks
  • Example fix: Replace {"type": "heading"} with {"type": "paragraph", "content": [{"type": "text", "text": "...", "marks": [{"type": "strong"}]}]}

Issue: Comment appears as raw JSON text

  • Cause: Invalid ADF structure or missing required fields
  • Solution: Validate that version, type, and content are present

Issue: Special characters break the ADF

  • Cause: Unescaped quotes or special characters in bash
  • Solution: Use files (--body-file) instead of inline JSON for complex content

Issue: User mention doesn't work

  • Cause: Incorrect account ID format
  • Solution: Get exact account ID from user profile or API, format: 557058:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

Issue: ADF works in descriptions but fails in comments

  • Cause: Comments have a more restricted ADF subset than descriptions
  • Solution: See "ADF Node Support: Comments vs Descriptions" section above for safe nodes

ADF Quick Reference

Complete reference for ADF (Atlassian Document Format) node types and formatting options.

Basic Structure

Minimum valid ADF document:

{
  "version": 1,
  "type": "doc",
  "content": []
}

Simple paragraph:

{
  "version": 1,
  "type": "doc",
  "content": [
    {
      "type": "paragraph",
      "content": [
        {"type": "text", "text": "Hello world"}
      ]
    }
  ]
}

Text Formatting (Marks)

Bold (strong):

{"type": "text", "text": "bold text", "marks": [{"type": "strong"}]}

Italic (emphasis):

{"type": "text", "text": "italic text", "marks": [{"type": "em"}]}

Underline:

{"type": "text", "text": "underlined", "marks": [{"type": "underline"}]}

Strikethrough:

{"type": "text", "text": "deleted", "marks": [{"type": "strike"}]}

Inline code:

{"type": "text", "text": "code", "marks": [{"type": "code"}]}

Link:

{
  "type": "text",
  "text": "Click here",
  "marks": [
    {
      "type": "link",
      "attrs": {"href": "https://example.com"}
    }
  ]
}

Combined formatting (bold + italic):

{
  "type": "text",
  "text": "bold and italic",
  "marks": [
    {"type": "strong"},
    {"type": "em"}
  ]
}

Headings

⚠️ NOT supported in comments - Use bold paragraphs instead. Works in descriptions only.

Heading levels 1-6:

{
  "type": "heading",
  "attrs": {"level": 1},
  "content": [
    {"type": "text", "text": "Heading 1"}
  ]
}

Available levels: 1, 2, 3, 4, 5, 6

Comment-safe alternative:

{
  "type": "paragraph",
  "content": [
    {"type": "text", "text": "Heading Text", "marks": [{"type": "strong"}]}
  ]
}

Lists

Bullet list:

{
  "type": "bulletList",
  "content": [
    {
      "type": "listItem",
      "content": [
        {
          "type": "paragraph",
          "content": [
            {"type": "text", "text": "First item"}
          ]
        }
      ]
    },
    {
      "type": "listItem",
      "content": [
        {
          "type": "paragraph",
          "content": [
            {"type": "text", "text": "Second item"}
          ]
        }
      ]
    }
  ]
}

Ordered list:

{
  "type": "orderedList",
  "content": [
    {
      "type": "listItem",
      "content": [
        {
          "type": "paragraph",
          "content": [
            {"type": "text", "text": "First item"}
          ]
        }
      ]
    }
  ]
}

Nested lists:

{
  "type": "bulletList",
  "content": [
    {
      "type": "listItem",
      "content": [
        {
          "type": "paragraph",
          "content": [
            {"type": "text", "text": "Parent item"}
          ]
        },
        {
          "type": "bulletList",
          "content": [
            {
              "type": "listItem",
              "content": [
                {
                  "type": "paragraph",
                  "content": [
                    {"type": "text", "text": "Nested item"}
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}

Code Blocks

Code block with language:

{
  "type": "codeBlock",
  "attrs": {"language": "javascript"},
  "content": [
    {
      "type": "text",
      "text": "function hello() {\n  console.log('Hello');\n}"
    }
  ]
}

Supported languages: javascript, python, java, typescript, bash, sql, json, xml, html, css, etc.

Code block without language:

{
  "type": "codeBlock",
  "content": [
    {"type": "text", "text": "Plain code block"}
  ]
}

Mentions

User mention:

{
  "type": "mention",
  "attrs": {
    "id": "557058:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
  }
}

Note: Get user account ID from Jira user profile or API.

Panels (Colored Blocks)

⚠️ NOT supported in comments - Use regular paragraphs instead. Works in descriptions only.

Info panel:

{
  "type": "panel",
  "attrs": {"panelType": "info"},
  "content": [
    {
      "type": "paragraph",
      "content": [
        {"type": "text", "text": "This is an info panel"}
      ]
    }
  ]
}

Panel types: info, note, warning, error, success

Block Quote

{
  "type": "blockquote",
  "content": [
    {
      "type": "paragraph",
      "content": [
        {"type": "text", "text": "This is a quote"}
      ]
    }
  ]
}

Horizontal Rule

{
  "type": "rule"
}

Hard Break

Line break within paragraph:

{
  "type": "paragraph",
  "content": [
    {"type": "text", "text": "First line"},
    {"type": "hardBreak"},
    {"type": "text", "text": "Second line"}
  ]
}

Emoji

{
  "type": "emoji",
  "attrs": {
    "shortName": ":smile:",
    "id": "1f604",
    "text": "😄"
  }
}

Date

{
  "type": "date",
  "attrs": {
    "timestamp": "1672531200000"
  }
}

Ready-to-Use Templates

Status update with formatting:

{
  "version": 1,
  "type": "doc",
  "content": [
    {
      "type": "paragraph",
      "content": [
        {"type": "text", "text": "Status: ", "marks": [{"type": "strong"}]},
        {"type": "text", "text": "Completed ✓", "marks": [{"type": "strong"}, {"type": "em"}]}
      ]
    },
    {
      "type": "paragraph",
      "content": [
        {"type": "text", "text": "Next steps: Review and merge PR"}
      ]
    }
  ]
}

Bug report with code:

{
  "version": 1,
  "type": "doc",
  "content": [
    {
      "type": "paragraph",
      "content": [
        {"type": "text", "text": "Found a bug in the authentication handler:", "marks": [{"type": "strong"}]}
      ]
    },
    {
      "type": "codeBlock",
      "attrs": {"language": "javascript"},
      "content": [
        {"type": "text", "text": "if (token === undefined) {\n  // Missing validation\n}"}
      ]
    },
    {
      "type": "paragraph",
      "content": [
        {"type": "text", "text": "Expected behavior: Should throw an error when token is undefined"}
      ]
    }
  ]
}

Release notes (for descriptions only - uses heading and panel):

{
  "version": 1,
  "type": "doc",
  "content": [
    {
      "type": "heading",
      "attrs": {"level": 3},
      "content": [
        {"type": "text", "text": "Release v2.5.0"}
      ]
    },
    {
      "type": "panel",
      "attrs": {"panelType": "success"},
      "content": [
        {
          "type": "paragraph",
          "content": [
            {"type": "text", "text": "Ready for production deployment"}
          ]
        }
      ]
    },
    {
      "type": "paragraph",
      "content": [
        {"type": "text", "text": "New features:", "marks": [{"type": "strong"}]}
      ]
    },
    {
      "type": "bulletList",
      "content": [
        {
          "type": "listItem",
          "content": [
            {
              "type": "paragraph",
              "content": [
                {"type": "text", "text": "Enhanced authentication"}
              ]
            }
          ]
        },
        {
          "type": "listItem",
          "content": [
            {
              "type": "paragraph",
              "content": [
                {"type": "text", "text": "Performance improvements"}
              ]
            }
          ]
        }
      ]
    }
  ]
}

Release notes (comment-safe version):

{
  "version": 1,
  "type": "doc",
  "content": [
    {
      "type": "paragraph",
      "content": [
        {"type": "text", "text": "Release v2.5.0", "marks": [{"type": "strong"}]}
      ]
    },
    {
      "type": "paragraph",
      "content": [
        {"type": "text", "text": "✅ Ready for production deployment", "marks": [{"type": "em"}]}
      ]
    },
    {
      "type": "paragraph",
      "content": [
        {"type": "text", "text": "New features:", "marks": [{"type": "strong"}]}
      ]
    },
    {
      "type": "bulletList",
      "content": [
        {
          "type": "listItem",
          "content": [
            {
              "type": "paragraph",
              "content": [
                {"type": "text", "text": "Enhanced authentication"}
              ]
            }
          ]
        },
        {
          "type": "listItem",
          "content": [
            {
              "type": "paragraph",
              "content": [
                {"type": "text", "text": "Performance improvements"}
              ]
            }
          ]
        }
      ]
    }
  ]
}

Integration with Claude Code

When using this skill in Claude Code:

  1. Always check authentication first: Run acli jira auth login --web if needed
  2. Use bash_tool: Execute acli commands using bash_tool
  3. Parse output: Use --json flag for programmatic parsing
  4. Handle errors: Check return codes and provide helpful error messages
  5. Confirm destructive operations: Always warn before delete/bulk operations
  6. Use JQL for filtering: Prefer JQL over manual key lists for bulk operations

Common Use Cases

Daily Workflow

# View your assigned work items
acli jira workitem search --jql "assignee = currentUser() AND status != Done"

# Transition work to in progress
acli jira workitem transition --key "KEY-1" --status "In Progress"

# Add comment
acli jira workitem comment create --key "KEY-1" --body "Started working on this"

Bulk Updates

# Reassign all open items in a sprint
acli jira workitem edit \
  --jql "sprint = 'Sprint 10' AND status != Done" \
  --assignee "new-owner@example.com"

# Close all resolved items
acli jira workitem transition \
  --jql "project = TEAM AND resolution is not EMPTY" \
  --status "Done"

Project Migration

# Clone all items from one project to another
acli jira workitem clone \
  --jql "project = OLDTEAM" \
  --to-project "NEWTEAM"

# Archive old project
acli jira project archive --project-key "OLDTEAM"

Reporting

# Export all items to CSV
acli jira workitem search \
  --jql "project = TEAM AND created >= -30d" \
  --fields "key,summary,status,assignee,created" \
  --csv > report.csv

# Count items by status
acli jira workitem search --jql "project = TEAM AND status = 'To Do'" --count
acli jira workitem search --jql "project = TEAM AND status = 'In Progress'" --count
acli jira workitem search --jql "project = TEAM AND status = 'Done'" --count

Help and Documentation

Get help for any command:

# Main help
acli --help

# Jira commands help
acli jira --help

# Work item commands help
acli jira workitem --help

# Specific command help
acli jira workitem create --help

Important Notes

  • Work items vs Issues: ACLI uses "workitem" terminology instead of "issue"
  • Authentication required: Must authenticate before using any commands
  • Cloud only: ACLI is for Jira Cloud, not Data Center or Server
  • Atlassian Government Cloud: Not supported
  • Pagination: Use --paginate for large result sets
  • Rate limits: Be mindful of API rate limits for bulk operations

平台分布

Codex

37.68%
按下载量换算88

Claude

28.18%
按下载量换算66

Cursor

20.19%
按下载量换算47

Gemini CLI

10.67%
按下载量换算25

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills