Skip to content

commandGit and releases

PR Checklist

Runs tests, lint and type checks, hunts leftover debug code and trims the diff before you open a pull request.

npx workspacetemplates add pr-checklist --tool claude-code

Writes 1 file to .claude/commands/

.claude/commands/pr-checklist.md15 lines · 1.2 KBFile
---
description: Runs tests, lint and type checks, hunts leftover debug code and trims the diff before you open a pull request.
argument-hint: "[base branch, default main]"
---

Check this branch is ready for a pull request. Base: $ARGUMENTS (main if empty).

1. Get the change set: `git diff --stat <base>...HEAD` and the full diff. Note files changed and lines added.
2. Run the project's test, lint and type-check commands (read package.json scripts, Makefile, pyproject). Record pass or fail with the first failing message.
3. Search added lines only for: console.log, print(, debugger, FIXME or HACK notes you introduced, commented-out code, .only or .skip in tests, hardcoded URLs and keys.
4. Flag unrelated changes: whitespace-only edits, lockfile churn without a manifest change, files outside the task.
5. Check docs: does a changed public function, flag or endpoint appear in the README or docs, and is there a changelog entry if the repo keeps one?
6. Confirm commits are readable and no merge commits sit in the branch.

Output a checklist with pass, fail or n/a, each fail with file:line. Then suggest a pull request title and a three-line description. Ask before fixing anything; never push.

What it does

Most review comments on a fresh pull request are things the author could have caught: a console.log, a skipped test, an unrelated formatting change. This command runs through those checks in one pass and lists what to fix.

It works from the diff against your base branch, so findings point at lines you actually changed. It only reports and fixes small mechanical issues after you agree.

Example

you › /pr-checklist

agent › Tests pass (312). Lint fails: 2 unused imports in src/api/orders.ts:4. Found console.log at src/api/orders.ts:88 and an it.only in orders.test.ts:41. CHANGELOG.md not updated. Fix the three mechanical items?

Questions

Does it open the pull request?
No. It prepares a title and description and leaves publishing to you.
Will it flag old TODOs that were already in the repo?
No, it inspects only lines your branch added.
  • Branch Cleanup

    CommandGit and releases

    Free
  • Changelog Entry

    CommandGit and releases

    Free
  • Cherry Pick Fix

    CommandGit and releases

    Free
  • Commit Message

    CommandGit and releases

    Free