Token导航 LogoToken导航TokenDH.com
研究检索只读github未标认证来源可访问许可证需确认审计通过

wt-merge-prwt 合并公关

Agent Skill

wt-merge-pr 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

465

周安装

19

GitHub Stars

公开资料未说明

下载量

150
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/michael-menard/monorepo --skill wt-merge-pr

简介

wt-merge-pr 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中快速定位候选结果。

  • 它支持基于关键词、任务场景或来源线索进行信息聚合与过滤,适用于合并相关研究工作。
  • 通过 npx skills add 命令从 GitHub 仓库安装,具体用法需结合原始 README 进一步确认。
  • 安装前请核实权限范围、维护状态,并注意是否涉及联网、命令执行或文件读写操作。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

/wt:merge-pr - Merge PR and Clean Up Worktree

Description

Squash-merges an open GitHub PR for a story branch, deletes branches, and removes the local worktree. Designed for automated use from QA completion workflows.

Usage

/wt:merge-pr {STORY_ID}
/wt:merge-pr {STORY_ID} {PR_NUMBER}

Examples

/wt:merge-pr WINT-1012
/wt:merge-pr WINT-1012 42

Parameters

ParameterRequiredDefaultDescription
STORY_IDYesStory identifier (e.g., WINT-1012)
PR_NUMBERNo*(discovered via gh)*PR number to merge. If absent, discovered from branch name.

What It Does

This slash command:

  1. Finds the open PR for the story branch (or uses provided PR number)
  2. Squash-merges the PR via GitHub
  3. Deletes the remote branch (handled by --delete-branch)
  4. Removes the local worktree
  5. Cleans up the local branch reference
  6. Pulls origin main to sync local with the merged changes

Workflow

  1. Discover PR (if PR_NUMBER not provided): gh pr list --head story/{STORY_ID} --state open --json number

- If no open PR found: WARNING "No open PR for story/{STORY_ID}. Skipping merge." Continue to step 4 (worktree cleanup).

  1. Verify PR is mergeable - Check PR status: gh pr view {PR_NUMBER} --json mergeable,state

- If not mergeable: WARNING, attempt merge anyway (GitHub will reject if truly unmergeable).

  1. Squash-merge PR - Merge and delete remote branch: gh pr merge {PR_NUMBER} --squash --delete-branch

- On success: record merge result. - On failure: WARNING, continue to worktree cleanup.

  1. Remove local worktree - Clean up the worktree directory: git worktree remove tree/story/{STORY_ID}

- If fails (dirty tree): retry with --force - If still fails: WARNING, continue.

  1. Delete local branch - Remove the local branch reference: git branch -D story/{STORY_ID}

- May already be gone from --delete-branch. Ignore errors.

  1. Prune worktree metadata - Clean up stale references: git worktree prune
  2. Pull origin main - Sync local main with the merged changes: git pull origin main

- If fails: WARNING, continue. Local main being behind is non-blocking.

Output

After completion, always report:

PR MERGED AND CLEANED UP
  story_id: {STORY_ID}
  pr_number: {number}
  merge_strategy: squash
  branch_deleted: true | false
  worktree_removed: true | false

If no PR was found:

WORKTREE CLEANED UP (NO PR)
  story_id: {STORY_ID}
  pr_number: none
  merge_strategy: skipped
  branch_deleted: true | false
  worktree_removed: true | false

This structured output allows the calling orchestrator to parse results for CHECKPOINT.yaml and status updates.

Error Handling

All failures are non-blocking — each step is independent and continues regardless of prior step outcomes.

ErrorAction
gh CLI not foundWARNING: "GitHub CLI (gh) not found. Skipping PR merge. Worktree cleanup only."
No open PR foundWARNING: Skip merge, proceed to worktree cleanup
PR merge failsWARNING: Log error, continue to worktree cleanup
Worktree remove failsWARNING: Retry with --force, log if still fails
Local branch delete failsWARNING: Branch may already be gone, ignore
Not authenticatedWARNING: "gh auth required for PR merge. Skipping merge."
git pull origin main failsWARNING: Log error, continue. Local main sync is non-blocking.

Notes

  • All steps are non-blocking: a failure in any step does not prevent subsequent steps from executing
  • Mirrors the fault-tolerance pattern from /wt:finish
  • Squash merge produces a single clean commit on main
  • --delete-branch handles remote branch deletion as part of the merge
  • The worktree cleanup runs even if no PR exists (handles edge cases where PR was manually closed)
  • The gh CLI must be installed and authenticated for PR operations

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

38.27%
按下载量换算57

Claude

29.47%
按下载量换算44

Cursor

19.99%
按下载量换算30

Gemini CLI

8.84%
按下载量换算13

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

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

来源信息

继续浏览同类 Skills