Token导航 LogoToken导航TokenDH.com
开发操作浏览器github未标认证来源可访问许可证需确认审计通过

pr-worktree-workflow公关工作树工作流程

Agent Skill

pr-worktree-workflow 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

269

周安装

11

GitHub Stars

公开资料未说明

下载量

87
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/frankieew/agent-skills --skill pr-worktree-workflow

简介

pr-worktree-workflow 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。

  • 适用于利用 Git worktree 特性并行开发多个 PR 分支,减少切换成本。
  • 支持自动创建工作树、同步远程变更与清理临时目录。
  • 安装前需确认对本地仓库的写权限,注意是否会执行 git worktree 命令。
  • 建议在使用前核对宿主环境是否支持所需技能组合,避免权限不足导致失败。

SKILL.md

PR + Worktree Workflow

Common Mistakes (Read First)

DO NOT use this skill when:

  • User only mentions worktree (use using-git-worktrees instead)

When to prompt user:

  • If user says "create a PR" or "I want to make a PR" → Ask: "Would you like me to use the pr-worktree-workflow to create a worktree and PR together?"

Overview

This skill integrates using-git-worktrees and my-pull-requests to provide a complete task-to-PR workflow:

  1. Create Worktree - Use using-git-worktrees to establish isolated workspace
  2. Implement Feature - Work in the new branch
  3. Create PR - Create Pull Request from the completed work
  4. Verify PR - Confirm PR status

Core Principle: Worktree isolation + PR process = reliable feature development

Opening Announcement: "I'm using the pr-worktree-workflow skill to complete the full workflow from worktree creation to PR."

Interaction Pattern (Follow This)

Based on how the skill is invoked, respond differently:

Case 1: Skill loaded manually + NO task provided

→ Ask: "What task would you like me to work on?"

Case 2: Skill loaded manually + task IS provided

→ Execute workflow directly (skip confirmation)

Case 3: User mentions "PR" or "Pull Request" in conversation (without loading skill)

→ Ask: "Would you like me to use the pr-worktree-workflow to create a worktree and PR together?"

Workflow Steps

Phase 1: Create Worktree

Invoke using-git-worktrees skill:

I'm using the using-git-worktrees skill to set up an isolated workspace.

Follow using-git-worktrees skill:

  1. Check existing directory (.worktrees or worktrees)
  2. Verify directory is ignored by.gitignore
  3. Create worktree with new branch
  4. Run project setup (npm install / poetry install etc.)
  5. Verify test baseline

Phase 2: Create PR-Opening Commit

Make the first commit specifically for creating the PR:

# In worktree directory
cd .worktrees/<branch-name>

# First commit - creates the PR foundation
git add -A
git commit -m "chore: create PR for <feature-name>

## TODO
- [ ] Implement feature
- [ ] Add tests
- [ ] Update documentation"

Phase 3: Create WIP PR (Draft)

Immediately after first commit, create a draft PR:

# Create draft PR (WIP) - title format: scope: summary
gh pr create --title "feat: <feature-name>" \
  --body "## Motivation
- Why this change is needed

## Approach
- How the feature is implemented

## Considered Alternatives
- Alternative approaches considered

## Risk & Rollout
- Potential risks and rollout strategy

## Testing Evidence
- Test results or evidence

## Status: Work in Progress
- [ ] Task 1
- [ ] Task 2

## Type of Change
- [ ] Bug fix
- [x] New feature
- [ ] Breaking change" \
  --base main \
  --draft

Why create WIP PR immediately:

  • PR link is available for tracking from the start
  • Changes are already backed up remotely
  • Can reference PR in commit messages

Phase 4: Implement Feature (Iterative)

Continue development with multiple commits:

# In worktree directory
cd .worktrees/<branch-name>

# Regular development flow
# 1. Write code
# 2. Run tests
# 3. Commit changes
git add -A
git commit -m "feat: implement <feature-part-1>"

# Push to update PR
git push

# Continue with more commits as needed...
git add -A
git commit -m "feat: implement <feature-part-2>"

git push

Phase 5: Mark Ready for Review

When feature is complete, update PR:

