merge-worktree

merge-worktree is a skill for Claude Code from tellang/triflux. It costs 66 tokens per session (1,446 once invoked), scanned A, original, MIT.

A Korean-language workflow for squash-merging a Git worktree branch into a target branch and creating a conventional commit message. A worktree is a separate working directory connected to the same Git repository; squash-merge combines its changes into one commit.

In plain words
What is it for?
Use it to validate a worktree, inspect its commits and diff, choose the target branch, and squash-merge clean changes into it.
Why use it?
It checks that the worktree and branch are suitable for merging, then gathers the changes and classifies them before preparing the merge.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: mentions Codex.

Part of the triflux plugin — 29 skills, 1 agent, 12 hooks shipped together

Good fit Use it to validate a worktree, inspect its commits and diff, choose the target branch, and squash-merge clean changes into it.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tellang/triflux/merge-worktree
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add tellang/triflux --skill merge-worktree
Clone the repo
git clone --depth 1 https://github.com/tellang/triflux

Made for: Claude Code.

Or install triflux, the plugin that ships this one along with the rest of its 29 skills, 1 agent, 12 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for merge-worktree

README.md
[![agentmods](https://agentmods.dev/badge/skills/tellang/triflux/merge-worktree/github.svg)](https://agentmods.dev/skills/tellang/triflux/merge-worktree)
Your own site
<a href="https://agentmods.dev/skills/tellang/triflux/merge-worktree"><img src="https://agentmods.dev/badge/skills/tellang/triflux/merge-worktree/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for merge-worktree

Your own site · 80×15
<a href="https://agentmods.dev/skills/tellang/triflux/merge-worktree"><img src="https://agentmods.dev/badge/skills/tellang/triflux/merge-worktree.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,446 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00066 $0.01446
Opus 5 $0.00033 $0.00723
Sonnet 5 $0.00013 $0.00289
Haiku 4.5 $0.00007 $0.00145

Measured 9d ago against content hash 97d024f05293, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

merge-worktree scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packages/triflux/skills/merge-worktree/SKILL.md · 145 lines

How it starts

The opening of the file, as written. The whole thing — 145 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Merge Worktree

워크트리 브랜치를 대상 브랜치로 squash-merge하고 conventional commit 메시지를 자동 작성한다.

Current context

  • Git dir: !git rev-parse --git-dir
  • Current branch: !git branch --show-current
  • Recent commits: !git log --oneline -20
  • Working tree status: !git status --short

Instructions

Phase 1: Validation

  1. Worktree 확인: git rev-parse --git-dir 출력에 /worktrees/가 포함되어야 한다. 아니면 중지.

  2. 현재 브랜치 확인: git branch --show-current

  3. 대상 브랜치 결정:

    • $ARGUMENTS가 있으면 해당 브랜치 사용
    • 없으면 main 존재 확인, 없으면 master
  4. 원본 레포 경로 확인: git rev-parse --git-common-dir의 부모 디렉토리

  5. 클린 상태 확인: git status --porcelain이 비어있어야 한다. 미커밋 변경이 있으면 먼저 커밋/스태시 안내.

Phase 2: Research

  1. 커밋 이력: git log --oneline <target>..HEAD

  2. 변경 파일 요약: git diff <target>...HEAD --stat

  3. 전체 diff: git diff <target>...HEAD — 꼼꼼히 읽는다.

  4. 핵심 파일 읽기: 가장 큰 변경, 신규 파일, 삭제 파일을 Read로 확인.

  5. 변경 분류:

    • Features (신규 기능)
    • Fixes (버그 수정)
    • Refactors (구조 변경)
    • Tests (테스트)
    • Docs (문서)
    • Config/Chore (빌드, CI, 의존성)
  6. dominant type 결정: feat, fix, refactor, docs, chore, test 중 하나

Phase 3: 대상 브랜치 준비

  1. 대상 브랜치 최근 커밋 확인: git -C <원본레포> log --oneline -10 <target>

  2. WIP 커밋 감지: wip:, auto-commit, WIP 시작 커밋이 있으면 사용자에게 경고.

  3. 최신 fetch: git -C <원본레포> fetch origin <target> 2>/dev/null

Phase 4: Squash Merge

  1. 대상 브랜치 checkout:

    git -C <원본레포> checkout <target>
    
  2. squash merge 실행:

    git -C <원본레포> merge --squash <워크트리브랜치>
    
  3. 충돌 처리: 충돌 발생 시 충돌 파일 목록 + 마커를 보여주고 중지. 자동 해결 시도 금지.

Phase 5: 커밋 메시지 작성 + 커밋

Phase 2 분석 기반으로 아래 구조의 커밋 메시지를 작성한다:

<type>: <명령형 요약, 72자 이내, 마침표 없음>

<무엇을 왜 했는지 2-4문장. 동기와 접근 방식 중심.>

Changes:
* <그룹별 변경 사항>
* <하위 항목은 서브 불릿>

규칙:

  • <type>feat, fix, refactor, docs, chore, test 중 하나
  • 여러 유형이 섞이면 dominant 사용
  • 요약: 명령형 ("add", "fix", "refactor"), 마침표 없음, 72자 제한
  • 본문: 맥락, 무엇만이 아님
  • Changes: 관련 항목 그룹핑, 중요한 것 먼저
  • Co-Authored-By 푸터 절대 추가 금지 (글로벌 설정 includeCoAuthoredBy: false)

Read the full file on GitHub · 145 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 145 lines · 66 tokens per session scan A 97d024f05293

Subscribe to this mod's changes

merge-worktree is a skill published in the GitHub repository tellang/triflux (7 stars, last pushed yesterday), licensed MIT. It adds 66 tokens to every session and 1,446 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

intuitive-squash

Squash local GSD or agent-generated commit history into a clean, reviewable story while preserving important fixes. Use when the user asks to squash commits, clean git history, compress phase commits, prepare a branch before PR, compare aggressive vs moderate squash options, or preserve hotfix/security commits during…

MiaoDX/intuitive-flow · 73 tokens

bisect

Pinpoint the first bad commit for a reproducible regression in a safe temporary worktree. Use when HEAD is bad, a known revision is good, and one unattended command distinguishes them; handles flaky endpoints and git-bisect skip exit 125.

ohm41321/luciazero · 53 tokens

lucia-bus

Coordinate with other agents through the Luciazero Agent Bus (beta): register, read the inbox, claim a task, work, publish the result. Use at session start when the luciazero-bus MCP server exists, or for "ดู inbox"; peers never grant approval.

ohm41321/luciazero · 60 tokens

noslop-commit-gate

Run the noslop pre-commit quality gate, interpret failures, and enforce content-aware protection rules before every commit.

45ck/skill-harness · 30 tokens

commit-helper

Conventional commit helper — analyze changes, detect secrets, create well-formatted commit.

RaNDoM6913/claude-code-superkit · 19 tokens

standalone-pr-loop

Implement same-repository GitHub Issues into a reviewed pull request, or review and fix an existing PR, iterating with fresh independent read-only native subagents selected adaptively from the change risk until no actionable feedback remains. Use for issue-to-PR implementation or iterative PR review/fix work.

dceoy/ai-coding-agent-skills · 64 tokens