Skip to main content
skill CX Codex

review · mag123c — Claude Code skill for Rust code review

This skill reviews Rust CLI/TUI changes with Rust, terminal UI, and clippy checks. It runs the code reviewer only; the UX reviewer stays inactive.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add mag123c/toktrack --skill review -a claude-code
Open on GitHub

What review does

The skill sends the diff to a Code Review Agent and supplies project architecture, conventions, and the Sprint Contract when available. It requires .claude/ai-context/architecture.md and .claude/ai-context/conventions.md. Because the project is a terminal TUI, the UX Review Agent is disabled.

Its checks cover unsafe, needless cloning and allocations, error handling, SIMD and rayon paths, ratatui widgets, theme colors, terminal resizing, and keyboard events. Before review, it runs cargo fmt --check and cargo clippy --all-targets --all-features -- -D warnings. Any clippy warning stops the review, so the project must pass clippy first.

The checklist also examines cache and data loss, compatibility, migrations, and differences between environments. A PASS leads straight to /wrap. On FAIL, the skill fixes issues, runs /verify, then reviews again, up to three attempts.

What it helps with

  • review a Rust diff against project conventions
  • catch ownership and error-handling issues
  • check terminal resize and keyboard handling
  • inspect migration and cache-loss risks
  • stop review when clippy reports warnings

Example prompts for the agent

  • Review this Rust diff with the review skill and follow the project architecture.
  • Check the TUI changes for keyboard handling and terminal resizing.
  • Review this data-format migration for compatibility with older files.

How to install review

1Skills CLI (Vercel)

npx skills add mag123c/toktrack --skill review -a claude-code

2Manually: put the files in place

~/.claude/skills/review/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/review/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about review

How do I install review in Claude Code?

Run npx skills add mag123c/toktrack --skill review -a claude-code. The skill file is installed at ~/.claude/skills/review/SKILL.md.

What does the review skill do?

It asks a Code Review Agent to inspect Rust CLI/TUI changes against project rules and Rust and TUI checklists. Formatting and clippy run before the review.

What does review need to run?

The project needs .claude/ai-context/architecture.md and .claude/ai-context/conventions.md. Clippy warnings stop the review from starting.

Source text

SKILL.md · MIT
---
name: review
description: |
  Multi-agent code review for Rust CLI/TUI.
  UX Review inactive (terminal UI — no web frontend). Code Review only.
  Includes Rust/clippy-specific checklist.
required_context:
  - .claude/ai-context/architecture.md
  - .claude/ai-context/conventions.md
---

# Review (toktrack override)

Follows the global `/review` multi-agent pattern, with the following overrides:

## Override: UX Review Inactive

This project is a terminal TUI app — **do not run the UX Review Agent.**
Run Code Review Agent only.

## Override: Code Review Checklist Extension

In addition to the global checklist, append the following to the Code Review Agent prompt:

### Critical (PLAN gate)

| Category | Items |
|----------|-------|
| PLAN assumption refutation | Does the diff **falsify** the `[agent-inferred]`/`[unverified-gate]` assumptions from the PLAN (falsified → P1+, carry to wrap) |

### Author Review Gate (P0 — Identity / Matrix)

This repo is OSS and the reviewer is the author (receiving PRs). Generic code health is covered by Rust/TUI/clippy below; this section examines product-specific risks that **only the author can validate**. Perspective SSOT: session memory `feedback_review_perspective.md`.

| Tier | Category | Items |
|------|----------|-------|
| **reject** | Identity ① ultra-fast | Adding latency·blocking IO·synchronous network to hot path/startup → reject |
| **reject** | Identity ② persistent cache / data preservation | Risk of cache·history loss or corruption → reject. backward-compat·graceful degradation are the means to uphold this |
| **ruthless** | Irreversible | breaking change · data migration · public behavior change |
| **ruthless** | Environment/state matrix (contributors test only their own machine) | OS(paths·home·file locks·Windows) / source schema version(forward new-schema+backward old-format, new source·parser PRs require old-version·unknown-schema fixture) / data shape(empty·large·corrupt·partial·permissions) / locale·TZ·DST / concurrency(read race while source file is being written) / terminal(width·color·TERM) / first-run vs upgrade migration |
| **bias to YES** | Other features·ideas | Stars are the goal — acceptance bias. But if it taxes either core(weighing down hot path·startup·cache paths), request location·approach adjustment only. additive/opt-in/lazy/behind a flag = welcome |
| **lenient** | Style·naming preferences | Linter takes precedence, bikeshed prohibited (uniform strictness = contributor friction → star loss) |
| **signal** | Direction/growth fit (not a gate) | Beyond code quality·conventions, every contribution(issue·PR) also gets a direction-fit verdict in the review output: `strengthens wedge (persistent cache/data preservation)` / `neutral (additive)` / `dilutes focus (e.g. feature-parity chasing)` + 1–2 lines of rationale. Weigh holistically: maintenance cost vs value, real value to target users(AI CLI heavy users), contribution to project direction. Never a reject reason — the two identities above remain the only gates, bias-to-YES stands |

