Borrowing it
Nothing to install: this file belongs to HyperAITeam/CLITrigger. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/HyperAITeam/CLITrigger/main/.claude/skills/merge-worktree/SKILL.mdgit clone --depth 1 https://github.com/HyperAITeam/CLITriggerWrote 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.
[](https://agentmods.dev/skills/hyperaiteam/clitrigger/merge-worktree)<a href="https://agentmods.dev/skills/hyperaiteam/clitrigger/merge-worktree"><img src="https://agentmods.dev/badge/skills/hyperaiteam/clitrigger/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.
<a href="https://agentmods.dev/skills/hyperaiteam/clitrigger/merge-worktree"><img src="https://agentmods.dev/badge/skills/hyperaiteam/clitrigger/merge-worktree.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00038 | $0.01527 |
| Opus 5.5 | $0.00015 | $0.00611 |
| Sonnet 5.5 | $0.00008 | $0.00305 |
| Haiku 4.5 | $0.00004 | $0.00153 |
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 2mo 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.
How it starts
The opening of the file, as written. The whole thing — 154 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Merge Worktree
Squash-merge the current worktree branch back into the target branch with a comprehensive, structured commit message.
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
Follow these phases exactly, in order. Do NOT skip phases.
Phase 1: Validation
-
Verify worktree: Check if the current git directory is a worktree. The output of
git rev-parse --git-dirmust contain/worktrees/. If it does not, stop immediately and tell the user:"This skill must be run from inside a git worktree. Use
/worktreeto create one first." -
Identify current branch: Get the worktree branch name from
git branch --show-current. -
Resolve target branch:
- If
$ARGUMENTSis provided and non-empty, use it as the target branch. - Otherwise, detect the default branch: check if
mainexists, else checkmaster. If neither exists, stop and ask the user.
- If
-
Identify the original repo path: Parse the original repo root from the git-dir path. The worktree's
.gitfile points back to the main repo — usegit rev-parse --git-common-dirto find it, then derive the original repo working directory (its parent). -
Clean working tree: Run
git status --porcelain. If there are uncommitted changes, stop and tell the user to commit or stash them first.
Phase 2: Research
This is the most critical phase. You must deeply understand what was done before writing any commit message.
-
Commit history: Run
git log --oneline <target>..HEADto see all commits on this worktree branch. -
File change summary: Run
git diff <target>...HEAD --statto get an overview of what files changed and how much. -
Full diff: Run
git diff <target>...HEADto read the complete diff. Study it carefully. -
Read key files: For the most significantly changed files (largest diffs, new files, deleted files), use the Read tool to understand the full context — not just the diff lines.
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.
- 2mo ago First seen · 154 lines · 38 tokens per session scan A 3fd52b4c7944
merge-worktree is a skill published in the GitHub repository HyperAITeam/CLITrigger (14 stars, last pushed yesterday), licensed MIT. It adds 38 tokens to every session and 1,527 once invoked, about $0.0002 per session on Opus 5.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-30.
Other skills, from other repositories
subagent-driven-branch-ref-froze-stranded-commits
Diagnose and recover from "PR merged, but half my work is missing from main" cases in superpowers:subagent-driven-development (or similar one-fresh-subagent-per-task) sessions, where committed work survives in the worktree's HEAD chain but never makes it into the pushed branch ref. Use when ANY of these appears: (1)…
batch-member-cites-a-path-only-a-non-member-adds
You wrote something correct that the default reader cannot reach: a batch member citing a path only a NON-member adds, or a rule, ruling or ledger sitting on an unlanded branch.
git-add-u-after-async-post-commit-hook
Prevent (and recover from) git add -u + git commit --amend + git push --force-with-lease catastrophically rolling thousands of unrelated tracked-file deletions into an amended commit when the project has an async post-commit hook that mutates tracked files (e.g. regenerates docs/site/.html, docs/site/index.html…
working-tree-edits-stranded-on-squash-merge
Diagnose and prevent "I made the fix but it's not on main" cases where the fix was applied in the working tree via Edit / Write but never git added before the squash-merge. Use when: (1) you squash-merged a PR and the user reports the issue is back, (2) git status after the merge shows uncommitted changes for files…
async-post-commit-hook-commit-orphaned-by-squash-merge
In a repo with an ASYNC/background post-commit hook (one that fires after a commit and creates its OWN follow-up commit — [auto-docs] …, a docs/site regen, a changelog/checkbox tick), the hook's commit can land LOCAL-ONLY after your git push already captured just your work commit, so it is never in the PR and gets…
git-amend-hits-async-post-commit-hook-commit
Use when a git commit --amend silently rewrites the WRONG commit in a repo that has an async/background post-commit hook. Trigger: after a normal commit, git log shows an unexpected extra commit on top that a background hook created ([auto-docs] ..., a docs/site regen, a changelog/checkbox tick) — and a later --amend…