pre-merge

pre-merge is a skill for Claude Code from ndisisnd/msg. It costs 147 tokens per session (2,675 once invoked), scanned A, original, MIT.

An automated release-checking workflow for a feature branch, which is a separate line of code work, before it becomes a pull request into the staging branch. It runs correctness, security, coverage, regression, migration, and product-requirement checks, then opens the pull request when the checks pass.

In plain words
What is it for?
Use it to initialize project checking rules, run the pre-merge gate on a feature branch, inspect failures, verify test coverage and security, check database migrations and requirements, and open a feature-to-staging pull request.
Why use it?
It replaces scattered manual checks with repeatable evidence about whether a completed feature is ready for review. Failed checks send the work back for fixes before the pull request is opened.

Skill for Claude Code

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

Good fit Use it to initialize project checking rules, run the pre-merge gate on a feature branch, inspect failures, verify test coverage and security, check database migrations and requirements, and open a feature-to-staging pull request.

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

Made for: Claude Code.

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 pre-merge

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/ndisisnd/msg/pre-merge"><img src="https://agentmods.dev/badge/skills/ndisisnd/msg/pre-merge.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 147 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,675 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.00147 $0.02675
Opus 5.5 $0.00059 $0.01070
Sonnet 5.5 $0.00029 $0.00535
Haiku 4.5 $0.00015 $0.00267

Measured today against content hash 0a1ab151be48, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

pre-merge 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 today.

The scan reads SKILL.md. This mod also ships 5 executable files (refs/stubs/eslint.config.js, refs/stubs/playwright.config.ts, refs/stubs/seed-test.ts, …), 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.

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.

.claude/skills/pre-merge/SKILL.md · 111 lines

How it starts

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

pre-merge

The quality gate. Runs after eng --build says a feature branch is done: it checks quality, fixes the bugs it finds, and writes its report. It stays local — it never pushes and never opens a PR; /merge does both. Pre-merge holds no human gate — the human look at the running feature belongs to merge (../shared/refs/safety-floor.md § Human gates). Absorbs the retired /review and /test. Each run is independent. Posture: release engineer — owns the gate; repeatable evidence over assertion, severity matched to reachability, tables over prose, JSON-first.

eng --build  →  /pre-merge  →  (fail → automatic fix: eng --plan + eng --build, gate again, ≤2 rounds)  →  pass → "Next: /merge"

Usage

  • /pre-merge — gate the current feature branch against the base (staging, else main). First run: no components[] in devkit/policy.json ⇒ setup runs inline (detect tooling → batched questions, gaps only → gated install/scaffold → save devkit/policy.json), then the gate continues in the same run (refs/protocol-init.md). The PRD is found from the branch name (feat/prd-<N>-<slug>); no match or several matches ⇒ one question, with a "No PRD" choice (refs/executor.md §0b). When test selection is on, critical-test tagging runs automatically before selection (refs/protocol-criticality.md)
  • /pre-merge --update — redo or refresh setup: re-run preflight → diff components[] → approve the delta → apply present/active_when/new-component changes only, never re-grading user-set criticality or re-prompting settled opt-outs (refs/protocol-init.md). The .github/workflows/ CI pipeline is part of the detect unless policies.github_actions.enabled is false — a settled opt-out, not a gap
  • /pre-merge --prior-issues <path> / --full-secret-scan — load a prior verdict JSON to mark regressions / make the security component scan the full tree (default: diff-only)
  • /pre-merge --flaky <N> / --changed-only — retry failing e2e / unit-int tests up to N times; skip platform components whose surface the diff doesn't touch (refs/_common.md). --minified / --full — force test selection on for this run (a trial; nothing written) / force the full suites, the kill switch. Flag beats policy: --full > --minified > policies.test_selection (refs/executor.md §3c)

Read the full file on GitHub · 111 lines

Files

What ships with it

37 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. today Changed · +10 lines · +46 tokens per session 0a1ab151be48
  2. 1mo ago First seen · 101 lines · 101 tokens per session scan A b3d440bdaea3

Subscribe to this mod's changes

pre-merge is a skill published in the GitHub repository ndisisnd/msg (6 stars, last pushed yesterday), licensed MIT. It adds 147 tokens to every session and 2,675 once invoked, about $0.0006 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.