Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

mz-console-review

БесплатноБез исполняемых скриптовНе проверен

Review a Console (`console/`) PR or diff the way Console reviewers do: run the change to verify claims, check it against the patterns and helpers the app…

MaterializeIncот MaterializeInc★ 6 417 звёзд на GitHub

Об этом скилле

Console code review

mz-pr-review covers the Rust checklists, none of which apply under console/. The canonical Console rules live in console/CLAUDE.md (component conventions, import restrictions, TypeScript and React patterns, testing philosophy) and in console/doc/ (guide-testing.md, guide-tanstack-table.md, mz-backwards-compatibility.md). Read the sections the diff touches. Do not restate them in comments, cite them.

This skill is what Console reviewers actually flag. Section 4 is distilled from roughly 570 reviewer comments on about 150 Console PRs from 2025 and 2026, and is ordered by how often each kind of feedback came up. Sections 5 and 6 are not from that tally. They cover cost and structure that reviewers rarely catch by reading, measured on mz_catalog_server and in render-count probes.

1. Get the diff, and make it runnable

Remotes are usually upstream = MaterializeInc/materialize and origin = a personal fork, so a PR branch will not resolve against origin:

git fetch upstream pull/<N>/head:pr-<N>-review

To run anything you need the files inside console/, because node_modules lives at console/node_modules and a fresh worktree does not have it. Check the files into a tree with no local edits under <path>, run, then clean up. The restore removes files the PR added and reverts the ones it changed, and it also discards any local edits under <path>:

git checkout pr-<N>-review -- console/src/<path>
(cd console && npx vitest run src/<path>)
git restore --source=HEAD --staged --worktree -- console/src/<path>
git branch -D pr-<N>-review

Confirm git status --short is empty before you finish.

2. Verify every behavioral claim before writing it

Run the suite and state the result ("30/30 pass"). Probe anything you intend to assert. A claim about draw order, nullability, or event handling that you reasoned out but did not execute is a claim you will get wrong.

Vitest hides console.log in passing tests. Assert against a sentinel to see a value: expect(actual).toEqual("MARKER").

jsdom makes graph and pointer assertions silently vacuous:

Symptom Cause Fix in the probe
Geometric assertions pass trivially ParentSize measures nothing, width is 0 vi.mock("@visx/responsive/lib/components/ParentSize", ...) with a fixed size
Pointer handler commits NaN no createSVGPoint / getScreenCTM, so visx localPoint fails vi.mock("@visx/event", () => ({ localPoint: vi.fn(() => ({ x, y })) }))

Measure colors instead of judging them: d3.lab(color).l gives perceived lightness. d3 is already a dependency.

For SQL claims, compile the builder and read the SQL. Kysely's .select appends, it does not replace, so a "fallback" select can emit a duplicate column.

3. Read the PR before the code

Reviewers raise these before any line comment:

  • Motivation is traceable. A linked issue (a Linear key such as Closes: CNS-192, or Fixes database-issues#N for a legacy GitHub issue), a Slack thread, or a design doc. If a reviewer cannot tell why the change exists, ask for context before reviewing.
  • UI changes link the Figma design in the description.
  • Stacked PRs are linked in each description, or the work is one PR with logical commits. Review semantic commits one at a time when the author asks.
  • Commit messages are imperative and descriptive per doc/developer/guide-changes.md, not "addressed feedback".
  • A removed compatibility shim states its floor. If the PR deletes a version map or gate, the description names the minimum supported environment version.
  • WIP code is marked with TODO (spelled TODO, not TO-DO), including leftover console.log.
  • New pages and routes sit behind a LaunchDarkly flag. The point is developer experience: it lets the work merge incrementally. Self-managed flags default to true in src/config/flexibleDeploymentFlags.ts, so a flag meant to stay off there must be set to false explicitly.

4. What reviewers flag, most frequent first

4.1 Remove and simplify

The single most common request. Look for:

  • Unused variables, atoms, exports, props, and query keys. Variables that are always true.
  • Redundant fallbacks (?? 0 behind a value that cannot be null) and conditionals that render nothing.
  • Wrapper hooks that re-expose library options as custom enable* props. Keep wrappers thin, since the library's own options are better documented.
  • Features with no requirement behind them (column pinning, LRU layers). Ask "is there a requirement for this?"
  • A mini rules engine where two if statements would do.
  • Extra state flags (destroyed, initialized) that every method must check, and piles of refs. Stale refs are a bug source.
  • A copied error state when the mutation hook already exposes error.
  • !!x inside an expression that is already boolean, and several early returns that can merge into one.

4.2 SQL and catalog co

Полный SKILL.md на GitHub

Установить mz-console-review в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Bash
Read
Grep
Glob

Вложенные файлы

cost-and-structure.md

FAQ

Что делает скилл mz-console-review?

Review a Console (`console/`) PR or diff the way Console reviewers do: run the change to verify claims, check it against the patterns and helpers the app already has, and post findings as one GitHub review. Trigger: "review this console PR", "review my console changes", "does this console change look ok", a github.com/MaterializeInc/materialize/pull/<N> link whose files are under `console/`, or a request to look over a React/TypeScript diff in this repo. For Rust changes use mz-pr-review instead.

Как установить скилл mz-console-review?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл mz-console-review запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить mz-console-review с