code-yeongyu/oh-my-openagent / packages/shared-skills/skills/visual-qa
visual-qa
VerifiedRuns rigorous visual QA across web, terminal, and paginated surfaces: an Apple HIG-based checklist, paired light/dark captures at phone and desktop widths, screenshot evidence, and a per-item PASS/FAIL verdict. Use for any UI build or change, or when asked whether a page, component, or TUI looks right or follows the platform's design guidelines.
| File | Kind | Size |
|---|---|---|
| AGENTS.md | markdown | 3.2 KB |
| SKILL.md | skill md | 45.7 KB |
| references/browser-setup.md | markdown | 5.6 KB |
| scripts/ansi.test.ts | script | 1.1 KB |
| scripts/ansi.ts | script | 496 B |
| scripts/cli.test.ts | script | 2.9 KB |
| scripts/cli.ts | script | 2.5 KB |
| scripts/east-asian-width.test.ts | script | 1.9 KB |
| scripts/east-asian-width.ts | script | 3.0 KB |
| scripts/image-diff.test.ts | script | 2.5 KB |
| scripts/image-diff.ts | script | 3.8 KB |
| scripts/png-crc.ts | script | 707 B |
| scripts/png-decode.test.ts | script | 1.5 KB |
| scripts/png-decode.ts | script | 5.5 KB |
| scripts/png-synth.ts | script | 1.7 KB |
| scripts/skill-doc-fields.test.ts | script | 1.6 KB |
| scripts/tui-grid.test.ts | script | 1.9 KB |
| scripts/tui-grid.ts | script | 2.7 KB |
| scripts/types.ts | script | 1.3 KB |
| scripts/visual-qa.mjs | script | 15.8 KB |
scripts/cli.ts
View on GitHubimport { readFileSync } from "node:fs"
import { diffImages } from "./image-diff"
import { decodePng } from "./png-decode"
import { checkTui } from "./tui-grid"
import type { ImageDiffResult, TuiCheckResult } from "./types"
export class CliError extends Error {
readonly name = "CliError"
}
const DEFAULT_COLUMNS = 80
const COLS_FLAG = "--cols"
export function runImageDiff(args: readonly string[]): ImageDiffResult {
const referencePath = args[0]
const actualPath = args[1]
if (referencePath === undefined || actualPath === undefined) {
throw new CliError("usage: image-diff <reference.png> <actual.png>")
}
const reference = decodePng(readFileSync(referencePath))
const actual = decodePng(readFileSync(actualPath))
return diffImages(reference, actual)
}
function parseColumns(args: readonly string[]): number {
for (let index = 0; index < args.length; index++) {
const arg = args[index] ?? ""
if (arg === COLS_FLAG) {
const parsed = Number(args[index + 1])
if (!Number.isInteger(parsed) || parsed <= 0) {
throw new CliError(`${COLS_FLAG} requires a positive integer`)
}
return parsed
}
if (arg.startsWith(`${COLS_FLAG}=`)) {
const parsed = Number(arg.slice(COLS_FLAG.length + 1))
if (!Number.isInteger(parsed) || parsed <= 0) {
throw new CliError(`${COLS_FLAG} requires a positive integer`)
}
return parsed
}
}
return DEFAULT_COLUMNS
}
export function runTuiCheck(args: readonly string[]): TuiCheckResult {
const capturePath = args[0]
if (capturePath === undefined || capturePath.startsWith("--")) {
throw new CliError("usage: tui-check <capture.txt> [--cols N]")
}
const text = readFileSync(capturePath, "utf8")
return checkTui(text, parseColumns(args.slice(1)))
}
export function run(argv: readonly string[]): ImageDiffResult | TuiCheckResult {
const command = argv[0]
const rest = argv.slice(1)
switch (command) {
case "image-diff":
return runImageDiff(rest)
case "tui-check":
return runTuiCheck(rest)
default:
throw new CliError(`unknown command "${command ?? ""}"; expected "image-diff" or "tui-check"`)
}
}
function main(argv: readonly string[]): void {
try {
const result = run(argv)
process.stdout.write(`${JSON.stringify(result, null, 2)}\n`)
} catch (error) {
const message = error instanceof Error ? error.message : String(error)
process.stderr.write(`visual-qa error: ${message}\n`)
process.exitCode = 1
}
}
if (import.meta.main) {
main(process.argv.slice(2))
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 321k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 321k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 321k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |