feat: /pre-merge skill for MR/PR review before submission

Resolved 💬 2 comments Opened May 24, 2026 by backspace-shmackspace Closed May 24, 2026

Context

When preparing a merge request, there's a gap between the /ship verification (which runs at implementation time) and the actual MR submission. Code changes accumulate after /ship — bug fixes, CI config changes, rebase conflict resolutions — that never go through code review or security scan.

The current workflow requires manually invoking /code-review or /audit before submitting, which is easy to forget.

Proposal

A /pre-merge skill that automatically:

  1. Diffs the current branch against the target branch (origin/main)
  2. Runs a scoped /code-review on the diff (not the full codebase)
  3. Runs a scoped /secure-review on the diff (if the skill is deployed)
  4. Validates CI config files (YAML syntax, no conflict markers)
  5. Checks for common MR hygiene issues (uncommitted changes, secrets in diff, large binary files)
  6. Produces a summary: READY / NEEDS_ATTENTION with findings

Lighter than /audit (full codebase scan), heavier than manual review. Designed to run in 2-5 minutes as a pre-submission gate.

Motivation

During a real session building Maven support for a Tekton pipeline, we accumulated 9 commits across /ship, /fix, CI config changes, and rebase. The final MR had:

  • Unresolved merge conflict markers inherited from origin/main during rebase
  • A thread-safety bug in a CVE patch
  • A shell variable scoping issue in CI config (before_script vars not visible in script)

All of these were caught by manually running /code-review at the end, but a /pre-merge skill would have caught them automatically.

Integration with claude-devkit

This could be a new skill in skills/pre-merge/SKILL.md following the coordinator pattern. It would compose /code-review and /secure-review as subagents, similar to how /audit composes them.

🤖 Generated with Claude Code

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