본문으로 건너뛰기
cccskills
무료GitHub에 공개

git-cleanup

Clean up local Git branches and remote connections left after pull request reviews. The workflow checks unfinished work, preserves main and the current branch, and requests confirmation before force-deleting branches that have not been merged.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

Clean up local git branches and remotes accumulated from PR reviews. Use when the user asks to clean branches, remove stale remotes, or tidy up the local git state.

설치 방법 보기

이럴 때 유용합니다

  • Clean up branches after pull request reviews
  • Remove contributor remotes other than origin
  • Review unmerged branches before deletion
  • Check unfinished work before Git cleanup

포함된 파일(1)

  • SKILL.md1.4 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Git Cleanup

Clean local branches (except main and current branch) and non-origin remotes. Useful after reviewing multiple PRs that leave behind tracking branches and contributor remotes.

Workflow

1. Survey

Run these in parallel:

git branch
git remote
git status --short
git stash list

Present a summary of how many branches and remotes will be removed.

2. Safety Checks — Ask Before Proceeding

Stop and ask for confirmation if any of these are true:

  • Current branch is NOT main
  • Working tree has uncommitted changes or stashes
  • Any branch is ahead of its upstream

List unmerged branches separately and let the user decide.

3. Delete Branches

# Safe delete first (fails on unmerged branches)
git branch | grep -v '^\*' | grep -v '^\s*main$' | xargs git branch -d 2>&1

# Force-delete only with explicit user approval
git branch -D <branch>

4. Remove Remotes

git remote | grep -v '^origin$' | xargs -I{} git remote remove {}

5. Confirm

git branch && echo "---" && git remote

Report what was cleaned up.

Key Rules

  • NEVER delete main or the current checked-out branch
  • NEVER force-delete unmerged branches without user confirmation
  • If in doubt, ask

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Maintain an application's supported language models by checking provider availability, adding models, and keeping documentation, live tests, and model-specific request settings aligned. It also checks provider model identifiers and candidates for the recommended list.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Add support for a specific language model
  • Check whether listed models are still available
  • Update provider model identifiers
alibaba/page-agent3만2026년 10월 18일 업데이트

Evaluate a proposed software change before implementation. It examines project files and official sources, compares options and trade-offs, and builds a concrete plan covering affected systems, effort, risks, and unresolved questions for the user's approval.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Discuss a major change before implementation
  • Compare migration or configuration options
  • Estimate affected files and implementation effort
alibaba/page-agent3만2026년 10월 18일 업데이트

Submit existing local changes as a pull request by reviewing the diff, running project checks, preparing a branch and commit, and pushing to GitHub. It follows contribution rules and preserves template declarations that require human verification.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Submit current local changes as a pull request
  • Prepare a branch and commit following project conventions
  • Run project checks before submission
alibaba/page-agent3만2026년 10월 18일 업데이트

Update a project's changelog using GitHub releases, git history, and code differences. Select changes that matter to users, match the existing format, and write concise entries for the requested release.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Add the latest missing release entry
  • Align changelog text with GitHub Releases
  • Summarize changes between release tags
alibaba/page-agent3만2026년 10월 18일 업데이트

alibaba의 스킬 모두 보기

이 스킬의 문제 신고