merge-with-costs

merge-with-costs is a skill for Claude Code from noahlz/claude-plugins. It costs 40 tokens per session (1,854 once invoked), scanned B, original, MIT.

A skill for merging branches created by coding sub-agents or separate worktrees, while recording the contributing sessions' costs in the merge commit.

In plain words
What is it for?
Use it when merging sub-agent or worktree branches with cost tracking, not for ordinary commits on the current branch.
Why use it?
It keeps delegated work and its cost information together when combining branches. A worktree is a separate working copy of a Git repository.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions subagents; names the AskUserQuestion tool.

Part of the dev-workflow plugin — 10 skills, 4 agents shipped together

Good fit Use it when merging sub-agent or worktree branches with cost tracking, not for ordinary commits on the current branch.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/noahlz/claude-plugins/merge-with-costs
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 noahlz/claude-plugins --skill merge-with-costs
Clone the repo
git clone --depth 1 https://github.com/noahlz/claude-plugins

Made for: Claude Code.

Or install dev-workflow, the plugin that ships this one along with the rest of its 10 skills, 4 agents.

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-with-costs

README.md
[![agentmods](https://agentmods.dev/badge/skills/noahlz/claude-plugins/merge-with-costs/github.svg)](https://agentmods.dev/skills/noahlz/claude-plugins/merge-with-costs)
Your own site
<a href="https://agentmods.dev/skills/noahlz/claude-plugins/merge-with-costs"><img src="https://agentmods.dev/badge/skills/noahlz/claude-plugins/merge-with-costs/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-with-costs

Your own site · 80×15
<a href="https://agentmods.dev/skills/noahlz/claude-plugins/merge-with-costs"><img src="https://agentmods.dev/badge/skills/noahlz/claude-plugins/merge-with-costs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,854 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00040 $0.01854
Opus 5 $0.00020 $0.00927
Sonnet 5 $0.00008 $0.00371
Haiku 4.5 $0.00004 $0.00185

Measured 7d ago against content hash 4d476ac5e281, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade B, and why

merge-with-costs scanned grade B with 1 finding 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 7d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/merge-workflow.js), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

**SKILL_CONFIG**: !`node "${CLAUDE_SKILL_DIR}/../../lib/check-skill-config.js" "./.claude/settings.plugins.commit-with-costs.json"`
plugins/dev-workflow/skills/merge-with-costs/SKILL.md · 197 lines

How it starts

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

Merge the branches a sub-agent development session left behind; record the project session's cost in the merge commit.

Activate only on /merge-with-costs or a request to merge worktree/sub-agent branches with costs. For an ordinary commit on the current branch, use commit-with-costs.

SKILL_BASE_DIR: ${CLAUDE_SKILL_DIR}

If the above shows literal ${CLAUDE_SKILL_DIR}, halt: "Requires Claude Code 2.1.69+."

Node.js Check: !node "${CLAUDE_SKILL_DIR}/../../lib/check-node-version.js" Halt if ERROR.

Git Instructions Check: !node "${CLAUDE_SKILL_DIR}/../commit-with-costs/scripts/check-git-instructions.js" Display any WARNING before proceeding.

Dependencies: !node "${CLAUDE_SKILL_DIR}/../../lib/check-dependencies.js" "${CLAUDE_SKILL_DIR}/../.."

Rules

Rule Behavior
DELEGATE_TO Read the referenced file; execute its instructions exactly. Never improvise or guess commands.
Narration Narrate only STEP_DESCRIPTION steps; all others silent.
JSON outputs Extract fields into variables (e.g. data.candidates → CANDIDATES).
Cost metrics Never fabricate or estimate. Use only values from a successful prepare-merge.
Cost source One session: the project root's. Never pool worktree sessions, never substitute another session.
Merge safety Never run git merge, git merge --abort, git rebase, git reset, or git add directly. Only the scripts below.
Leaving mid-merge Stopping after Step 3 without committing? Run the abort action and report. Never leave a staged merge behind.

Checklist

- [ ] 0. Pre-flight and config
- [ ] 1. Discover merge candidates
- [ ] 2. Confirm branches to merge
- [ ] 3. Stage the merge
- [ ] 4. Resolve conflicts (only when Step 3 reports them)
- [ ] 5. Generate commit message
- [ ] 6. Get user approval
- [ ] 7. Compute cost
- [ ] 8. Create merge commit
- [ ] 9. Display final summary

0. Pre-flight and Config

Halt if git commands already ran in this turn.

Read the full file on GitHub · 197 lines

Files

What ships with it

6 files 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. 7d ago Changed · +26 lines 4d476ac5e281
  2. 11d ago First seen · 171 lines · 40 tokens per session scan B 2f9e122c81f1

Subscribe to this mod's changes

merge-with-costs is a skill published in the GitHub repository noahlz/claude-plugins (5 stars, last pushed 9d ago), licensed MIT. It adds 40 tokens to every session and 1,854 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.