Skip to content
Back to search

inspect

SkillWorks with Claude CodeGitHub

Entity-level code review. Triages pull requests by structural risk using cross-file dependency graphs and LLMs that read for meaning.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

Its scripts were only partly scanned.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/Ataraxy-Labs/inspect with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/Ataraxy-Labs/inspect'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/ataraxy-labs--inspect/badge.svg)](/listings/ataraxy-labs--inspect)

HTML

<a href="/listings/ataraxy-labs--inspect"><img src="/api/listings/ataraxy-labs--inspect/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

cargo install --git https://github.com/Ataraxy-Labs/inspect inspect-cli

Or build from source:

git clone https://github.com/Ataraxy-Labs/inspect
cd inspect && cargo build --release

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

SKILL.md · Manifest · 57 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # inspect
  2. Entity-level code review for Git. Scores changes by risk and groups them by logical dependency.
  3. ## Structure
  4. Cargo workspace at repo root:
  5. - `inspect-core` — analysis engine, LLM integration, risk scoring
  6. - `inspect-cli` — CLI (`inspect diff`, `inspect pr`, `inspect review`, `inspect predict`)
  7. - `inspect-mcp` — MCP server (6 tools)
  8. - `inspect-api` — REST API (Axum, JWT auth, deployed via Docker)
  9. Separate Next.js website in `docs/` (deployed to inspect.ataraxy-labs.com via Vercel "site" project).
  10. ## Build & Test
  11. ```bash
  12. cargo build --release -p inspect-cli # binary at target/release/inspect
  13. cargo build --release -p inspect-mcp # binary at target/release/inspect-mcp
  14. cargo test --workspace # 12 tests
  15. ```
  16. ## Key Paths
  17. - Risk scoring: `crates/inspect-core/src/`
  18. - CLI commands: `crates/inspect-cli/src/commands/`
  19. - MCP tools: `crates/inspect-mcp/src/`
  20. - API routes: `crates/inspect-api/src/`
  21. - Website: `docs/` (Next.js 15, Clerk auth, Supabase, Stripe billing)
  22. - Benchmarks: `benchmarks/`
  23. ## Website (docs/)
  24. The `docs/` directory is the live website. Vercel project name is "site" (root dir set to `docs/`).
  25. - Auth: Clerk
  26. - DB: Supabase
  27. - Billing: Stripe (raw fetch, not SDK)
  28. - Env vars are on the Vercel "site" project, NOT the "docs" project
  29. ## How Review Works
  30. 1. sem-core extracts entities from diff
  31. 2. Score each entity by risk (change classification, blast radius, dependency depth)
  32. 3. Group related entities by dependency graph
  33. 4. For LLM review: triage first (cut 100 entities to 10), then point LLM at high-risk set
  34. ## MCP Tools
  35. `inspect_triage`, `inspect_entity`, `inspect_group`, `inspect_file`, `inspect_stats`, `inspect_risk_map`
  36. ## Conventions
  37. - Depends on `sem-core` (git dependency, pinned commit)
  38. - Triage, not review: find where bugs would hurt most, not find bugs
  39. - inspect + LLM > pure LLM (92% token reduction via triage)
  40. - Release on tag push (`v*`)
  41. - License: FSL-1.1-ALv2 (converts to Apache 2.0 after 2 years)
