pre-merge

pre-merge is a skill for Claude Code, Codex from ndisisnd/msg. It costs 101 tokens per session (2,422 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 CodeCodex

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.

agentmods
npx agentmods add skills/ndisisnd/msg/pre-merge
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, Codex.

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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 101 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,422 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00101 $0.02422
Opus 5 $0.00051 $0.01211
Sonnet 5 $0.00020 $0.00484
Haiku 4.5 $0.00010 $0.00242

Measured 3d ago against content hash b3d440bdaea3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 3d ago.

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 · 101 lines

How it starts

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

pre-merge

The CI gate. Runs after eng --build says a feature branch is done and takes it to a PR open against staging with green checks. 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 → eng --build report=…, repeat)  →  PR feature→staging  →  merge --staging

Usage

  • /pre-merge — gate the current feature branch against staging
  • /pre-merge --init — the one-time setup: detect tooling → interview → gated install/scaffold → write devkit/policy.json; no gate run (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 --update — reconcile the manifest with codebase reality: 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)
  • /pre-merge --update-criticality — the criticality reconcile: inventory untagged tests → evidence-cited proposals → one human gate → markers committed + criticality_review restamped (refs/protocol-update-criticality.md)
  • /pre-merge --prd <path> (repeatable) — name the PRD explicitly. The prd group (prd-consistency, manual-test-plan) runs by default whenever a features/prd-<N>-*/ PRD matches the branch; this flag overrides an ambiguous or missing match
  • /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)
  • /pre-merge --quiet / --status <n>m — suppress or retune this run's status heartbeat; flag beats policy beats default, floor 2 minutes (../shared/refs/status-heartbeat.md)

Read the full file on GitHub · 101 lines

Files

What ships with it

38 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. 3d 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 17d ago), licensed MIT. It adds 101 tokens to every session and 2,422 once invoked, about $0.0005 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-31.