# Review Precheck

> Does this git diff need a full code review or just a quick look? A fast, free answer with no API key needed.

Review Precheck is a free AI agent skill on Agensi by Ruchit Das, in Code Quality & Review. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Ruchit Das](https://www.agensi.io/creators/ruchit-das)
- Category: [Code Quality & Review](https://www.agensi.io/skills/code-quality-review)
- Uses: 2
- Version: 1.0
- Last updated: 2026-10-09
- Security: scan passed (2026-10-09); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/review-precheck
- Tags: code-review, git, python, security, llm-ops

## About this skill

Hey! This is a small gate you put in front of an expensive code review.

It reads a git diff and answers one question: **does this change need a careful full review, or is a quick pass enough?** You get a short JSON answer your agent (or a CI script) can act on.

### What it checks

Seven questions: **secrets, dependencies, auth, schema or migrations, tests, swallowed errors, and risky logic.** The wording lives in `scripts/review_policy.json`, so you can edit it to match your own review policy.

### What you get back

```json
{ "route": "full", "flags": ["tests (offline pattern): test file tests/test_app.py deleted"] }
```

Exit code `0` means `fast` (nothing flagged), `10` means `full`. When it says `full`, hand the flags to your reviewer so it knows where to look first.

### Two modes

1. **Offline, no key, no network.** Regex checks for six of the seven questions: dependency files, schema or migration changes, deleted or skipped tests, secret-shaped strings, auth keywords, swallowed errors. "Risky logic" is judged by size alone: more than 30 changed lines is never called fast.
2. **Model mode, optional.** Set a free Codiv OpenJev API key as `OPENJEV_API_KEY` and the diff is scored by the hosted model instead. Secret-shaped strings are redacted before anything is sent, and the key only goes to `api.codiv.ai` or a loopback address. A small local model is also possible through `jev-tools-setup` (see the repo).

With no key and no offline mode chosen, a code diff routes `full` with a "Jev unavailable" flag, plus whatever the pattern checks see. It fails safe.

### What you need

Python 3.10+ and `git` on your PATH. Standard library only, nothing to pip install.

### Honest limits

- This is a triage gate, **not a code review**.
- Evidence is thin. In model mode it was smoke-tested on two diffs: a rename-only diff routed `fast`, and a diff with a hardcoded key, a swallowed exception and an emptied test file routed `full` with the right flags. That is not a benchmark.
- Offline mode is pattern matching, so it misses anything phrased unusually.
- Docs-only diffs (`.md`, `.txt`, `.rst`) skip the check and route `fast`. Diffs over 30,000 characters route `full`.
- Untracked files are not in `git diff`; run `git add -N <file>` first.
- It appends one small line per run (timestamp, route, flag count) to `~/.jev-tools/log.jsonl`. Diff content and keys are never logged.

Free and MIT licensed. Source and full measurements: github.com/Rcidshacker/jev-tools

## Known limitations

Needs Python 3.10+ and git. Untracked files are not in git diff, so run git add -N first. In offline mode "risky logic" is judged by size only: more than 30 changed lines is never called fast. Diffs over 30,000 characters always route full. Offline pattern checks miss anything phrased unusually. Only lightly tested; not a benchmark. Tested by the author on Windows only.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Review Precheck skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### What does Review Precheck do?

It reads a git diff and routes it: fast (a quick pass is enough) or full (get a careful review), with flags saying why. It asks seven questions: secrets, dependencies, auth, schema, tests, swallowed errors and risky logic. Exit code 0 means fast and 10 means full. It is a triage gate in front of a review, not a review itself.

### Do I need an API key?

No. Offline mode uses regex pattern checks and needs no key and no network. If you want model scoring as well, set a free Codiv OpenJev API key as OPENJEV_API_KEY, or set up a small local model with jev-tools-setup (see the repo). Without a key and without offline mode chosen, a code diff routes full with a "Jev unavailable" flag, so it fails safe.

### What leaves my machine?

In offline mode, nothing. In model mode, the diff (first 30,000 characters) is sent to api.codiv.ai, or to a local server if you set one up. Secret-shaped strings are redacted first and the key is only ever sent to api.codiv.ai or a loopback address. The redaction is a safety net, not a guarantee, so use offline mode for diffs you would not want to share.

### How accurate is it?

Honestly, the evidence is thin. In model mode it was smoke-tested on two diffs: a rename-only diff routed fast, and a diff with a hardcoded key, a swallowed exception and an emptied test file routed full with the right flags. Offline mode is pattern matching and was checked on a handful of small throwaway diffs. Treat it as a cheap first filter and read the flags, not a verdict.

### Which AI agents does it work with?

It is a standard SKILL.md that runs a Python script, so any agent that follows the SKILL.md standard and can run Python and git should work. I built it for Claude Code, where the skill folder is available as ${CLAUDE_SKILL_DIR}, and I have not tested other agents. In another agent, point the command at wherever the skill folder was installed.

### What does it write to my disk?

One small line per run (timestamp, route, flag count or an error type) appended to ~/.jev-tools/log.jsonl, or to the path in the JEV_LOG variable. Diff content and keys are never logged. It also reads the optional config and credentials files that jev-tools-setup writes in the same folder. Python may also write its usual __pycache__ next to the scripts. Nothing else is written.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
