merge — Git worktree merge Piece-iOS, community, Git worktree merge, ide skills, merge install for developers, Claude Code, Cursor, Windsurf

v3.2.0
GitHub

About this Skill

Ideal for Git-based AI Agents requiring automated squash merging of feature branches into main or develop branches. Merge is a Git-based skill that performs squash merges of feature branches into main, utilizing worktree detection and automation.

Features

Performs squash merge of feature branches into main using Git
Detects Git worktree environments and adjusts merge behavior
Automatically identifies develop or main branches as merge targets
Utilizes bash scripting for environment detection and merge automation
Supports merge operations in both worktree and non-worktree environments

# Core Topics

Piece-Puzzly Piece-Puzzly
[0]
[0]
Updated: 3/8/2026

Agent Capability Analysis

The merge skill by Piece-Puzzly is an open-source community AI agent skill for Claude Code and other IDE workflows, helping agents execute tasks with better context, repeatability, and domain-specific guidance. Optimized for Git worktree merge, merge install for developers.

Ideal Agent Persona

Ideal for Git-based AI Agents requiring automated squash merging of feature branches into main or develop branches.

Core Value

Empowers agents to automate squash merging of feature branches into main or develop branches, supporting Git worktree environments and detecting merge targets, utilizing Git commands and worktree list functionality.

Capabilities Granted for merge

Automating squash merging of feature branches
Detecting and merging into develop or main branches
Supporting Git worktree environments for seamless repository management

! Prerequisites & Limits

  • Requires Git installation and configuration
  • Limited to Git worktree environments and squash merge strategy
Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

merge

Install merge, an AI agent skill for AI agent workflows and automation. Works with Claude Code, Cursor, and Windsurf with one-command setup.

SKILL.md
Readonly

Merge 스킬

현재 feature 브랜치를 main 브랜치에 squash merge합니다. 워크트리 환경에서도 메인 레포를 통해 정상 동작합니다.

참고: develop 브랜치가 존재하면 develop을, 없으면 main을 머지 타겟으로 사용합니다.

실행 단계

1. 환경 감지

bash
1# 워크트리 여부 확인 2WORKTREE_COUNT=$(git worktree list | wc -l) 3PROJECT_ROOT=$(git worktree list --porcelain | head -1 | cut -d' ' -f2) 4CURRENT_DIR=$(pwd) 5 6# 워크트리인지 판별 7if [ "$WORKTREE_COUNT" -gt 1 ] && [ "$PROJECT_ROOT" != "$CURRENT_DIR" ]; then 8 IS_WORKTREE=true 9else 10 IS_WORKTREE=false 11fi

워크트리 감지 시: → 메인 레포 경로(PROJECT_ROOT)를 사용하여 git -C "$PROJECT_ROOT" 형태로 명령 실행

2. 사전 확인

bash
1# 현재 브랜치 확인 2git branch --show-current 3 4# 변경사항 확인 (커밋되지 않은 변경사항 체크) 5git status --short

체크리스트:

  • 현재 브랜치가 feature/* 또는 fix/* 등 작업 브랜치인가?
  • 커밋되지 않은 변경사항이 없는가?

분기 처리:

  • IF 현재 브랜치가 main 또는 develop: → "feature 브랜치에서 실행해주세요. 현재 브랜치: {브랜치명}" 안내 후 종료

  • IF 커밋되지 않은 변경사항 존재: → "먼저 /commit 스킬을 실행하여 변경사항을 커밋해주세요." 안내 후 종료

3. 브랜치 정보 분석

Step 1: 현재 브랜치명 확인

bash
1BRANCH=$(git branch --show-current) 2# 예: feat/grt-42/button-disabled

Step 2: 브랜치명에서 정보 추출

bash
1# 예: feat/button-disabled 2TYPE=$(echo "$BRANCH" | cut -d'/' -f1) 3DESCRIPTION=$(echo "$BRANCH" | cut -d'/' -f2-)

추출 정보:

  • 타입: 브랜치 prefix에서 추출 (feat, fix, refactor, chore, docs, build)
  • 설명: 브랜치명의 두 번째 세그먼트 (예: button-disabled)

타입 매핑 (병합 커밋용 대문자):

브랜치 prefix커밋 prefix
feat/FEAT
fix/FIX
refactor/REFACTOR
chore/CHORE
docs/DOCS
build/BUILD

4. 병합 커밋 메시지 생성

머지 타겟 결정:

bash
1# develop 브랜치가 있으면 develop, 없으면 main 2if git show-ref --verify --quiet refs/heads/develop; then 3 TARGET="develop" 4else 5 TARGET="main" 6fi

커밋 로그 분석:

bash
1# 타겟 브랜치와의 차이 확인 2git log $TARGET..HEAD --oneline

커밋 메시지 형식:

[TYPE] 기능 요약

예시:

  • [FEAT] Button disabled 상태 추가
  • [FIX] 로그인 유효성 검증 버그 수정
  • [REFACTOR] 네트워크 레이어 구조 개선

기능 요약 생성 방법:

  1. 커밋 로그에서 주요 변경사항 파악
  2. 50자 이내 한글로 요약

5. Squash Merge 실행

일반 환경 (워크트리가 아닌 경우)

bash
1# 현재 브랜치명 저장 2FEATURE_BRANCH=$(git branch --show-current) 3 4# 타겟 브랜치로 전환 5git checkout $TARGET 6 7# 타겟 브랜치를 최신 상태로 동기화 8git pull origin $TARGET 9 10# feature 브랜치를 squash merge 11git merge --squash $FEATURE_BRANCH 12 13# 병합 커밋 생성 14git commit -m "[TYPE] 기능 요약" 15 16# feature 브랜치 삭제 17git branch -d $FEATURE_BRANCH

워크트리 환경

bash
1# 현재 브랜치명 저장 2FEATURE_BRANCH=$(git branch --show-current) 3 4# 메인 레포에서 타겟 브랜치 최신화 5git -C "$PROJECT_ROOT" fetch origin 6git -C "$PROJECT_ROOT" checkout $TARGET 7git -C "$PROJECT_ROOT" pull origin $TARGET 8 9# 메인 레포에서 squash merge 실행 10git -C "$PROJECT_ROOT" merge --squash $FEATURE_BRANCH 11 12# 충돌 발생 시: 메인 레포에서 충돌 해결 후 스테이징 13# git -C "$PROJECT_ROOT" add <충돌파일> 14 15# 메인 레포에서 병합 커밋 생성 16git -C "$PROJECT_ROOT" commit -m "[TYPE] 기능 요약" 17 18# feature 브랜치 삭제는 워크트리 제거 후 수동으로 19# (워크트리에서 사용 중인 브랜치는 삭제 불가)

체크리스트:

  • 타겟 브랜치 최신화 성공
  • Squash merge 성공
  • 병합 커밋 생성 성공
  • Feature 브랜치 삭제 성공 (워크트리 환경에서는 보류)

IF 타겟 브랜치 pull 중 충돌: → 오류 메시지 출력 후 안내:

타겟 브랜치 동기화 중 충돌이 발생했습니다.

해결 방법:
1. git checkout {feature-branch}
2. git rebase {target-branch}
3. 충돌 해결 후 다시 /merge 실행

또는 수동으로 병합을 진행해주세요.

6. Push 여부 확인

사용자에게 질문:

병합이 완료되었습니다.

타겟 브랜치를 원격에 push할까요?

1. 예, push합니다
2. 아니오, 나중에 수동으로 push합니다

선택:

IF "예" 선택:

일반 환경:

bash
1git push origin $TARGET

워크트리 환경:

bash
1git -C "$PROJECT_ROOT" push origin $TARGET

7. 최종 확인 및 요약

사용자에게 보고:

병합 완료!

병합 정보:
- 브랜치: {feature-branch} → {target-branch}
- 커밋: [TYPE] 기능 요약
- Push: {완료/미완료}
- 환경: {일반/워크트리}

다음 단계:
- 새 작업을 시작하려면 `/start-branch`를 실행하세요
- 워크트리 환경: 워크트리 제거 후 브랜치 삭제 필요

엣지 케이스 처리

Case 1: main 또는 develop 브랜치에서 실행

→ "feature 브랜치에서 실행해주세요" 안내 후 종료

Case 2: 커밋되지 않은 변경사항이 있을 때

→ "/commit 스킬을 먼저 실행하세요" 안내 후 종료

Case 3: 타겟 브랜치와 충돌 발생

→ 메인 레포에서 충돌 해결 후 스테이징, 커밋 진행

Case 4: feature 브랜치 삭제 실패 (워크트리)

→ 안내 출력:

워크트리에서 사용 중인 브랜치는 삭제할 수 없습니다.
워크트리 제거 후 삭제하세요:
  git worktree remove <worktree-path>
  git branch -d {branch-name}

Case 5: 워크트리에서 메인 레포 작업 디렉토리가 dirty

→ 경고 출력:

메인 레포에 커밋되지 않은 변경사항이 있습니다.
메인 레포에서 변경사항을 정리한 후 다시 시도하세요.
경로: {PROJECT_ROOT}

사용자 상호작용 포인트

필수 확인 사항:

  1. Push 여부 - 병합 후 develop을 원격에 push할지

자동화 가능:

  • 워크트리 환경 감지
  • 브랜치명 분석
  • 타입 매핑
  • Squash merge 실행 (메인 레포 경유)
  • 커밋 메시지 생성

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is merge?

Ideal for Git-based AI Agents requiring automated squash merging of feature branches into main or develop branches. Merge is a Git-based skill that performs squash merges of feature branches into main, utilizing worktree detection and automation.

How do I install merge?

Run the command: npx killer-skills add Piece-Puzzly/Piece-iOS/merge. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for merge?

Key use cases include: Automating squash merging of feature branches, Detecting and merging into develop or main branches, Supporting Git worktree environments for seamless repository management.

Which IDEs are compatible with merge?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for merge?

Requires Git installation and configuration. Limited to Git worktree environments and squash merge strategy.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add Piece-Puzzly/Piece-iOS/merge. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use merge immediately in the current project.

Related Skills

Looking for an alternative to merge or another community skill for your workflow? Explore these related open-source skills.

View All

widget-generator

Logo of f
f

f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.

149.6k
0
AI

flags

Logo of vercel
vercel

flags is a Next.js feature management skill that enables developers to efficiently add or modify framework feature flags, streamlining React application development.

138.4k
0
Browser

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI