sanity-review

sanity-review is a command for Claude Code from sanity-io/agent-toolkit. It costs 15 tokens per session (331 once invoked), scanned A, original, MIT.

A code-review command for Sanity, a content-management system whose data is defined with schemas and queried using GROQ. It checks schemas, queries, frontend data handling, performance, and visual editing support.

In plain words
What is it for?
Use it to review a Sanity schema, GROQ query, frontend integration, or the entire Sanity setup against recommended practices.
Why use it?
It helps catch common Sanity modeling, query, type-safety, and frontend integration problems before they become harder to fix.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the sanity plugin — 7 skills, 4 commands, 1 MCP server shipped together

Good fit Use it to review a Sanity schema, GROQ query, frontend integration, or the entire Sanity setup against recommended practices.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/sanity-io/agent-toolkit/sanity-review
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/sanity-io/agent-toolkit

Made for: Claude Code.

Or install sanity, the plugin that ships this one along with the rest of its 7 skills, 4 commands, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for sanity-review

README.md
[![agentmods](https://agentmods.dev/badge/commands/sanity-io/agent-toolkit/sanity-review.svg)](https://agentmods.dev/commands/sanity-io/agent-toolkit/sanity-review)
Your own site
<a href="https://agentmods.dev/commands/sanity-io/agent-toolkit/sanity-review"><img src="https://agentmods.dev/badge/commands/sanity-io/agent-toolkit/sanity-review.svg" alt="Measured on agentmods" height="20"></a>
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 331 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00015 $0.00331
Opus 5 $0.00008 $0.00166
Sonnet 5 $0.00003 $0.00066
Haiku 4.5 $0.00002 $0.00033

Measured 7d ago against content hash fc0ba3a9968b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

sanity-review scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/sanity-review.md · 54 lines

What it actually says

Sanity Code Review

I'll review your Sanity code for best practices. Here's what I check:

Schema Review

  1. Definition Syntax

    • Using defineType, defineField, defineArrayMember
    • Icons assigned from @sanity/icons
    • Proper validation rules
  2. Data Modeling

    • "Data > Presentation" philosophy (no bigHero, redButton)
    • Correct use of references vs nested objects
    • Proper deprecation pattern for removed fields
  3. Organization

    • File naming conventions (kebab-case)
    • Schema directory structure

Query Review

  1. TypeGen Compatibility

    • Queries wrapped in defineQuery
    • SCREAMING_SNAKE_CASE naming
    • Proper field projections (not *)
  2. Performance

    • No unnecessary deep expansions
    • Using query parameters (not string interpolation)

Frontend Review

  1. Visual Editing

    • Using _key for array item keys (not index)
    • stegaClean for logic-critical values
    • No stega in <head> tags
  2. Type Safety

    • Using generated types from sanity.types.ts
    • No manual typing of query results

Usage

Just ask me to review specific files or your whole Sanity setup:

"Review my post schema" "Check my GROQ queries for issues" "Review my Sanity frontend integration"

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 54 lines · 15 tokens per session scan A fc0ba3a9968b

Subscribe to this mod's changes

sanity-review is a command published in the GitHub repository sanity-io/agent-toolkit (181 stars, last pushed 3d ago), licensed MIT. It adds 15 tokens to every session and 331 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other commands, from other repositories

implement

Multi-agent advisory squad workflow for implementing code changes: classify → score risk → select agents → planner → Gate 1 (plan approval) → advisory squad → Gate 2 (Blocker halt) → implementer → consolidator → verdict. Auto-detects depth (quick/normal/deep) from risk + file count; pass --quick or --deep to override.…

ggemba/squad-mcp · 0 tokens

inventory

Codebase inventory skill — scans the repo for a named pattern (inline SQL, fetch calls, feature flags, debug leftovers, deprecated APIs, etc.) and emits a structured Markdown inventory cross-referenced with framework metadata (routes, handlers). Language-agnostic and pack-driven — the engine matches whatever a YAML…

ggemba/squad-mcp · 0 tokens

brainstorm

Pre-implementation brainstorm + parallel web research. Spawns specialist agents in parallel with targeted web queries; synthesizes findings into an options matrix with cited sources and a recommendation. Exploratory only — never writes code or files. Use BEFORE /squad:implement to decide what to build, compare…

ggemba/squad-mcp · 0 tokens

grillme

Socratic plan validation. Grills your plan one question at a time against the project's CONTEXT.md glossary and prior ADRs; resolves terminology and decisions inline. WRITES to CONTEXT.md and docs/adr/ (with per-write confirmation) — use --no-write for dry-run. Triggers: "grill my plan", "stress-test this plan"…

ggemba/squad-mcp · 0 tokens

review

Multi-agent advisory review of an existing branch, PR, diff, or current uncommitted changes — same agents and severity model as /squad:implement but review-only. Auto-detects depth (quick/normal/deep) from risk + file count; pass --quick or --deep to override. Never implements, commits, or pushes. Triggers: "review…

ggemba/squad-mcp · 0 tokens

debug

Read-only bug investigation. Dispatches code-explorer + debugger to emit N ranked hypotheses (1/3/5 on --quick/--normal/--deep) with file:line evidence, verification steps, and confidence labels. Never writes code, never commits. Triggers: "investigate this bug", "what could cause X", "help me debug", "why is X…

ggemba/squad-mcp · 0 tokens