Agent Skills › mastra-ai/mastra › factory-complete-issue

factory-complete-issue

GitHub

将工厂工作项关联的GitHub Issue标记为完成,验证仓库身份一致性后移除状态标签并添加待关闭标签及评论。

mastracode/factory/factory-skills/factory-complete-issue/SKILL.md mastra-ai/mastra

触发场景

用户要求完成或关闭与工厂任务关联的GitHub Issue 需要更新Issue的状态标签和评论以反映工作流进展

安装

npx skills add mastra-ai/mastra --skill factory-complete-issue -g -y
更多选项

非标准路径

npx skills add https://github.com/mastra-ai/mastra/tree/main/mastracode/factory/factory-skills/factory-complete-issue -g -y

不安装直接使用

npx skills use mastra-ai/mastra@factory-complete-issue

指定 Agent (Claude Code)

npx skills add mastra-ai/mastra --skill factory-complete-issue -a claude-code -g -y

安装 repo 全部 skill

npx skills add mastra-ai/mastra --all -g -y

预览 repo 内 skill

npx skills add mastra-ai/mastra --list

SKILL.md

Frontmatter
{
    "name": "factory-complete-issue",
    "description": "Mark a GitHub issue as done and update its status labels"
}

Factory Complete Issue

Mark the GitHub issue behind a completed Factory work item as done and update its status labels.

Parse the issue URL or number from $ARGUMENTS first. The Factory system prompt identifies the Target repository. Before reading or changing issue state, verify the checkout with git rev-parse --show-toplevel and git remote get-url origin. Normalize SSH and HTTPS GitHub remotes to owner/repository (ignoring a trailing .git) and require the checkout remote to match the target exactly. If $ARGUMENTS contains a GitHub issue URL, extract its owner/repository and require it to match both the target and the checkout remote exactly. Never use a URL's repository to override the target. If only an issue number is supplied, resolve it explicitly in the target repository (for example, with gh issue view <number> --repo <owner/repository>), not from the current gh default. If any identity is missing or mismatched, stop without modifying the issue and report the issue URL or number, expected target, observed remote/root, and mismatch.

Once identities match, read the issue's current state and labels. Remove any of these labels that are present:

  • status: needs triage
  • status: auto-triaged
  • status: needs approval

Use gh issue edit --repo <owner/repository> to remove the listed triage labels. If the issue is open, add status: pending-close when it is not already present and post this comment unless the issue already has it. Pass --repo <owner/repository> to every gh issue read or mutation:

This issue has now been marked as done.

If the issue is already closed, do not add status: pending-close or post the comment. Do not modify any other labels or issue fields.

Do not close, reopen, or assign the issue, and do not request another Factory transition.

版本历史

  • 081fa03 当前 2026-10-20 04:51

    新增严格的仓库身份验证逻辑,确保操作在预期的目标仓库中进行,防止跨仓库误操作。

  • fb538c4 2026-08-20 17:27

同 Skill 集合

.agents/skills/label-core-bugs/SKILL.md
.agents/skills/testing-core-processors/SKILL.md
.claude/skills/debugging-difficult-bugs/SKILL.md
.claude/skills/docs-audit/SKILL.md
.claude/skills/docs-diagrams/SKILL.md
.claude/skills/e2e-tests-studio/SKILL.md
.claude/skills/label-core-bugs/SKILL.md
.claude/skills/live-mastracode-instrumentation/SKILL.md
.claude/skills/mastra-docs/SKILL.md
.claude/skills/mastra-frontend/SKILL.md
.claude/skills/mastra-smoke-test/SKILL.md
.claude/skills/pr-explainer/SKILL.md
.claude/skills/pr-splitter/SKILL.md
.claude/skills/ralph-plan/SKILL.md
.claude/skills/react-best-practices/SKILL.md
.claude/skills/smoke-test/SKILL.md
.claude/skills/tailwind-v4/SKILL.md
.claude/skills/testing-core-processors/SKILL.md
.claude/skills/testing-mastracode-tui/SKILL.md
.mastracode/skills/gh-bulk-issues/SKILL.md
.mastracode/skills/gh-review/SKILL.md
.mastracode/skills/herdr-kit-workflows/SKILL.md
.mastracode/skills/herdr-manager-query/SKILL.md
.mastracode/skills/label-core-bugs/SKILL.md
.mastracode/skills/playground-snapshot-release/SKILL.md
.mastracode/skills/pr-snapshot-release/SKILL.md
.mastracode/skills/understand-issue/SKILL.md
.mastracode/skills/understand-pr/SKILL.md
mastracode/factory/factory-skills/configure-factory-rules/SKILL.md
mastracode/factory/factory-skills/factory-gitlab-rereview/SKILL.md
mastracode/factory/factory-skills/factory-gitlab-review/SKILL.md
mastracode/factory/factory-skills/factory-plan/SKILL.md
mastracode/factory/factory-skills/factory-rereview/SKILL.md
mastracode/factory/factory-skills/factory-review/SKILL.md
mastracode/factory/factory-skills/factory-self-review/SKILL.md
mastracode/factory/factory-skills/factory-triage/SKILL.md
templates/template-claw-assistant/workspace/skills/general-tasks/SKILL.md
templates/template-claw-assistant/workspace/skills/research-tasks/SKILL.md
templates/template-github-review-agent/workspace/skills/code-standards/SKILL.md
templates/template-github-review-agent/workspace/skills/performance-review/SKILL.md
templates/template-github-review-agent/workspace/skills/security-review/SKILL.md
.agents/skills/real-world-testing/SKILL.md
.claude/skills/builder-smoke-test/SKILL.md
.claude/skills/playground-msw-tests/SKILL.md
.mastracode/skills/triage-issue/SKILL.md

元信息

文件数
0
版本
081fa03
Hash
9bd1c038
收录时间
2026-08-20 17:27

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.156.0. UTC+08:00, 2026-11-27 09:41
浙ICP备14020137号-1