Audit or rewrite AGENTS.md so it holds only lasting principles. Run it only when the user asks for it by name; never invoke it on your own.
日本語の概要は準備中です。原文の説明を表示しています。
Compare screenshots against the intended design, distinguishing approved references from historical baselines. Use for iterative implementation matching, before/after visual review, objective image telemetry, or checking a lone capture for flat, empty, or badly framed content.
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Judge images against the intended result. A user-approved design is the target; a historical baseline is only an earlier attempt and may be wrong. Metrics locate differences, never decide correctness. Use design-with-images for the full exploration-to-implementation loop.
references/subagent-visual-review.md.Pick metrics that answer the question. For full visual comparisons, report:
mae: mean absolute grayscale difference, 0..255, lower is closer.rmse: grayscale root mean square error, lower is closer.diffRatio16, diffRatio32, diffRatio64: fraction of pixels over each
grayscale delta threshold.pixelmatchRatio: mismatch ratio from pixelmatch over grayscale images.edgeEnergyCurrent and edgeEnergyCandidate: average Sobel edge strength.edgeEnergyRatio: candidate/current. Far below 1 usually means missing
geometry, props, labels, or terrain; far above 1 usually means noisy or
incorrect detail.edgeDiffRatio32: fraction of pixels whose Sobel edge differs materially.avgLuminanceCurrent, avgLuminanceCandidate, avgLuminanceDelta: average
brightness and delta. Use when a render is visibly too dark/light even if a
broader distance score improves.For UI/document/layout reviews, also use crop bounds, text/foreground mask coverage, contrast checks, edge clipping, element positions, and before/after dimensions when those beat global pixel distance.
Every metric above measures one image against another, so none of them can answer "is this capture worth anything" when there is nothing to compare it to — and the pair score is symmetric, so an enormous distance never says which side is the empty frame. A few absolute numbers do, computed on a coarse grid from a single PNG:
colorEntropyBits under ~3.0, or dominantColorShare over ~0.6: one colour
owns the frame. A sparse scene, an unlit one, or a subject that never drew.edgeDensity under ~0.04: almost no form anywhere. Empty framing, a
primitive-dominant scene, or the subject sitting outside the crop.luminanceContrast under ~60: fog, darkness, or haze compressing the whole
frame into one band.transparentShare above 0 on a capture that should be opaque: the capture
itself is wrong. A transparent pixel keeps whatever RGB it was left with, so
an invisible frame can look rich until it is composited — the scene metrics
composite before measuring, and name the invisible share rather than letting
you infer it. The pair metrics above still read stored RGB, so this field is
where transparency gets told either way.These are thresholds for suspicion, not gates. A deliberately minimal design, a night scene, an empty-state screen, and a whiteboard all trip them honestly. Use them to decide where to look, then say what the frame is actually doing — never adjust a capture to raise a number, which is the same failure as cropping away a difference.
When a single fixed-pair number is useful, this default works for structural changes:
distance = 0.35 * diffRatio32 + 0.25 * pixelmatchRatio + 0.25 * edgeDiffRatio32 + 0.15 * min(1, abs(log2(edgeEnergyRatio)))
It measures distance from the other image, nothing more. Because the baseline can be wrong, a distance of 0 is not success and a large distance is not failure — a richer scene, clearer models, stronger labels, real depth, or better lighting all legitimately raise it. Use the score to find where the images move; decide who is right in step 5. Name the field for what it measures (distance, not "parity") so no one reads it as a verdict.
Report the full-frame score and, when UI dominates the shot, a labeled world-crop score. Use the world-crop score to locate renderer movement and keep the full-frame score so UI/camera mistakes stay visible.
Keep comparison scripts inside the skill or a temporary workspace, not in product code, unless the product genuinely needs screenshot comparison at runtime.
scripts/visual-parity-diff.mjs is a reusable local helper. Run it with
REFERENCE_DIR=<png-folder>, CANDIDATE_DIR=<png-folder>, and optional
OUT_DIR=<artifact-folder>. REPORT_ORDER=a,b,c pins ordering;
CROPS_JSON=<file> adds labeled crops (keyed by image id, each crop in pixels
or { "unit": "ratio" } normalized bounds). Pair reports carry a
sceneMetrics block per side.REFERENCE_DIR to run the same helper on a folder with no counterpart:
it writes scene-metrics.json with the single-image numbers above and no
diff artifacts. Use it on a lone screenshot, on a full capture set before
anyone reviews it, or to find which side of a large distance is the empty
one.scripts/visual-parity-diff.eval.mjs is the helper's own eval: it generates
fixtures whose correct answer is known by construction — empty, transparent,
primitive-dominant, authored, degenerate — and asserts the classification,
the invariances, and the CLI contract. Run it with the same REPO_ROOT after
changing the script. Never satisfy a failing check by loosening a threshold
until you have shown the fixture, not the code, is what's wrong.references/subagent-visual-review.md: neutral subagent prompt/config for an
independent judgment when history could bias you.まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Audit or rewrite AGENTS.md so it holds only lasting principles. Run it only when the user asks for it by name; never invoke it on your own.
日本語の概要は準備中です。原文の説明を表示しています。
Audit the choices an implementing agent made, not its diff — a pure decision audit that traces the session's history into a choices ledger, changes no code, and never blocks an unsupervised run. Working code still embeds architecture the user never chose; surface it because future work inherits it. Use when the user wants to review the decisions the AI made on their behalf, before merging or committing AI-implemented work, when integrating a delegated subagent's pass, or when a fix "works" but might be a point fix.
日本語の概要は準備中です。原文の説明を表示しています。
Audit and prioritize performance work through bounded-work and forward-progress checks. Use when asked to find performance issues, investigate freezes/500s/OOMs, review retries or polling for no-progress loops, rank a performance backlog, or implement the next simple performance fixes.
日本語の概要は準備中です。原文の説明を表示しています。
Audit whether tests earn their maintenance cost and which suite owns each contract. Use when pruning redundant tests, investigating implementation coupling or test-only production hooks, reviewing the value of proposed coverage, or auditing an entire subsystem. Use write-tests to implement the resulting test changes.
日本語の概要は準備中です。原文の説明を表示しています。
Run fast, progressive experiments to map tunable parameters and their effects. Use when optimizing code, prompts, configurations, or other artifacts against a goal or benchmark, or when a long research run needs a planned hypothesis queue, focused trials, and durable findings.
日本語の概要は準備中です。原文の説明を表示しています。
Use Claude Code as an independent `claude -p` subagent when the user explicitly asks for Claude, wants a second-agent opinion from Claude, or asks to delegate a well-scoped task to Claude. Supports selecting `--model` and thinking/effort level with defaults of `opus` and `high`.
日本語の概要は準備中です。原文の説明を表示しています。