### Rust-specific

| Category | Items |
|----------|-------|
| Safety | Minimize `unsafe` usage, comment with justification |
| Ownership | Unnecessary `.clone()`, `to_string()`, `to_owned()` |
| Error | `anyhow`/`thiserror` pattern consistency, no `unwrap()` (tests excluded) |
| Performance | Unnecessary allocation, `Vec` vs iterator chain, `Box<dyn>` vs generic |
| SIMD | Check fallback branch in simd-json parsing path |
| Concurrency | Check shared mutable state in rayon parallel path |

### TUI-specific

| Category | Items |
|----------|-------|
| Widget | ratatui `Widget` trait implementation consistency |
| Theme | Use `theme.rs` semantic colors (no hardcoded colors) |
| Layout | Handle terminal resize (`Rect` boundary check) |
| Input | Missing keyboard event handling (shortcuts registered in help vs actual handlers) |

### Clippy/Fmt Pre-check

Code Review Agent checks the following before review:

```bash
cargo fmt --check
cargo clippy --all-targets --all-features -- -D warnings
```

If there are clippy warnings, FAIL before starting review (should have been caught by verify).

## Execution

1. Collect context (diff, conventions, architecture, Sprint Contract)
   - PLAN provenance tags/gates (if present) — `[agent-inferred]` / `[unverified-gate]`
2. Launch **Code Review Agent only** (feature-dev:code-reviewer)
   - Global `agents/code-review.md` prompt + above author gates + Rust/TUI checklist append
3. Parse verdict → PASS → /wrap, FAIL → fix → /verify → re-review

## Rules
- **Sub-agent model**: launch the Code Review Agent via the Agent tool with `model: "sonnet"` (Sonnet 5).
- Do not run UX Review Agent (TUI project)
- PASS → run /wrap immediately
- FAIL → fix → /verify → re-review (max 3)

© mag123c · MIT · mag123c/toktrack

Similar skills

All skills for Code review and refactoring →

review by other authors comes first.

review official anthropics Reviews inbound agreements against your playbook and routes each document to the relevant review workflow. Use it for MSA, NDA, and SaaS subscription documents. CX Codex +1 728installs review JuliusBrussee Runs an adversarial senior review of the spec before any code is written. Builds a skeptic and tries to refute the plan instead of rubber-stamping it. CX Codex +1 787installs review parcadei Runs parallel specialized subagents to evaluate code quality, architecture, and impact, then synthesizes a final merge verdict. CX Codex +1 519installs review owainlewis The skill spins up a separate subagent that reads a change and hunts for defects without editing anything. Handy before a merge when you want a second opinion. CX Codex +1 748installs review jsmastery-pro Audits completed features against your original plan, system architecture, and production readiness. Flags discrepancies in a structured report without making code edits. CX Codex +1 946installs improve-codebase-architecture Matt Pocock This skill scans a codebase for architectural friction, then builds a visual HTML report with refactoring candidates. Use it before a deeper architecture review. 1,163,035installs tdd Matt Pocock Guides the red-green TDD loop: ensures tests are written first, keep them at public interfaces, and avoid coupling to implementation details. 1,141,062installs triage Matt Pocock This skill moves issues and external PRs through triage states, verification, and agent briefs. It fits maintainers managing an issue queue. 990,453installs codebase-design Matt Pocock This skill helps design modules with small interfaces and hidden complexity. Use it when refactoring code, choosing a seam, or making tests easier to write. 850,344installs code-review Matt Pocock Reviews changes from a chosen reference point against repository standards and the originating spec. Use it for a branch, PR, or work in progress. 789,521installs implement Matt Pocock Implements work from a specification or tickets, following a test-driven flow and ending with review and a commit. Use it when a coding task needs a defined delivery routine. 774,700installs

From the same set5

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor