Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问clear审计通过

finishing-a-development-branch完成开发分支

Agent Skill

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

总安装

1,740

周安装

74

GitHub Stars

2

下载量

610
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:finishing-a-development-branch(完成开发分支)
来源仓库:https://github.com/izyanrajwani/agent-skills-library
仓库路径:skills/finishing-a-development-branch
安装命令:
npx skills add https://github.com/izyanrajwani/agent-skills-library --skill finishing-a-development-branch
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/izyanrajwani/agent-skills-library --skill finishing-a-development-branch

简介

finishing-a-development-branch 用于查找、检索和筛选相关信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词快速定位候选结果。
  • 通过 npx skills add 命令从指定仓库安装,需确认权限范围和文件操作权限。
  • 建议结合原始 README 核验具体用法,注意维护状态和网络访问限制。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Finishing a Development Branch

The Process

Step 1: Verify Tests

Determine test runner from project structure:

  • package.jsonnpm test or yarn test
  • Cargo.tomlcargo test
  • pyproject.toml / setup.pypytest
  • go.modgo test./...
  • Makefile with test target → make test

Run tests. If any fail, report ⊘ BLOCKED:TESTS with failure count and stop. Do not proceed to Step 2.

Step 2: Determine Base Branch

Find the branch this feature diverged from:

# Check which branch has the closest merge-base
for candidate in main master develop; do
  if git rev-parse --verify "$candidate" >/dev/null 2>&1; then
    MERGE_BASE=$(git merge-base HEAD "$candidate" 2>/dev/null)
    if [ -n "$MERGE_BASE" ]; then
      echo "Candidate: $candidate (merge-base: $MERGE_BASE)"
    fi
  fi
done

Select the candidate with the most recent merge-base (closest ancestor). If multiple branches share the same merge-base or detection is ambiguous, ask: "This branch could target main or develop. Which should it merge into?"

Store the result - subsequent steps reference <base-branch> meaning this determined value.

Step 3: Present Options

Present exactly these 4 options:

Implementation complete. What would you like to do?

1. Merge back to <base-branch> locally
2. Push and create a Pull Request
3. Keep the branch as-is (I'll handle it later)
4. Discard this work

Which option?

Step 4: Execute Choice

Option 1: Merge Locally

git checkout <base-branch>
git pull
git merge <feature-branch>

If merge conflicts:

⊘ BLOCKED:CONFLICTS

Merge conflicts in:
- <conflicted files>

Cannot auto-resolve. User must:
1. Resolve conflicts manually
2. Run tests
3. Re-run this workflow

Stop. Do not proceed.

If merge succeeds:

# Verify tests on merged result
<test command>

# If tests pass, delete feature branch
git branch -d <feature-branch>

Then: Cleanup worktree (Step 5). Report ✓ MERGED.

Option 2: Push and Create PR

Verify gh CLI is available:

if ! command -v gh &>/dev/null; then
  echo "gh CLI not installed. Install from https://cli.github.com/ or push manually and create PR via web."
  exit 1
fi
gh auth status || echo "gh not authenticated. Run: gh auth login"

Extract title from first commit on branch (original intent):

MERGE_BASE=$(git merge-base HEAD <base-branch>)
TITLE=$(git log --reverse --format=%s "$MERGE_BASE"..HEAD | head -1)
git push -u origin <feature-branch>
gh pr create --title "$TITLE" --body "$(cat <<'EOF'
## Summary
<2-3 bullets of what changed>

## Test Plan
- [ ] <verification steps>
EOF
)"

Report ✓ PR_CREATED with PR URL. Keep worktree intact for continued work during review.

Option 3: Keep As-Is

Report ✓ PRESERVED with branch name and worktree path.

Do not cleanup worktree.

Option 4: Discard

Confirm first:

This will permanently delete:
- Branch <name>
- All commits: <commit-list>
- Worktree at <path>

Type 'discard' to confirm.

Wait for exact confirmation. If not received, abort.

If confirmed:

git checkout <base-branch>
git branch -D <feature-branch>

Then: Cleanup worktree (Step 5). Report ✓ DISCARDED.

Step 5: Cleanup Worktree

For Options 1 and 4 only:

# Check if currently in a worktree (not main repo)
if [ "$(git rev-parse --git-common-dir)" != "$(git rev-parse --git-dir)" ]; then
  # Get worktree root (handles invocation from subdirectory)
  WORKTREE_ROOT=$(git rev-parse --show-toplevel)
  cd "$(git rev-parse --git-common-dir)/.."
  git worktree remove "$WORKTREE_ROOT"
fi

For Options 2 and 3: Keep worktree intact.

Quick Reference

OptionMergePushKeep WorktreeCleanup Branch
1. Merge locally--
2. Create PR--
3. Keep as-is---
4. Discard---✓ (force)

Terminal States

On completion, report exactly one:

StateOutputMeaning
✓ MERGEDBranch merged to <base>, worktree cleanedOption 1 success
✓ PR_CREATEDPR #N at URLOption 2 success
✓ PRESERVEDBranch kept at pathOption 3 success
✓ DISCARDEDBranch deleted, worktree cleanedOption 4 success
⊘ BLOCKED:TESTSN test failuresCannot proceed
⊘ BLOCKED:CONFLICTSMerge conflict in filesCannot proceed

Guardrails

Blocking conditions (stop immediately):

  • Tests failing → ⊘ BLOCKED:TESTS
  • Merge conflicts → ⊘ BLOCKED:CONFLICTS

Mandatory confirmations:

  • Option 4 (Discard): Require typed "discard" confirmation

Cleanup rules:

  • Options 1, 4: Clean up worktree and branch
  • Options 2, 3: Preserve worktree

Never:

  • Proceed with failing tests
  • Merge without verifying tests on result
  • Delete work without typed confirmation
  • Force-push without explicit request

Integration

Called by:

  • subagent-driven-development (Step 7) - After all tasks complete
  • executing-plans (Step 5) - After all batches complete

Pairs with:

  • using-git-worktrees - Cleans up worktree created by that skill

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

补充不同宿主或平台的使用分布数据

能力 5

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

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

平台分布

Claude Code

31.22%
按下载量换算190

OpenCode

21.96%
按下载量换算134

windsurf

16.61%
按下载量换算101

Codex

12.05%
按下载量换算74

github-copilot

8.26%
按下载量换算50

Antigravity

3.63%
按下载量换算22

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/izyanrajwani/agent-skills-library --skill finishing-a-development-branch;npx skills add izyanrajwani/agent-skills-library --skill "finishing-a-development-branch" 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills