c

cortex-plugin-pr-review

ESM
v1.0.0MIT

Automated PR code review — analyze diffs, check for bugs, security issues, and style violations

0.00CortexPrism
automationcodecortex-plugindeveloper-toolsdevelopmentesm

Install Command

$ cortex plugin install marketplace:cortexprism.io/plugins/cortex-plugin-pr-review
Website RepositoryLicense: MITEntry: mod.ts

Configuration

Plugin Type
ESM
Entry Point
mod.ts
License
MIT

Capabilities

toolsnetwork:fetchfs:read

Tags

automationcodecortex-plugindeveloper-toolsdevelopmentesm

Statistics

Downloads
0
Rating
0.0
/ 5.0
Version
v1.0.0
Published
June 15, 2026

Reviews (0)

No reviews yet. Be the first to rate this plugin!

README

CortexPrism PR Review Agent

Automated code review on pull requests — analyzes diffs for bugs, security issues, style violations, and performance concerns. Posts inline comments and summary reviews to GitHub.

Installation

cortex plugin install cortex-plugin-pr-review

Or install from local development:

git clone https://github.com/CortexPrism/cortex-plugin-pr-review.git
cd cortex-plugin-pr-review
cortex plugin install .

Configuration

SettingTypeDefaultDescription
githubTokenstring (secret)GitHub personal access token for PR API access and posting comments
autoApprovestringnoneAuto-approval threshold: none, info_only, or warning_max
maxFilesToReviewnumber50Maximum number of changed files to review in a single PR

GitHub Token Permissions

Your token needs:

  • repo scope for private repos
  • public_repo scope for public repos

Tools

review_pr

Perform a comprehensive code review on a GitHub PR.

{
  "repo": "CortexPrism/cortex",
  "pr_number": 42,
  "post_comments": false,
  "severity": "warning"
}

analyze_diff

Analyze a raw git diff for issues. Useful for local changes.

{
  "diff": "diff --git a/mod.ts b/mod.ts\n+console.log('debug')",
  "language": "typescript"
}

check_security

Deep security analysis — checks for hardcoded secrets, unsafe functions, injection risks, and OWASP Top 10 patterns.

{
  "content": "const API_KEY = 'sk-abc123...';",
  "file_path": "config.ts"
}

check_style

Check code for style and best practice violations by language.

{
  "content": "var x = 1;\nif (x == 2) { console.log(x); }",
  "language": "typescript"
}

suggest_fixes

Generate specific fix suggestions for code issues. Returns diff-ready patches.

{
  "code_snippet": "const API_KEY = 'hardcoded-secret';",
  "issue_description": "Hardcoded secret in config file"
}

review_checks

List available review check categories.

{ "action": "list" }

Check Categories

CategoryWhat It Checks
SecurityHardcoded secrets, eval(), dangerouslySetInnerHTML, SQL injection patterns
Bugsconsole.log leftovers, empty catch blocks, async/await patterns
Stylevar usage, loose equality, naming conventions
PerformanceinnerHTML +=, synchronous loops, redundant operations
ComplexityDeep nesting (>3 levels), long functions

Usage Example

> Review PR #42 in CortexPrism/cortex

1. review_pr → { repo: "CortexPrism/cortex", pr_number: 42, severity: "warning" }
→ Returns findings: 3 warnings (2 bugs, 1 style), 0 errors
→ Recommendation: comment

Capabilities

CapabilityPurpose
network:fetchGitHub API access for fetching PR diffs and posting reviews
fs:readLocal diff and file analysis

Development

deno task test
deno fmt && deno lint

# Test with a real PR
cortex plugin call cortex-plugin-pr-review review_pr '{"repo":"CortexPrism/cortex","pr_number":1}'

License

MIT

Published June 15, 2026 · Updated June 15, 2026