# Finalize title and mark ready - title format: scope: summary
gh pr edit <PR-NUMBER> --title "feat: <feature-name>"

# If using draft:
gh pr ready <PR-NUMBER>

# Or open in browser to mark ready
gh pr view <PR-NUMBER> --web

Update PR body to reflect completion:

## Status: Ready for Review ✅

- [x] Task 1
- [x] Task 2

## Testing Evidence
- Test results or evidence

## Type of Change
- [ ] Bug fix
- [x] New feature
- [ ] Breaking change

Phase 6: Verify PR

After creating PR, invoke my-pull-requests skill to confirm status:

I'm using the my-pull-requests skill to verify the PR status.

Quick Reference

PhaseActionSkill Reference
1. WorktreeCreate isolated workspaceusing-git-worktrees
2. PR CommitFirst commit for PRgit commit
3. WIP PRCreate draft PR immediatelygh pr create --draft
4. DevelopmentImplement with multiple commits(built-in)
5. ReadyMark PR ready for reviewgh pr ready
6. VerificationConfirm PR statusmy-pull-requests

Common Scenarios

Scenario 1: New Feature Development

User: I need to develop a new login feature

AI: I'm using the pr-worktree-workflow skill to complete the full workflow from worktree creation to PR.

[Phase 1: Invoke using-git-worktrees]
- Check .worktrees/ directory
- Verify ignored
- Create worktree: .worktrees/login-feature -b feature/login
- Run npm install
- Verify tests pass

[Phase 2: Development]
- Implement login feature
- git add -A && git commit -m "feat: add login feature"
- git push -u origin feature/login

[Phase 3: Create PR]
gh pr create --title "feat: add login feature" --body "..."

[Phase 4: Verification]
Invoke my-pull-requests to confirm PR status

PR created: https://github.com/owner/repo/pull/123
Worktree location: /project/.worktrees/login-feature

Scenario 2: Bug Fix

# Similar flow, use fix/ prefix
git worktree add .worktrees/bug-fix -b fix/<issue-name>
# ... after fixing
gh pr create --title "fix: <description>" --base main

Scenario 3: Large Refactoring

# Use refactor/ prefix
git worktree add .worktrees/refactor-api -b refactor/api-cleanup
# ... after refactoring
gh pr create --title "refactor: clean up API" --base main

Branch Naming Conventions

TypePrefixExample
New Featurefeature/feature/user-auth
Bug Fixfix/fix/login-validation
Refactoringrefactor/refactor/api-cleanup
Experimentexperiment/experiment/new-algorithm
Documentationdocs/docs/readme-update

Notes

Worktree Cleanup

After completing PR, optionally cleanup worktree:

# Delete remote branch
git push origin --delete <branch-name>

# Delete local worktree
git worktree remove .worktrees/<branch-name>

# Clean up orphaned branches
git branch -d <branch-name>

Stay Synced

Before starting work, ensure main branch is up-to-date:

git fetch origin
git checkout main
git pull origin main
git checkout <feature-branch>

PR Description Template

## Description
<!-- Describe what you did and why -->

## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update

## Testing
<!-- Describe how to test your changes -->

## Checklist
- [ ] Tests pass locally
- [ ] Code follows project style
- [ ] Documentation updated (if needed)

Integration

Called by:

  • brainstorming - when design is approved
  • executing-plans - when there's an implementation plan
  • subagent-driven-development - when subagent needs to execute tasks

Works with:

  • using-git-worktrees - Worktree creation
  • my-pull-requests - PR status verification
  • finishing-a-development-branch - Branch completion cleanup

Error Handling

Worktree Creation Failed

Error: fatal: '<path>' already exists

Solution: Check if directory already exists or use different branch name

Push Failed

Error: fatal: The current branch <branch> has no upstream branch.

Solution: Use git push -u origin <branch> to set upstream

PR Creation Failed

Error: GraphQL: Repository not found

Solution: Ensure you're in correct repo directory or authenticated via gh auth login

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

36.87%
按下载量换算32

Claude

30.65%
按下载量换算27

Cursor

20.74%
按下载量换算18

Gemini CLI

9.35%
按下载量换算8

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

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

来源信息

继续浏览同类 Skills