finish-work-on-local-worktree

finish-work-on-local-worktree is a skill for Claude Code from mayank-io/mstack. It costs 130 tokens per session (1,369 once invoked), scanned A, original, MIT.

A worktree-closing workflow for a completed Git branch. A worktree is a separate working copy of a repository, and Git is a tool for tracking code changes.

In plain words
What is it for?
Use it after tests pass and the worktree has no uncommitted changes, when you need to merge the branch, mark related documentation complete, update the project plan, and choose the next milestone.
Why use it?
It brings finished branch work into the main branch and updates the related project records so the work is properly closed out.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions Claude Code.

Part of the dev plugin — 12 skills shipped together

Good fit Use it after tests pass and the worktree has no uncommitted changes, when you need to merge the branch, mark related documentation complete, update the project plan, and choose the next milestone.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mayank-io/mstack/finish-work-on-local-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 mayank-io/mstack --skill finish-work-on-local-worktree
Clone the repo
git clone --depth 1 https://github.com/mayank-io/mstack

Made for: Claude Code.

Or install dev, the plugin that ships this one along with the rest of its 12 skills.

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 finish-work-on-local-worktree

README.md
[![agentmods](https://agentmods.dev/badge/skills/mayank-io/mstack/finish-work-on-local-worktree/github.svg)](https://agentmods.dev/skills/mayank-io/mstack/finish-work-on-local-worktree)
Your own site
<a href="https://agentmods.dev/skills/mayank-io/mstack/finish-work-on-local-worktree"><img src="https://agentmods.dev/badge/skills/mayank-io/mstack/finish-work-on-local-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 finish-work-on-local-worktree

Your own site · 80×15
<a href="https://agentmods.dev/skills/mayank-io/mstack/finish-work-on-local-worktree"><img src="https://agentmods.dev/badge/skills/mayank-io/mstack/finish-work-on-local-worktree.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 130 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,369 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.00130 $0.01369
Opus 5.5 $0.00052 $0.00548
Sonnet 5.5 $0.00026 $0.00274
Haiku 4.5 $0.00013 $0.00137

Measured 2mo ago against content hash 75536779eb18, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

finish-work-on-local-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.

plugins/dev/skills/finish-work-on-local-worktree/SKILL.md · 146 lines

How it starts

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

Finish Work on Local Worktree

Complete a worktree lifecycle: squash-merge the branch into main, update all related documentation status, update the project plan, and recommend what to work on next.

Prerequisites

  • All tests pass on the worktree branch
  • No uncommitted changes in the worktree
  • Work on the branch is verified and ready to integrate

Arguments

Accept an optional branch name argument. If not provided, detect from the current worktree or ask the user.

Workflow

Execute these phases in order. Stop and report if any phase fails.

Phase 1: Local Merge

Invoke the git-worktree:local-merge skill via the Skill tool, passing the branch name if provided as an argument.

Wait for the merge to complete before proceeding. If the merge fails (conflicts, dirty worktree, not in a worktree), stop and help the user resolve the issue.

After the merge succeeds, note the BRANCH name — it drives doc discovery in Phase 2.

Phase 2: Update Related Documentation

Find all docs related to the merged branch and update their status to completed.

Step 2a: Find related docs

Use the Grep tool to search docs/ for files whose YAML frontmatter contains work: <BRANCH> (substituting the actual branch name from Phase 1). Also check the related: frontmatter array in those docs to find transitively related docs.

Step 2b: Update frontmatter status

For each related doc found:

  1. Read the current status: and stage: frontmatter fields
  2. If status: is not already completed, update it to completed
  3. If stage: exists, update it to impl (implementation is done)
  4. Do NOT change docs that are already completed or archived

Step 2c: Report changes

List each doc updated with its old and new status:

Updated docs:
- docs/2026-04-04-feature-design.md: active → completed
- docs/2026-04-04-feature-impl-plan.md: active → completed

Phase 3: Update Project Plan

Find and update the project plan to reflect the completed milestone. If no project plan is found, skip this phase entirely and note in the final report that no project plan was updated.

Read the full file on GitHub · 146 lines

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. 2mo ago First seen · 146 lines · 130 tokens per session scan A 75536779eb18

Subscribe to this mod's changes

finish-work-on-local-worktree is a skill published in the GitHub repository mayank-io/mstack (6 stars, last pushed 3d ago), licensed MIT. It adds 130 tokens to every session and 1,369 once invoked, about $0.0005 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-31.