AgentSkillsCN

claim-issue

通过添加“进行中”标签并将相关信息记录至已处理消息日志,认领GitHub上标记为“等待代理行动”的开放问题。必须在正式开始任何工作之前调用此指令。当轮询发现符合条件却尚未被认领的问题时使用。

SKILL.md
--- frontmatter
name: claim-issue
description: Claim an open GitHub issue tagged for agent action by adding the in-progress label and recording it in the processed-message log. Must be called before any work begins. Use when polling finds eligible unclaimed issues.
tools:
  - claim_issue
user-invokable: false
version: 1.0.0

Claim Issue

Purpose

Atomically claim an eligible GitHub issue to prevent duplicate processing by other agent instances or rapid poll cycles.

Instructions

  1. Before calling this skill, verify the issue ID is NOT in the processed-message log
  2. Call claim_issue with the repository and issue number
  3. If the claim succeeds (returns true):
    • Add the issue number to the processed-message log with disposition "Claimed"
    • Log: "Claimed issue #<number>: <title>"
    • Proceed to the appropriate development skill (develop-feature or fix-bug)
  4. If the claim fails (returns false — race condition, already labelled):
    • Do not process the issue further
    • Log: "Issue #<number> already claimed by another process"

Claim Rules

  • Only claim issues with the agent-eligible label (or configured equivalent)
  • Only claim issues NOT already labelled agent-in-progress or agent-complete
  • Only claim issues NOT already recorded in the processed-message log

Expected Output

Boolean: true if claimed successfully, false if already taken.