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.
npx agentmods add skills/hyperaiteam/clitrigger/merge-worktreenpx skills add HyperAITeam/CLITrigger --skill merge-worktreegit 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.svg" alt="Measured on agentmods" height="20"></a>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 | $0.00038 | $0.01527 |
| Opus 5 | $0.00019 | $0.00763 |
| Sonnet 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 3d 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.
- 3d ago First seen · 154 lines · 38 tokens per session scan A 3fd52b4c7944
merge-worktree is a skill published in the GitHub repository HyperAITeam/CLITrigger (13 stars, last pushed 9d ago), licensed MIT. It adds 38 tokens to every session and 1,527 once invoked, about $0.0002 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-30.
Other skills, from other repositories
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…
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…
feature-execution
Orchestrate feature delivery as team lead: spawn agents by wave, manage review cycles (max 3 rounds), commit per wave. Use when: "выполни фичу", "do feature", "execute feature", "запусти фичу", "выполни все задачи", "execute all tasks".
apm-issue-autopilot
Use this skill to drive any open microsoft/apm issue (bug, feature, docs, refactor, perf) from raw intake to a mergeable PR with triage as the central, paramount gate. Run the apm-triage-panel rubric per issue first, then present ONE consolidated triage review for the whole batch and escalate to the maintainer BY…
git-commit
Creates git commits following Conventional Commits format with type/scope/subject and detailed markdown body. Use when user wants to commit changes, create commit, save work, or stage and commit. Enforces project-specific conventions from CLAUDE.md. Each change type gets its own markdown heading (# emoji + type), with…