Agent Skillsbreaking-brake/cc-wf-studio › pr-to-main-cleanup

pr-to-main-cleanup

GitHub

用于清理已合并到 main 分支的 feature 分支。执行切换至 main、拉取最新代码、删除本地及远程分支等操作,特别处理 squash-merge 场景下的强制删除需求。

.claude/skills/pr-to-main-cleanup/SKILL.md breaking-brake/cc-wf-studio

Trigger Scenarios

ブランチ削除 cleanup マージ後の片付け

Install

npx skills add breaking-brake/cc-wf-studio --skill pr-to-main-cleanup -g -y
More Options

Non-standard path

npx skills add https://github.com/breaking-brake/cc-wf-studio/tree/main/.claude/skills/pr-to-main-cleanup -g -y

Use without installing

npx skills use breaking-brake/cc-wf-studio@pr-to-main-cleanup

指定 Agent (Claude Code)

npx skills add breaking-brake/cc-wf-studio --skill pr-to-main-cleanup -a claude-code -g -y

安装 repo 全部 skill

npx skills add breaking-brake/cc-wf-studio --all -g -y

预览 repo 内 skill

npx skills add breaking-brake/cc-wf-studio --list

SKILL.md

Frontmatter
{
    "name": "pr-to-main-cleanup",
    "description": "Clean up merged feature branches after PR to main is merged. Use when the user says \"ブランチ削除\", \"cleanup\", \"マージ後の片付け\", or wants to delete a merged branch."
}

PR to Main Cleanup

Delete merged feature branches after PR is merged to main.

Workflow

  1. Gather context (parallel):

    • git branch to identify current branch
    • git log --oneline -1 to confirm current state
  2. Execute cleanup:

    • Switch to main branch
    • Pull latest changes from origin
    • Delete local feature branch
    • Delete remote feature branch

Commands

git checkout main && git pull origin main && git branch -D <branch-name> && git push origin --delete <branch-name>

Important Notes

  • PRs to main are always squash-merged, so use -D (force delete) since git cannot detect squash merges as "merged"
  • Always pull latest main before deleting to sync merge status

Version History

  • a7bf24a Current 2026-08-20 13:05

Same Skill Collection

.claude/skills/jira-driven-planning/SKILL.md
.claude/skills/next-idea/SKILL.md
.claude/skills/next-qa-idea/SKILL.md
.claude/skills/next-qa/SKILL.md
.claude/skills/next-task/SKILL.md
.claude/skills/pr-review-analysis/SKILL.md
.claude/skills/pr-to-main/SKILL.md
.github/skills/cc-workflow-ai-editor/SKILL.md
.roo/skills/cc-workflow-ai-editor/SKILL.md
packages/cli/skills/ccwf-cli/SKILL.md
.claude/skills/workflow-schema-tuning/SKILL.md

Metadata

Files
0
Version
a7bf24a
Hash
f3f83c45
Indexed
2026-08-20 13:05

trang chủ - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-05 09:28
浙ICP备14020137号-1 $bản đồ khách truy cập$