Socket
Book a DemoInstallSign in
Socket

reviewprompt

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reviewprompt

Unified AI rules management CLI tool that generates configuration files for various AI development tools

latest
Source
npmnpm
Version
0.12.0
Version published
Maintainers
1
Created
Source

ReviewPrompt

A CLI tool that converts GitHub PR review comments into structured AI prompts, making it easier to address feedback using AI assistants.

Features

  • 🔍 Comment Filtering: Filter PR comments by custom mentions (default: [ai])
  • 📋 Interactive Selection: Choose specific comments to include in your prompt
  • 📄 Smart Formatting: Automatically formats comments with file paths and line numbers
  • 🔗 Multiple Actions: View, resolve, or delete comments after processing
  • 📋 Clipboard Support: Copy generated prompts directly to clipboard
  • 🎯 Flexible Mentions: Use any custom mention format like [bot], [review], etc.

Installation

NPM

npm install -g reviewprompt

PNPM

pnpm add -g reviewprompt

Yarn

yarn global add reviewprompt

Setup

GitHub Authentication

ReviewPrompt requires GitHub authentication to access PR comments. Set up authentication using one of these methods:

  • Create a GitHub Personal Access Token with repo scope
  • Set the environment variable:
export GITHUB_TOKEN=your_token_here

GitHub CLI

If you have GitHub CLI installed and authenticated:

gh auth login

ReviewPrompt will automatically use your GitHub CLI credentials.

Usage

Basic Usage

reviewprompt https://github.com/owner/repo/pull/123

This will:

  • Fetch all review comments from the PR
  • Filter comments containing [ai] mention
  • Display the generated prompt

Interactive Mode

reviewprompt https://github.com/owner/repo/pull/123 --interactive

Select specific comments to include in your prompt using an interactive interface.

Custom Mentions

Use custom mention patterns:

reviewprompt https://github.com/owner/repo/pull/123 --mention "[bot]"
reviewprompt https://github.com/owner/repo/pull/123 --mention "@custom"

Copy to Clipboard

reviewprompt https://github.com/owner/repo/pull/123 --clipboard

Resolve Comments After Processing

reviewprompt https://github.com/owner/repo/pull/123 --resolve

Delete Comments After Processing

reviewprompt https://github.com/owner/repo/pull/123 --delete

Commands

Main Command

reviewprompt <pr-url> [options]

Options:

  • -i, --interactive - Run in interactive mode to select specific comments
  • -r, --resolve - Resolve comments after building prompt
  • -d, --delete - Delete comments after building prompt
  • -m, --mention <mention> - Custom mention to filter (default: [ai])
  • -c, --clipboard - Copy output to clipboard

Resolve Command

Resolve comments containing the specified mention:

reviewprompt resolve <pr-url> [options]

Options:

  • -a, --all - Resolve all comments without interactive mode
  • -m, --mention <mention> - Custom mention to filter (default: [ai])

Delete Command

Delete comments containing the specified mention:

reviewprompt delete <pr-url> [options]

Options:

  • -a, --all - Delete all comments without interactive mode
  • -m, --mention <mention> - Custom mention to filter (default: [ai])

Examples

Basic Workflow

  • Add mention to PR comments: When reviewing code, add [ai] to comments you want AI assistance with:

    [ai] This function needs error handling for edge cases
    
  • Generate prompt: Run reviewprompt to collect and format these comments:

    reviewprompt https://github.com/myorg/myproject/pull/456 --clipboard
    
  • Use with AI: Paste the generated prompt into your preferred AI assistant

  • Clean up: Resolve processed comments:

    reviewprompt resolve https://github.com/myorg/myproject/pull/456 --all
    

Team Workflow

Use different mentions for different team members or purposes:

# For senior dev review
reviewprompt https://github.com/myorg/myproject/pull/456 --mention "[senior]"

# For security review  
reviewprompt https://github.com/myorg/myproject/pull/456 --mention "[security]"

# For performance optimization
reviewprompt https://github.com/myorg/myproject/pull/456 --mention "[perf]"

Output Format

ReviewPrompt generates structured prompts with file context:

./src/utils/auth.ts:L15
Add input validation for the email parameter

./src/components/UserProfile.tsx:L45-L50  
This component should handle loading states better

./src/api/users.ts:L23
Consider adding rate limiting to this endpoint

Contributing

See CONTRIBUTING.md for development setup and contribution guidelines.

License

MIT - see LICENSE for details.

Support

Keywords

ai

FAQs

Package last updated on 29 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts