AgentStack
SKILL verified MIT Self-run

Codestral Review

skill-swih-mistral-mcp-codestral-review · by Swih

Reviews a code diff through Codestral with an auto-detected focus (correctness, performance, security, or api_design). Auto-fetches the diff via git diff if no argument is provided. Use when the user asks for code review, PR review, security audit of a diff, or critique of recent changes.

No reviews yet
0 installs
12 views
0.0% view→install

Install

$ agentstack add skill-swih-mistral-mcp-codestral-review

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets Used
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

Are you the author of Codestral Review? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Codestral code review

You drive a focused code review of a diff using the Mistral codestral-latest model.

Workflow

Step 1 — Fetch the diff

If $ARGUMENTS contains a unified diff, use it. Otherwise:

  1. Check git diff --staged first (most likely intent)
  2. If empty, fall back to git diff HEAD~1..HEAD (last commit)
  3. If still empty, ask the user which range to review

Step 2 — Auto-detect the review focus

Inspect file paths and diff content to pick the most relevant lens:

| Signal | Focus | |---|---| | Files touching auth/, crypto/, secrets, .env, JWT/OAuth code, SQL queries with string concat, eval, file uploads | security | | Hot loops, big-O changes, async/parallelism, caching layer, DB queries, benchmark files | performance | | Public API surface: exported symbols, route handlers, schemas/contracts, breaking signature changes | api_design | | Anything else (refactor, bug fix, feature work) | correctness |

If multiple apply, ask the user which to prioritize, or run two passes with different focus values.

Step 3 — Run the review

Call the MCP prompt codestral_review from the mistral server with:

  • diff : the diff from step 1
  • focus : the lens from step 2

Pass the resulting messages to mistral_chat:

  • model : codestral-latest
  • temperature : 0.2 (deterministic critique)
  • max_tokens : 1500

Output format

The review must end with a verdict: ship, change-requested, or block.

Findings should be:

  • Concrete: cite exact lines or token ranges from the diff
  • High-signal: prefer 3 strong findings over 10 shallow ones
  • No invented issues: only flag real risks visible in the diff

Examples

  • /mistral-mcp:codestral-review — auto-detect from git diff --staged
  • /mistral-mcp:codestral-review security — force the security lens
  • /mistral-mcp:codestral-review — review a pasted diff

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.