wh:graph-review

wh:graph-review is a command for Claude Code from maxwellsdm1867/wheeler. It costs 30 tokens per session (2,377 once invoked), scanned A, original, MIT.

A read-only Wheeler command that audits a Neo4j knowledge graph, a graph database, for incorrect types, broken paths, duplicates, and outdated nodes. It reports suggested fixes but does not apply them.

In plain words
What is it for?
Use it to review graph health, find disconnected or stale records, identify duplicates, and receive specific commands for possible repairs.
Why use it?
It collects several graph-quality checks into one report while keeping the stored graph unchanged.

Command for Claude Code

Part of the wh plugin — 41 skills, 40 commands, 2 agents, 3 hooks, 5 MCP servers shipped together

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.

agentmods
npx agentmods add commands/maxwellsdm1867/wheeler/graph-review
Clone the repo
git clone --depth 1 https://github.com/maxwellsdm1867/wheeler

Made for: Claude Code.

Or install wh, the plugin that ships this one along with the rest of its 41 skills, 40 commands, 2 agents, 3 hooks, 5 MCP servers.

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 wh:graph-review

README.md
[![agentmods](https://agentmods.dev/badge/commands/maxwellsdm1867/wheeler/graph-review.svg)](https://agentmods.dev/commands/maxwellsdm1867/wheeler/graph-review)
Your own site
<a href="https://agentmods.dev/commands/maxwellsdm1867/wheeler/graph-review"><img src="https://agentmods.dev/badge/commands/maxwellsdm1867/wheeler/graph-review.svg" alt="Measured on agentmods" height="20"></a>
Per session 30 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,377 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00030 $0.02377
Opus 5 $0.00015 $0.01189
Sonnet 5 $0.00006 $0.00475
Haiku 4.5 $0.00003 $0.00238

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

Security

Grade A, and why

wh:graph-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 5d 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.

.claude/commands/wh/graph-review.md · 197 lines

How it starts

The opening of the file, as written. The whole thing — 197 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Connectivity Check

Before proceeding: call graph_health. If it returns "status": "offline", STOP. Tell the user Neo4j is not running and provide the remediation steps from the error response. Offer to retry after they start it. Do not continue with other work.

You are Wheeler, performing a graph quality audit. Your job: compose existing diagnostic primitives into one readable checklist of issues with concrete suggested fixes (specific MCP-tool calls), then hand it to the scientist. You do not apply any fixes.

This command is non-destructive by design. The output is a report, not an action.

Safety Rules: READ THESE FIRST

  • NEVER auto-modify the graph. This command is read-only. All suggested fixes are presented as instructions for the scientist to run (or ignore).
  • NEVER call graph_consistency_check(repair=True). Always pass repair=False.
  • NEVER delete or merge nodes. If duplicates are found, recommend the scientist file an add_question or use propose_merge themselves.
  • Always include a fix command for each issue. A finding without an actionable fix is noise.

Phase 1: Scope

Parse $ARGUMENTS:

  • --scope session: only audit nodes from the current session (use n.session_id filter)
  • --scope recent: only audit nodes from the last 24 hours (use coalesce(n.updated, n.date) filter)
  • --scope all (default): audit the whole graph
  • --types <comma-separated>: restrict to specific node types (e.g., finding,hypothesis,script). Default: all.

Report scope to user, e.g.: "Auditing all nodes (no scope filter)."

Phase 2: Run the diagnostic battery

Call each of these in sequence (skip those filtered out by --types):

2a. Drift detection (graph vs JSON vs synthesis)

Call graph_consistency_check(repair=False). Capture the per-layer mismatch counts.

2b. Relationship-based gaps

Call graph_gaps(). Capture: unlinked questions, unsupported hypotheses, idle executions, orphan findings, orphan papers.

2c. Staleness propagation

Call detect_stale(propagate=False) (or whatever the read-only mode is). Capture stale node count by label.

Read the full file on GitHub · 197 lines

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. 5d ago First seen · 197 lines · 30 tokens per session scan A c7e4fa12b7bb

Subscribe to this mod's changes

wh:graph-review is a command published in the GitHub repository maxwellsdm1867/wheeler (10 stars, last pushed 3d ago), licensed MIT. It adds 30 tokens to every session and 2,377 once invoked, about $0.0002 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-31.