README.md · README · 339 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. > **Part of the [Ataraxy Labs](https://ataraxy-labs.com) stack** — agent-native infrastructure for software development. See also: [sem](https://ataraxy-labs.com/sem) (semantic version control) · [weave](https://ataraxy-labs.com/weave) (entity-level merge driver) · [opensessions](https://github.com/Ataraxy-Labs/opensessions) (tmux sidebar for coding agents).
  2. >
  3. > Read the manifesto: https://ataraxy-labs.com/#thesis · Essays: https://ataraxy-labs.com/blogs · LLMs: https://ataraxy-labs.com/llms.txt
  4. <p align="center">
  5. <img src="assets/logo.svg" alt="inspect" width="80" />
  6. </p>
  7. <p align="center">
  8. <strong>inspect</strong>
  9. </p>
  10. <p align="center">
  11. <strong>Entity-level code review for Git.</strong><br>
  12. Triage PRs by structural risk, not line count.
  13. </p>
  14. inspect is a code review tool that works at the entity level instead of files or lines. It parses your diff with tree-sitter, classifies each changed entity (text-only, syntax, functional), scores it by risk using the cross-file dependency graph, and groups independent changes so tangled commits can be reviewed as separate units.
  15. Every code review tool today shows you files and lines. inspect shows you which functions matter. A renamed variable, a reformatted function, and a deleted public API method all look the same in a line diff. inspect scores the API deletion as critical (high blast radius, many dependents) and the rename as low risk. Review the critical stuff first, skip the noise.
  16. On the Greptile benchmark (141 findings across 52 PRs), inspect achieved 95.0% recall vs Greptile's 91.5% and CodeRabbit's 56.0%. On the Martian benchmark (137 findings, 50 PRs), inspect scored 46.2% F1, beating Augment Code (45.8%) for #1 on their leaderboard.
  17. Agents and CI pipelines consume inspect through JSON output or the built-in MCP server (6 tools). Developers use the CLI to triage locally before pushing.
  18. ## The Problem
  19. `git diff` tells you 12 files changed. But which changes actually matter? A renamed variable, a reformatted function, and a deleted public API method all look the same in a line-level diff. You have to read every line to figure out what needs careful review and what can be skipped.
  20. This gets worse with AI-generated code. DORA 2025 found that AI adoption led to +154% PR size, +91% review time, and +9% more bugs shipped. Reviewers are drowning in noise.
  21. inspect gives you two ways to handle this: local triage that ranks changes by structural risk, and optional LLM-powered review that finds the actual bugs.
  22. ## What inspect Does
  23. For every changed entity, inspect computes:
  24. - **Classification**: What kind of change is this? Text-only (comments/whitespace), syntax (signature/type change), functional (logic change), or a combination. Based on [ConGra](https://arxiv.org/abs/2409.14121).
  25. - **Risk score**: 0.0 to 1.0, combining classification, blast radius, dependent count, public API exposure, and change type. Cosmetic-only changes get a 70% discount.
  26. - **Blast radius**: How many entities are transitively affected if this change breaks something. Computed from the full repo entity graph, not just changed files.
  27. - **Grouping**: Union-Find untangling separates independent logical changes within a single commit, so tangled commits can be reviewed as separate units.
  28. ```
  29. $ inspect diff HEAD~1
  30. inspect 12 entities changed
  31. 1 critical, 4 high, 6 medium, 1 low
  32. groups 3 logical groups:
  33. [0] src/merge/ (5 entities)
  34. [1] src/driver/ (4 entities)
  35. [2] validate (3 entities)
  36. entities (by risk):
  37. ~ CRITICAL function merge_entities (src/merge/core.rs)
  38. classification: functional score: 0.82 blast: 171 deps: 3/12
  39. public API
  40. >>> 12 dependents may be affected
  41. - HIGH function old_validate (src/validate.rs)
  42. classification: functional score: 0.65 blast: 8 deps: 0/3
  43. public API
  44. + MEDIUM function parse_config (src/config.rs)
  45. classification: functional score: 0.45 blast: 0 deps: 2/0
  46. ~ LOW function format_output (src/display.rs)
  47. classification: text score: 0.05 blast: 0 deps: 0/0
  48. cosmetic only (no structural change)
  49. ```
  50. ## Two ways to use inspect
  51. **Local (free, open source):** CLI + MCP server. Entity triage, risk scoring, blast radius, commit untangling. `inspect review` sends the riskiest entities to any LLM you choose (Anthropic, OpenAI, Ollama, or any OpenAI-compatible server). No vendor lock-in.
  52. **Hosted API (optional):** Full review via `inspect.ataraxy-labs.com`. Goes further than local review with 9 specialized lenses, cross-model ensemble, and validation passes. Submit a PR, get back findings.
  53. ## Install
  54. ```bash
  55. cargo install --git https://github.com/Ataraxy-Labs/inspect inspect-cli
  56. ```
  57. Or build from source:
  58. ```bash
  59. git clone https://github.com/Ataraxy-Labs/inspect
  60. cd inspect && cargo build --release
  61. ```
  62. ## Commands
  63. ### `inspect diff <ref>`
  64. Review entity-level changes for a commit or range.
  65. ```bash
  66. inspect diff HEAD~1 # last commit
  67. inspect diff main..feature # branch comparison
  68. inspect diff abc123 # specific commit
  69. inspect diff HEAD~1 --context # show dependency details
  70. inspect diff HEAD~1 --min-risk high # only high/critical
  71. inspect diff HEAD~1 --format json # JSON output
  72. inspect diff HEAD~1 --format markdown # markdown output (for agents)
  73. ```
  74. ### `inspect pr <number>`
  75. Review all changes in a GitHub pull request. Uses `gh` CLI to resolve base/head refs.
  76. ```bash
  77. inspect pr 42
  78. inspect pr 42 --min-risk medium
  79. inspect pr 42 --format json
  80. ```
  81. ### `inspect file <path>`
  82. Review uncommitted changes in a file.
  83. ```bash
  84. inspect file src/main.rs
  85. inspect file src/main.rs --context
  86. ```
  87. ### `inspect review <ref>`
  88. Triage + LLM review. Triages entities by risk, sends the highest-risk ones to an LLM for review.
  89. ```bash
  90. inspect review HEAD~1 # Anthropic (default)
  91. inspect review HEAD~1 --provider ollama --model llama3 # local Ollama
  92. inspect review HEAD~1 --api-base http://localhost:8000/v1 --model my-model # any OpenAI-compatible server
  93. inspect review HEAD~1 --min-risk medium # review more entities
  94. inspect review HEAD~1 --max-entities 20 # send more to LLM
  95. ```
  96. ### `inspect bench --repo <path>`
  97. Benchmark entity-level review across a repo's commit history. Outputs JSON with per-commit details and aggregate metrics.
  98. ```bash
  99. inspect bench --repo ~/my-project --limit 50
  100. ```
  101. ## LLM Providers
  102. `inspect review` works with Anthropic, OpenAI, and any OpenAI-compatible server (Ollama, vLLM, LM Studio, llama.cpp). Pass `--api-base` and it auto-detects the right client.
  103. ```bash
  104. # Anthropic (default)
  105. export ANTHROPIC_API_KEY=sk-ant-...
  106. inspect review HEAD~1
  107. # OpenAI
  108. export OPENAI_API_KEY=sk-...
  109. inspect review HEAD~1 --provider openai --model gpt-4o
  110. # Ollama (local, no API key)
  111. inspect review HEAD~1 --provider ollama --model llama3
  112. # Any OpenAI-compatible endpoint (vLLM, LM Studio, etc.)
  113. inspect review HEAD~1 --api-base http://localhost:8000/v1 --model my-model
  114. ```
  115. | Provider | API key env var | Default base URL |
  116. |----------|----------------|-----------------|
  117. | `anthropic` | ANTHROPIC_API_KEY | api.anthropic.com |
  118. | `openai` | OPENAI_API_KEY | api.openai.com/v1 |
  119. | `ollama` | none | localhost:11434/v1 |
  120. `--api-base` implies the OpenAI-compatible client, so you don't need `--provider` with it. `--provider ollama` implies `localhost:11434`, so you don't need `--api-base` with it.
  121. ## MCP Server
  122. inspect ships an MCP server so any coding agent (Claude Code, Cursor, etc.) can use entity-level review as a tool.
  123. ```bash
  124. # Build the MCP server
  125. cargo build -p inspect-mcp
  126. # Binary at target/debug/inspect-mcp
  127. ```
  128. **6 tools:**
  129. | Tool | Purpose |
  130. |------|---------|
  131. | `inspect_triage` | Primary entry point. Full analysis sorted by risk with verdict. |
  132. | `inspect_entity` | Drill into one entity: before/after content, dependents, dependencies. |
  133. | `inspect_group` | Get all entities in a logical change group. |
  134. | `inspect_file` | Scope review to a single file. |
  135. | `inspect_stats` | Lightweight summary: stats, verdict, timing. No entity details. |
  136. | `inspect_risk_map` | File-level risk heatmap with per-file aggregate scores. |
  137. **Review verdict** (returned by triage and stats):
  138. - `likely_approvable`: All changes are cosmetic
  139. - `standard_review`: Normal changes, no high-risk entities
  140. - `requires_review`: High-risk entities present
  141. - `requires_careful_review`: Critical-risk entities present
  142. Add to your Claude Code config:
  143. ```json
  144. {
  145. "mcpServers": {
  146. "inspect": {
  147. "command": "/path/to/inspect-mcp"
  148. }
  149. }
  150. }
  151. ```
  152. ## Code Review Benchmark
  153. inspect + LLM vs Greptile vs CodeRabbit on the same dataset, same judge, same methodology. 141 planted bugs across 52 PRs in 5 production repos (Sentry, Cal.com, Grafana, Keycloak, Discourse).
  154. | Metric | inspect + LLM | Greptile API | CodeRabbit CLI |
  155. |--------|--------------|-------------|----------------|
  156. | Recall | **95.0%** | 91.5% | 56.0% |
  157. | Precision | 33.3% | 21.9% | **48.2%** |
  158. | F1 Score | 49.4% | 35.3% | **51.8%** |
  159. | HC Recall | **100%** | 94.1% | 60.8% |
  160. | Findings | 402 | 590 | 164 |
  161. inspect catches **95% of all bugs** and **100% of high-severity bugs**. CodeRabbit misses 44% of bugs overall and 39% of high-severity ones. Greptile has decent recall but produces 3x more noise.
  162. The approach: entity-level triage cuts 100+ changed entities to the 60 riskiest, then sends each to an LLM for review. This costs a fraction of reviewing the full diff, with higher recall than tools that scan everything.
  163. Dataset: [HuggingFace](https://huggingface.co/datasets/rs545837/inspect-greptile-bench). Judge: heuristic keyword matching applied identically to all tools.
  164. ## Hosted API
  165. For teams that don't want to manage LLM infrastructure, we run a hosted review service at `inspect.ataraxy-labs.com`. It goes beyond what `inspect review` does locally.
  166. **What the hosted API does differently:**
  167. 1. Entity triage ranks changes by graph signals (same as local)
  168. 2. 9 parallel review lenses: 6 specialized (data correctness, concurrency, contracts, security, typos, runtime) + 3 general
  169. 3. Cross-model ensemble for higher recall
  170. 4. Structural filter drops findings that reference files not in the diff
  171. 5. Validation pass confirms each finding against the actual code
  172. ```bash
  173. # Submit a PR for review
  174. curl -X POST https://inspect.ataraxy-labs.com/api/review \
  175. -H "Authorization: Bearer insp_..." \
  176. -H "Content-Type: application/json" \
  177. -d '{"repo":"owner/repo","pr_number":123}'
  178. # Entity triage only (no LLM, returns in 1-3s)
  179. curl -X POST https://inspect.ataraxy-labs.com/api/triage \
  180. -H "Authorization: Bearer insp_..." \
  181. -H "Content-Type: application/json" \
  182. -d '{"repo":"owner/repo","pr_number":123}'
  183. ```
  184. Get an API key at [inspect.ataraxy-labs.com/dashboard/keys](https://inspect.ataraxy-labs.com/dashboard/keys).
  185. ## Triage Benchmark
  186. Results from running `inspect bench` against three Rust codebases (89 commits, 8,870 entities total):
  187. | Metric | sem | weave | agenthub |
  188. |--------|-----|-------|----------|
  189. | Commits analyzed | 31 | 39 | 19 |
  190. | Entities reviewed | 4,955 | 2,803 | 1,112 |
  191. | Avg entities/commit | 159.8 | 71.9 | 58.5 |
  192. | Avg blast radius | 0.0 | 3.4 | 42.5 |
  193. | Max blast radius | 0 | 171 | **595** |
  194. | High/Critical ratio | 15.1% | 40.6% | **77.1%** |
  195. | Cross-file impact | 0% | 10.6% | **70.7%** |
  196. | Tangled commits | 96.8% | 69.2% | 94.7% |
  197. Key takeaways:
  198. - **Blast radius 595** means one entity change in agenthub could affect 595 other entities transitively. A line-level diff won't tell you this.
  199. - **70.7% cross-file impact** means most changes in agenthub ripple across file boundaries. Reviewing one file in isolation misses the picture.
  200. - **96.8% tangled commits** means almost every commit in sem contains multiple independent logical changes that should be reviewed separately.
  201. ## Change Classification
  202. Based on [ConGra (arXiv:2409.14121)](https://arxiv.org/abs/2409.14121). Every change is classified along three dimensions, producing 7 categories:
  203. | Classification | What changed |
  204. |---------------|-------------|
  205. | Text | Comments, whitespace, docs only |
  206. | Syntax | Signatures, types, declarations (no logic) |
  207. | Functional | Logic or behavior |
  208. | Text+Syntax | Comments and signatures |
  209. | Text+Functional | Comments and logic |
  210. | Syntax+Functional | Signatures and logic |
  211. | Text+Syntax+Functional | All three dimensions |
  212. ## Risk Scoring
  213. Each entity gets a risk score from 0.0 to 1.0:
  214. ```
  215. score = classification_weight (0.05 to 0.55)
  216. + blast_ratio * 0.3 (normalized by total entities)
  217. + ln(1 + dependents) * 0.1 (logarithmic)
  218. + public_api_boost (0.15 if public)
  219. + change_type_weight (0.05 to 0.2)
  220. if cosmetic_only: score *= 0.3
  221. ```
  222. Risk levels: **Critical** (>= 0.7), **High** (>= 0.5), **Medium** (>= 0.3), **Low** (< 0.3)
  223. ## Languages
  224. TypeScript, TSX, JavaScript, Python, Go, Rust, Java, C, C++, Ruby, C#, PHP, Swift, Kotlin, Elixir, Bash, HCL/Terraform, Fortran, Vue
  225. Powered by tree-sitter parsers from [sem-core](https://github.com/Ataraxy-Labs/sem).
  226. ## Architecture
  227. Three crates:
  228. - **inspect-core**: Analysis engine. Entity extraction (via sem-core), change classification, risk scoring, Union-Find untangling, review verdict.
  229. - **inspect-cli**: CLI interface with terminal, JSON, and markdown formatters.
  230. - **inspect-mcp**: MCP server exposing 6 tools for agent integration.
  231. ```
  232. Git diff
  233. -> sem-core: extract entities, compute semantic diff
  234. -> classify: ConGra taxonomy (text/syntax/functional)
  235. -> risk: score from classification + blast radius + dependents + public API
  236. -> untangle: Union-Find grouping on dependency edges
  237. -> verdict: LikelyApprovable / StandardReview / RequiresReview / RequiresCarefulReview
  238. -> format: terminal, JSON, or markdown output
  239. ```
  240. ## Part of the Ataraxy Labs stack
  241. - [**sem**](https://github.com/Ataraxy-Labs/sem): Entity-level diff, blame, graph, and impact analysis
  242. - [**weave**](https://github.com/Ataraxy-Labs/weave): Entity-level semantic merge driver for Git
  243. - [**inspect**](https://github.com/Ataraxy-Labs/inspect): Entity-level code review (this repo)

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.