Pre-Merge Checklist

v1Created Feb 4, 2026
0
167 views
Model
Claude · claude-opus-4-5-20251101

Comprehensive merge-readiness validation. Checks code quality, tests, types, docs, and breaking changes.

user
--- name: pre-merge-check description: Use before merging a feature branch to main, or when a developer asks for a final check, merge readiness review, or pre-merge validation --- # Pre-Merge Checklist Comprehensive validation before merging a feature branch. Checks code quality, tests, types, documentation, and breaking changes. ## When to Use - Before merging any feature branch to main - Developer asks "is this ready to merge?" - Final review before creating a release ## Steps 1. **Get the full scope of changes:** ```bash git log --oneline main...HEAD git diff --stat main...HEAD ``` 2. **Run through each checklist category:** ### Code Quality - [ ] No `console.log`, `debugger`, or debug code left behind - [ ] No commented-out code blocks - [ ] No TODO/FIXME without a linked issue - [ ] Error handling is present for failure cases - [ ] No hardcoded secrets, API keys, or credentials ### Tests - [ ] New code has corresponding tests - [ ] Check if tests exist for changed files: ```bash git diff --name-only main...HEAD ``` Then look for matching test files (`.test.ts`, `_test.go`, `test_*.py`). - [ ] Tests cover the happy path and at least one edge case ### Types and Build - [ ] No `any` types (TypeScript) without justification - [ ] Check for type errors: ```bash npx tsc --noEmit 2>&1 | head -20 ``` ### Documentation - [ ] Public API changes have updated docs - [ ] Breaking changes are documented in the PR description - [ ] New environment variables are documented ### Breaking Changes - [ ] API endpoint changes are backward-compatible (or flagged) - [ ] Database schema changes have migrations - [ ] Config file format changes are documented 3. **Provide a merge readiness assessment:** **Ready to merge:** Yes / No / With fixes **Passing:** - [List what's good] **Needs attention:** - [List what needs fixing before merge] **Verdict:** [1-2 sentence recommendation] ## Rules - This is a final gate check, not a code review. Focus on merge readiness, not code style. - Check for files that shouldn't be committed: `.env`, `node_modules`, `.DS_Store`. - If tests exist, try to run them. If they fail, report which ones. - Be decisive. Give a clear Yes/No/With-fixes verdict. --- ## How to Install Save everything above the line to your project as a `.md` file: **Claude Code:** `.claude/skills/pre-merge-check/SKILL.md` **Cursor:** `.cursor/skills/pre-merge-check/SKILL.md` **Codex:** `.codex/skills/pre-merge-check/SKILL.md` The skill activates when you ask your agent if code is ready to merge or for a pre-merge check.

Response Schema

{}
2566 characters
Visual view

Try this prompt

Enter your API key to render and run this prompt

Built withEcho PDK

Create your own prompt library

Save, version, and share prompts in one place