pre-review-check

pre-review-check is a command for Claude Code from cassler/awesome-claude-code-setup. It costs 0 tokens per session (807 once invoked), scanned A, original, MIT.

A pre-review checklist for software changes before they are sent to other developers for review. It checks code quality, security, tests, dependencies, and leftover debugging work.

In plain words
What is it for?
Use it to inspect a branch or pull request, scan for sensitive values, check changed files for tests, review dependencies, and run the test suite.
Why use it?
It catches common review problems such as TODOs, debug logs, hardcoded secrets, complex or duplicated code, and files without matching tests.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md).

Good fit Use it to inspect a branch or pull request, scan for sensitive values, check changed files for tests, review dependencies, and run the test suite.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/cassler/awesome-claude-code-setup/pre-review-check
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.

Clone the repo
git clone --depth 1 https://github.com/cassler/awesome-claude-code-setup

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-review-check

README.md
[![agentmods](https://agentmods.dev/badge/commands/cassler/awesome-claude-code-setup/pre-review-check.svg)](https://agentmods.dev/commands/cassler/awesome-claude-code-setup/pre-review-check)
Your own site
<a href="https://agentmods.dev/commands/cassler/awesome-claude-code-setup/pre-review-check"><img src="https://agentmods.dev/badge/commands/cassler/awesome-claude-code-setup/pre-review-check.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 807 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.00000 $0.00807
Opus 5 $0.00000 $0.00404
Sonnet 5 $0.00000 $0.00161
Haiku 4.5 $0.00000 $0.00081

Measured 7d ago against content hash 624d371e0ef8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

pre-review-check 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 7d ago.

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.

commands/pre-review-check.md · 120 lines

How it starts

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

Pre-Review Checklist

Please help me ensure my code is ready for review.

PR/Branch: ${PR_BRANCH:-current branch} Focus areas: ${FOCUS_AREAS:-all changes}

Quality Checks

  1. Find and fix debug code:

    # Find TODOs that need addressing
    ch cq todos --with-context
    
    # Remove debug logs
    ch cq console-logs
    
    # Check for commented code
    chs find-code "^\\s*//.*\\b(console|debug|test)" 
    
  2. Check code quality metrics:

    # Find overly large files
    ch cq large-files ${MAX_LINES:-500}
    
    # Check complexity
    ch cq complexity ${MAX_COMPLEXITY:-10}
    
    # Look for duplicated code patterns
    chs find-code "$PATTERN" --count
    
  3. Security scan:

    # Scan for hardcoded secrets
    ch cq secrets-scan
    
    # Check for sensitive data in logs
    chs find-code "password|token|secret|key" --exclude .env
    
  4. Verify test coverage:

    # Find untested files
    if ! git diff --name-only origin/main...HEAD 2>/dev/null | while IFS= read -r f; do
      echo "Checking tests for: $f"
      chs find-file "*.test.*" | xargs grep -l "$(basename "$f" .js)" 2>/dev/null || echo "  No tests found for $f"
    done; then
      echo "Note: Could not compare with origin/main"
    fi
    
    # Run tests
    ch ts test
    
  5. Check dependencies:

    # Audit for vulnerabilities
    ch ts audit
    
    # Check for unused dependencies
    ch ts deps --check-unused
    
  6. Documentation check:

    • Are new functions documented?
    • Is the README updated if needed?
    • Are breaking changes noted?

PR Preparation

  1. Generate context for reviewers:

    # Create summary
    ch ctx summarize > PR_CONTEXT.md
    
    # Show what changed
    git diff --stat origin/main...HEAD
    
  2. Check commit history:

    # Review commits
    git log --oneline origin/main..HEAD
    
    # Consider squashing if needed
    
  3. Update PR if exists:

    # Check if PR exists
    PR_NUMBER=$(gh pr list --head "$(git branch --show-current)" --json number -q ".[0].number")
    
    if [ -n "$PR_NUMBER" ]; then
      # Update PR description with context
      gh pr edit "$PR_NUMBER" --body "$(gh pr view "$PR_NUMBER" --json body -q .body)\n\n## Review Context\n\n$(cat PR_CONTEXT.md)"
      
      # Mark as ready if it's a draft
      gh pr ready "$PR_NUMBER" 2>/dev/null || echo "PR already ready for review"
      
      # Add review request if needed
      gh pr edit "$PR_NUMBER" --add-reviewer "${REVIEWER:-@me}"
    else
      echo "No PR found. Create one with: gh pr create"
    fi
    

Read the full file on GitHub · 120 lines

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. 7d ago First seen · 120 lines · 0 tokens per session scan A 624d371e0ef8

Subscribe to this mod's changes

pre-review-check is a command published in the GitHub repository cassler/awesome-claude-code-setup (267 stars, last pushed 4mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 807 tokens. 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-30.