# context-review

Reviews code changes by searching for similar patterns, callers and related tests, so you can judge their impact before committing.

Skill by JetBrains. Category: Code quality.

## Install

Project (for this project only):

```sh
npx skills add jetbrains/context --skill context-review
```

Works with: Claude Code, Codex CLI, Cursor, Antigravity, Copilot CLI, opencode.

Global (for every project on this machine):

```sh
npx skills add jetbrains/context --skill context-review -g
```

Works with: Claude Code, Codex CLI, Cursor, Antigravity, Copilot CLI, opencode.

## Tags

- Runs on your computer: It runs as a program on your machine, with your access.

## Security audits

- Gen Agent Trust Hub: Pass
- Socket: Warn
- Snyk: Pass

Installs: 10. Installs counted by skills.sh. [Open on skills.sh](https://www.skills.sh/jetbrains/context/context-review)

## Source

[Open the source](https://github.com/jetbrains/context/tree/HEAD/skills/context-review). Checked 2026-10-10. This summary may contain AI-generated text, so it can be wrong. Check the source before you rely on it.

## SKILL.md

````markdown
---
name: context-review
description: "Use this skill to review code changes using semantic search to understand context and impact"
---

## When to Use

- Before committing changes to understand what you're about to commit
- Reviewing pull requests or branches
- Understanding the impact of changes on the rest of the codebase

## Review Workflow

### 1. Check Current Changes

First, see what's changed:

```bash
git status
git diff                    # Unstaged changes
git diff --staged           # Staged changes
git diff main...HEAD        # All changes on current branch
```

### 2. Understand Changed Code Context

For each significantly changed file, use semantic search to understand:

- **Similar patterns**: Find similar code elsewhere that might need the same change
- **Callers**: Find code that calls the modified functions
- **Dependencies**: Find code that the modified code depends on

```bash
# Find similar patterns
jbcontext search "<code chunk that was changed>"

# Find callers of a modified function
jbcontext search "calls to <function name> to understand impact"

# Find related test files in the "test/" directory (path must be relative to the project root)
jbcontext search -p test "tests for <feature being modified>"
```

### 3. Review Checklist

For each change, verify:

- [ ] The change is consistent with similar patterns in the codebase
- [ ] All callers of modified functions will still work correctly
- [ ] Related tests exist and cover the changes
- [ ] The change doesn't reintroduce previously fixed bugs

## Example Session

```bash
# See what's changed
git diff --staged

# For a change to auth middleware, find similar patterns
jbcontext search "authentication middleware pattern"

# Find what calls this middleware
jbcontext search "uses auth middleware to protect routes"

# Find related tests
jbcontext search -p test "auth middleware test"
```
````

- Previous: [context-research](https://syn4pse.dev/terminal/context-research.md)
- Next: [blast-radius](https://syn4pse.dev/terminal/blast-radius.md)
- [Terminal](https://syn4pse.dev/terminal.md)
- [Suggest a change](mailto:terminal@syn4pse.dev?subject=Terminal%20suggestion)
