work-on-ticket

获取 Jira 工单详情,创建合适命名的 Git 分支,并启动任务规划流程。仅在用户表示“处理 [TICKET_ID]”或类似语句时使用。

仓库最近推送
GitHub Stars
133
Forks
17
Issues / PRs
0

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "work-on-ticket":https://skillpi.com/zh/skills/deepskill-b9241f6f5f43935754467886f382f840407bd24ae646cd47f29eabc551ab592d。安装前核对上游来源和版本:https://github.com/jjmartres/opencode。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

获取 Jira 工单详情,创建合适命名的 Git 分支,并启动任务规划流程。仅在用户表示“处理 [TICKET_ID]”或类似语句时使用。

0 下载

介绍来源: third_party · jjmartres · 0.0.1 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
适合谁
翻译待完成,请参阅来源文档。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: work-on-ticket
description: Fetches Jira ticket details, creates an appropriately named branch, and initiates the task planning workflow. Use when the user says "work on [TICKET_ID]" or similar phrases.

Work on Ticket

Streamlined workflow to start work on a Jira ticket by fetching ticket details, creating a branch, and initiating task planning.

When to Use This Skill

Activate this skill when:

  • The user says "work on AGP-123" or "start work on AGP-123"
  • The user says "pick up AGP-123" or "begin AGP-123"
  • The user mentions starting work on a specific Jira ticket ID
  • Pattern: work on [TICKET_ID] or similar intent

Workflow

1. Parse Ticket ID

Extract the Jira ticket ID from the user's message. Common patterns:

  • work on AGP-782
  • start AGP-782
  • pick up PROJ-123

Ticket ID format: [A-Z]+-[0-9]+ (e.g., AGP-782, AICC-123)

2. Fetch Jira Ticket Details

Use the MCP Zapier tool to fetch the ticket:

mcp__zapier -
  frontend__jira_software_cloud_find_issue_by_key({
    instructions: "Get details for ticket [TICKET_ID]",
    key: "[TICKET_ID]",
    fields: "summary,description,issuetype,priority,status",
  });

Extract from response:

  • Summary (title)
  • Description
  • Issue type
  • Status
  • Any other relevant context

3. Generate Branch Name

Create a branch name using this format:

[TICKET_ID]-[kebab-case-summary]

Branch Naming Rules:

  • Start with the ticket ID (e.g., AGP-782-)
  • Convert summary to kebab-case (lowercase, dashes instead of spaces)
  • Remove special characters
  • Keep it concise (max 50 characters total)
  • Use meaningful words from the summary

Examples:

  • AGP-782-migrate-existing-mcp-server
  • AICC-123-fix-auth-token-expiry
  • PROJ-456-add-user-settings-page

Implementation:

# Convert summary to kebab-case
# Example: "Migrate existing MCP server" -> "migrate-existing-mcp-server"

4. Create Isolated Worktree under .worktree/

In accordance with the Git Worktree Policy, do NOT run git checkout -b in the primary workspace. Create an isolated worktree under .worktree/:

BRANCH_NAME="[TICKET_ID]-[kebab-case-summary]"
REPO_ROOT=$(git rev-parse --show-toplevel)

# Ensure .worktree/ is ignored
grep -q "^\.worktree/" .gitignore 2>/dev/null || echo ".worktree/" >> .gitignore

# Fetch latest default branch
git fetch origin

# Create isolated worktree under .worktree/
git worktree add ".worktree/${BRANCH_NAME}" -b "${BRANCH_NAME}"

5. Relocate OpenCode Session

Immediately move the active OpenCode session to the new worktree using execute:

await tools.opencode.session_move({ directory: `${REPO_ROOT}/.worktree/${BRANCH_NAME}` });

Confirm to User: "Created isolated worktree at .worktree/${BRANCH_NAME} and relocated session."

6. Build Task Planning Prompt

Analyze the Jira ticket and create a comprehensive prompt for the /eng:chore command:

Prompt should include:

  • The ticket summary
  • Key details from the description
  • Any acceptance criteria mentioned
  • Relevant technical context

Example prompt construction:

Summary: [ticket.summary]

Description: [ticket.description]

Acceptance Criteria:
[extracted criteria if present]

7. Execute Task Planning

Run the /eng:chore slash command with the ticket number and constructed prompt:

/eng:chore [TICKET_ID] [CONSTRUCTED_PROMPT]

Example:

AGP-782 Migrate existing MCP server implementation to new architecture

Description: We need to refactor the MCP server to use the new modular architecture. This includes updating the tool registry, migrating existing tools, and ensuring backward compatibility.

Acceptance Criteria:
- All existing tools work with new architecture
- Tests pass
- No breaking changes to API

Error Handling

If ticket not found:

  • Inform User: "Couldn't find ticket [TICKET_ID] in Jira. Please check the ticket ID."
  • STOP - don't proceed with branch creation

If branch already exists:

  • Inform User: "Branch [BRANCH_NAME] already exists."
  • Ask: "Should I check it out, create a new branch with a different name, or stop?"
  • Wait for decision

If git operations fail:

  • Show the error to User
  • STOP - don't proceed to task planning

Example Usage

Example 1: Simple Ticket

User: "work on AGP-782"

Claude:

  1. Fetches AGP-782 from Jira
  2. Finds summary: "Migrate existing MCP server"
  3. Checks git state (clean, on staging)
  4. Creates branch: AGP-782-migrate-existing-mcp-server
  5. Runs: /eng:chore AGP-782 Migrate existing MCP server implementation...

Example 2: With Uncommitted Changes

User: "work on AICC-456"

Claude:

  1. Fetches AICC-456 from Jira
  2. Checks git state - finds uncommitted changes
  3. STOPS and asks: "You have uncommitted changes. Should I commit them first, stash them, or continue anyway?"
  4. Waits for User's decision

Example 3: Ticket Not Found

User: "work on BAD-999"

Claude:

  1. Tries to fetch BAD-999 from Jira
  2. Ticket not found
  3. Informs User: "Couldn't find ticket BAD-999 in Jira. Please check the ticket ID."
  4. STOPS

Coding Standards

CRITICAL RULE - NESTED CONDITIONALS:

  • NEVER EVER EVER USE NESTED CONDITIONALS when working on tickets
  • If you find yourself nesting if statements, STOP immediately
  • Refactor using early returns, guard clauses, or extract functions
  • This rule applies to all code written while working on any ticket
  • Violation of this rule is FAILURE

Why this matters:

  • Nested conditionals reduce readability and increase cognitive load
  • They make code harder to test and maintain
  • Early returns and guard clauses are always clearer

Instead of:

if (condition1) {
  if (condition2) {
    // do something
  }
}

Do this:

if (!condition1) return;
if (!condition2) return;
// do something

CRITICAL RULE - NO UNNECESSARY INLINE COMMENTS:

  • NEVER add simple, obvious inline comments that just restate what the code does
  • Code should be self-documenting through clear variable names, function names, and structure
  • Only add comments when they explain WHY something is done, not WHAT is being done
  • Remove unnecessary comments during refactoring
  • This rule applies to all code written while working on any ticket
  • Violation of this rule is FAILURE

Bad comments (obvious, unnecessary):

// Set the user's name
user.name = "Alice";

// Loop through the items
for (const item of items) {
  // Process the item
  processItem(item);
}

// Return true if valid
return isValid;

Good comments (explain WHY, add context):

// Cache user data for 5 minutes to reduce API calls
const cachedUser = await cache.get(userId, { ttl: 300 });

// Process items in batches to avoid memory issues with large datasets
for (const batch of chunkArray(items, 100)) {
  await processBatch(batch);
}

// Skip validation for admin users per security requirement SEC-123
if (user.isAdmin) return true;

When comments ARE appropriate:

  • Explaining non-obvious business logic or requirements
  • Documenting workarounds for external bugs (with issue links)
  • Clarifying performance optimizations
  • Noting security considerations
  • Referencing ticket numbers or external documentation

When to use NO comments:

  • If the code is self-explanatory
  • If a better variable/function name would make it clear
  • If the comment just repeats what the code obviously does

CRITICAL RULE - VITEST TESTING:

  • ALWAYS use the Vitest TDD Expert skill when writing or working with Vitest tests
  • Before writing any Vitest tests, activate the Vitest TDD Expert skill by invoking it with the Skill tool
  • The Vitest TDD Expert skill enforces:
    • Red-Green-Refactor TDD cycle (test first, always)
    • 95%+ coverage requirements with quality metrics
    • FIRST principles (Fast, Independent, Repeatable, Self-validating, Timely)
    • Behavior-focused testing (not implementation details)
    • Comprehensive edge case coverage and error path testing
    • Anti-pattern avoidance (no brittle tests, no excessive mocking)
  • This ensures high-quality, maintainable test suites that provide confidence
  • Violation of this rule means tests may be brittle, incomplete, or low quality

When to activate Vitest TDD Expert:

// Before writing Vitest tests, invoke:
Skill({ skill: "vitest-tdd" });

Important Notes

  • Always check git state before creating branches
  • Never force-create branches or overwrite existing branches
  • Never proceed if there are uncommitted changes without User's approval
  • Keep branch names concise - aim for clarity over completeness
  • Include ticket context in the task planning prompt to give the planner maximum context
  • The /eng:chore command will handle the detailed planning - this skill just sets up the environment

Success Criteria

The skill is successful when:

  1. ✅ Jira ticket is fetched successfully
  2. ✅ Appropriate branch name is generated
  3. ✅ Git state is verified (no uncommitted changes or user approved)
  4. ✅ New branch is created and checked out
  5. ✅ /eng:chore command is executed with ticket context
  6. ✅ User is informed of each major step

当前收录版本

0.0.1

核对来源版本 ↗

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值82/100

亮点

  • 提供 Jira 工单处理自动化流程,显著提升开发团队协作效率
  • 集成 Git 分支创建与任务规划启动,形成完整工作流闭环
触发精准95/100

亮点

  • 触发词覆盖多种自然语言变体(work on/pick up/start等)
  • 边界清晰,不易与其他 Skill 重叠
结构规范93/100

亮点

  • 7个清晰步骤划分,逻辑完整
  • 包含错误处理、示例用法和编码规范等完整章节
执行可靠91/100

亮点

  • 覆盖工单不存在、分支冲突、git状态异常等主要错误场景
  • 对未提交变更等不可逆操作要求用户确认
证据可验 (前四项均值)90/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。