用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/zouyangxiaohao111/javaclawbot --skill finishing-a-development-branch命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | finishing-a-development-branch |
| description | 当实施完成、所有测试通过、需要决定如何整合工作时使用 — 通过展示合并、PR 或清理的结构化选项来指导开发工作的完成 |
通过展示清晰的选项和处理选择的工作流来指导开发工作的完成。
核心原则: 验证测试 → 展示选项 → 执行选择 → 清理。
开始时宣布: "我正在使用 finishing-a-development-branch 技能来完成这项工作。"
在展示选项之前,验证测试通过:
# Run project's test suite
npm test / cargo test / pytest / go test ./...
如果测试失败:
Tests failing (<N> failures). Must fix before completing:
[Show failures]
Cannot proceed with merge/PR until tests pass.
停止。不要继续到步骤 2。
如果测试通过: 继续到步骤 2。
# Try common base branches
git merge-base HEAD main 2>/dev/null || git merge-base HEAD master 2>/dev/null
或询问: "这个分支从 main 分出 — 正确吗?"
准确展示这 4 个选项:
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?
不要添加解释 — 保持选项简洁。
# Switch to base branch
git checkout <base-branch>
# Pull latest
git pull
# Merge feature branch
git merge <feature-branch>
# Verify tests on merged result
<test command>
# If tests pass
git branch -d <feature-branch>
然后: 清理工作树(步骤 5)
# Push branch
git push -u origin <feature-branch>
# Create PR
gh pr create --title "<title>" --body "$(cat <<'EOF'
## Summary
<2-3 bullets of what changed>
## Test Plan
- [ ] <verification steps>
EOF
)"
然后: 清理工作树(步骤 5)
报告: "保持分支 。工作树保留在 。"
不要清理工作树。
先确认:
This will permanently delete:
- Branch <name>
- All commits: <commit-list>
- Worktree at <path>
Type 'discard' to confirm.
等待确切确认。
如果确认:
git checkout <base-branch>
git branch -D <feature-branch>
然后: 清理工作树(步骤 5)
对于选项 1、2、4:
检查是否在工作树中:
git worktree list | grep $(git branch --show-current)
如果是:
git worktree remove <worktree-path>
对于选项 3: 保留工作树。
| 选项 | 合并 | 推送 | 保留工作树 | 清理分支 |
|---|---|---|---|---|
| 1. 本地合并 | ✓ | - | - | ✓ |
| 2. 创建 PR | - | ✓ | ✓ | - |
| 3. 保持原样 | - | - | ✓ | - |
| 4. 丢弃 | - | - | - | ✓ (强制) |
跳过测试验证
开放式问题
自动清理工作树
丢弃没有确认
永远不要:
总是:
被调用:
配对: