fetching-jira-ticket
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseFetching Jira Ticket
提取Jira工单
Purpose
用途
Dispatch the subagent to extract every available field from
a Jira ticket and its subtasks, then write a comprehensive Markdown snapshot
to . This file becomes the single source of truth for all downstream
skills (planning, subtask creation, execution, validation).
ticket-retrieverdocs/This skill is a pure coordinator — it dispatches one subagent and reports
the result. It never makes Jira API calls, reads files, writes files, or
runs commands directly.
调度子Agent从Jira工单及其子任务中提取所有可用字段,然后将完整的Markdown快照写入目录。该文件将成为所有下游技能(规划、子任务创建、执行、验证)的唯一可信数据源。
ticket-retrieverdocs/本技能是纯协调器——它仅调度一个子Agent并上报结果,不会直接调用Jira API、读写文件或运行命令。
Inputs
输入
| Input | Source | Required | Example |
|---|---|---|---|
| User / | Yes | |
| User (optional) | No | |
If the user provides a full URL, pass it along to the subagent which will
extract the ticket key from it.
| 输入 | 来源 | 必填 | 示例 |
|---|---|---|---|
| 用户 / | 是 | |
| 用户(可选) | 否 | |
如果用户提供了完整URL,将其传递给子Agent,子Agent会从中提取工单key。
Output
输出
A Markdown file at:
docs/<TICKET_KEY>.mdMarkdown文件路径:
docs/<TICKET_KEY>.mdOutput contract (consumed by downstream skills)
输出契约(供下游技能使用)
Every section below must appear in the output file. If a section has no
data, the subagent keeps the heading and writes beneath it — never
omits a heading. Downstream skills parse these headings programmatically, so
missing headings break the pipeline.
_None_| Section | Required by | Why |
|---|---|---|
| planning-jira-tasks | Task decomposition needs ticket context |
| planning-jira-tasks | Primary source for requirements |
| planning-jira-tasks, task-validator | Maps to Definition of Done |
| planning-jira-tasks | Contains decisions and clarifications |
| planning-jira-tasks, creating-jira-subtasks | Avoids duplicating existing work |
| planning-jira-tasks | Dependency and context awareness |
| executing-jira-task | Implementation reference |
| planning-jira-tasks | May contain acceptance criteria |
以下所有部分必须出现在输出文件中。如果某个部分没有数据,子Agent会保留标题并在下方填写——不得省略任何标题。下游技能会通过编程方式解析这些标题,因此缺失标题会导致流水线中断。
_None_| 部分 | 被以下模块依赖 | 用途 |
|---|---|---|
| planning-jira-tasks | 任务拆解需要工单上下文 |
| planning-jira-tasks | 需求的主要来源 |
| planning-jira-tasks, task-validator | 对应完成定义 |
| planning-jira-tasks | 包含决策和澄清内容 |
| planning-jira-tasks, creating-jira-subtasks | 避免重复现有工作 |
| planning-jira-tasks | 感知依赖和上下文 |
| executing-jira-task | 实现参考 |
| planning-jira-tasks | 可能包含验收标准 |
Subagent Registry
子Agent注册表
| Subagent | Path | Purpose |
|---|---|---|
| | End-to-end: retrieves all data, assembles document, writes, validates |
Before dispatching, read the subagent file to understand its input/output
contract. The path is relative to this skill's directory.
| 子Agent | 路径 | 用途 |
|---|---|---|
| | 端到端执行:提取所有数据、组装文档、写入、验证 |
调度前请阅读子Agent文件以了解其输入输出契约,路径是相对于本技能目录的相对路径。
Multi-Platform MCP Compatibility
多平台MCP兼容性
Jira data is accessed through MCP tools, but the specific tool names and
interfaces vary across platforms (Cursor, Claude Code, OpenCode). The
subagent handles MCP tool discovery internally — this
skill does not need to know which tools are available.
ticket-retrieverJira数据通过MCP工具访问,但不同平台(Cursor、Claude Code、OpenCode)的具体工具名称和接口存在差异。子Agent会内部处理MCP工具发现——本技能不需要知道可用工具的具体信息。
ticket-retrieverExecution Steps
执行步骤
1. Dispatch ticket-retriever
ticket-retriever1. 调度ticket-retriever
ticket-retrieverRead and dispatch the subagent with:
./subagents/ticket-retriever.md- — the ticket key extracted from the user's input.
TICKET_KEY - — if the user provided a full URL, include it.
JIRA_URL
The subagent handles everything end-to-end:
- Validates the input format.
- Discovers available Jira MCP tools.
- Retrieves all parent ticket fields, comments, attachments metadata.
- Retrieves all subtasks and linked issues (full details, regardless of count).
- Handles pagination, auth errors, and rate limits.
- Runs .
mkdir -p docs - Assembles the document using the standardised template.
- Writes to .
docs/<TICKET_KEY>.md - Validates the output (all sections present, counts match).
- Cleans up any temporary files.
- Returns a concise summary.
读取并使用以下参数调度子Agent:
./subagents/ticket-retriever.md- ——从用户输入中提取的工单key。
TICKET_KEY - ——如果用户提供了完整URL则包含该参数。
JIRA_URL
子Agent会端到端处理所有流程:
- 验证输入格式。
- 发现可用的Jira MCP工具。
- 提取所有父工单字段、评论、附件元数据。
- 提取所有子任务和关联工单(完整详情,不受数量限制)。
- 处理分页、鉴权错误和速率限制。
- 运行命令。
mkdir -p docs - 使用标准化模板组装文档。
- 写入到路径。
docs/<TICKET_KEY>.md - 验证输出(所有章节存在、数量匹配)。
- 清理所有临时文件。
- 返回简洁的汇总信息。
2. Handle the result
2. 处理结果
Collect the subagent's summary. Check the summary for errors:
- If the subagent reports a fatal error (ticket not found, auth failure): relay the error to the user and stop.
- If the subagent reports validation FAIL: relay the validation details to the user. Offer to retry.
- If validation PASS: proceed to step 3.
收集子Agent的汇总信息,检查汇总中的错误:
- 如果子Agent报告致命错误(工单未找到、鉴权失败):将错误转达给用户并停止执行。
- 如果子Agent报告验证失败:将验证详情转达给用户,提供重试选项。
- 如果验证通过:进入第3步。
3. Report to the user
3. 向用户反馈
Using ONLY the information from the subagent's summary, tell the user:
- The file path written (e.g., ).
docs/JNS-6065.md - A short summary: ticket title, status, number of comments, number of subtasks and linked issues retrieved.
- Any retrieval errors or warnings.
- Remind the user this is retrieval only — no ticket modifications, no branches, no code, no implementation.
仅使用子Agent汇总中的信息告知用户以下内容:
- 写入的文件路径(例如)。
docs/JNS-6065.md - 简短汇总:工单标题、状态、评论数量、提取到的子任务和关联工单数量。
- 任何提取错误或警告。
- 提醒用户本功能仅执行提取操作——不会修改工单、创建分支、编写代码或进行任何实现操作。
Execution Rules
执行规则
- Delegate everything. This skill dispatches the subagent and reports its summary. It never makes Jira API calls, reads files, writes files, or runs commands directly.
ticket-retriever - Do not load raw data. The subagent's summary is the only data this skill processes. Never ask the subagent to return file contents or raw API responses.
- Retrieve only. Do not modify the Jira ticket. Do not start implementation, create branches, write code, or propose solutions.
- Fail gracefully. If the subagent reports partial failures (some subtasks could not be retrieved), relay the specifics to the user but do not treat partial success as a fatal error.
- 所有任务委托执行。本技能仅调度子Agent并上报其汇总结果,绝不会直接调用Jira API、读写文件或运行命令。
ticket-retriever - 不加载原始数据。本技能仅处理子Agent的汇总信息,绝不要求子Agent返回文件内容或原始API响应。
- 仅执行提取操作。不得修改Jira工单,不得启动实现、创建分支、编写代码或提出解决方案。
- 优雅失败。如果子Agent报告部分失败(部分子任务无法提取),将具体信息转达给用户,但不要将部分成功视为致命错误。