Skip to content

hashgraph-online/awesome-codex-plugins / plugins/beefiker/superloopy/skills/superloopy-frontend

superloopy-frontend

Verified

Use only after explicit Codex `$superloopy:superloopy-frontend` or Claude Code `/superloopy:superloopy-frontend` invocation for supported screen-based application UI across browser-hosted Web, interactive deployed content-led Web, desktop, mobile/tablet, embedded/hybrid, Qt, custom-rendered, or mixed targets, such a task started with a leading `loopy` or `루피`, or an active Superloopy loop explicitly routing it here. Do not activate from UI, frontend, desktop, mobile, or framework vocabulary alone, or for TV, wearable, XR, automotive, game UI, TUI, static media/document artifacts, or non-UI work.

FileKindSize
SKILL.mdskill md14.2 KB
agents/openai.yamlconfig505 B
references/anti-slop.mdmarkdown6.4 KB
references/design-system.mdmarkdown7.8 KB
references/design/_INDEX.mdmarkdown9.6 KB
references/design/airbnb.mdmarkdown4.0 KB
references/design/airtable.mdmarkdown3.6 KB
references/design/amazon.mdmarkdown4.3 KB
references/design/apple.mdmarkdown3.8 KB
references/design/binance.mdmarkdown4.1 KB
references/design/bmw.mdmarkdown4.1 KB
references/design/brex.mdmarkdown4.0 KB
references/design/bugatti.mdmarkdown4.2 KB
references/design/cal.mdmarkdown3.7 KB
references/design/canva.mdmarkdown4.0 KB
references/design/claude.mdmarkdown3.5 KB
references/design/clickhouse.mdmarkdown4.0 KB
references/design/cohere.mdmarkdown3.6 KB
references/design/coinbase.mdmarkdown3.8 KB
references/design/cursor.mdmarkdown4.7 KB
references/design/datadog.mdmarkdown4.4 KB
references/design/discord.mdmarkdown4.0 KB
references/design/duolingo.mdmarkdown4.1 KB
references/design/elevenlabs.mdmarkdown3.6 KB
references/design/ferrari.mdmarkdown4.3 KB
references/design/figma.mdmarkdown3.7 KB
references/design/framer.mdmarkdown4.0 KB
references/design/gemini.mdmarkdown4.4 KB
references/design/github.mdmarkdown4.1 KB
references/design/gitlab.mdmarkdown4.1 KB
references/design/google.mdmarkdown4.0 KB
references/design/groq.mdmarkdown4.6 KB
references/design/hashicorp.mdmarkdown4.7 KB
references/design/huggingface.mdmarkdown4.3 KB
references/design/ibm.mdmarkdown4.7 KB
references/design/intercom.mdmarkdown3.7 KB
references/design/kraken.mdmarkdown3.7 KB
references/design/lamborghini.mdmarkdown4.2 KB
references/design/linear.mdmarkdown3.9 KB
references/design/loom.mdmarkdown4.1 KB
references/design/mastercard.mdmarkdown4.5 KB
references/design/mercedes.mdmarkdown4.1 KB
references/design/mercury.mdmarkdown3.9 KB
references/design/meta.mdmarkdown3.9 KB
references/design/microsoft.mdmarkdown4.5 KB
references/design/midjourney.mdmarkdown4.3 KB
references/design/minimax.mdmarkdown4.8 KB
references/design/mintlify.mdmarkdown4.5 KB
references/design/miro.mdmarkdown4.1 KB
references/design/mistral.mdmarkdown3.6 KB
references/design/mongodb.mdmarkdown4.4 KB
references/design/netflix.mdmarkdown4.0 KB
references/design/netlify.mdmarkdown4.4 KB
references/design/nike.mdmarkdown3.9 KB
references/design/notion.mdmarkdown3.9 KB
references/design/nvidia.mdmarkdown4.7 KB
references/design/nytimes.mdmarkdown5.1 KB
references/design/ollama.mdmarkdown4.1 KB
references/design/openai.mdmarkdown3.5 KB
references/design/perplexity.mdmarkdown3.7 KB
references/design/pinterest.mdmarkdown3.8 KB
references/design/plaid.mdmarkdown4.1 KB
references/design/playstation.mdmarkdown4.4 KB
references/design/porsche.mdmarkdown4.0 KB
references/design/posthog.mdmarkdown4.1 KB
references/design/railway.mdmarkdown4.7 KB
references/design/ramp.mdmarkdown3.8 KB
references/design/raycast.mdmarkdown4.6 KB
references/design/renault.mdmarkdown4.5 KB
references/design/replicate.mdmarkdown3.9 KB
references/design/resend.mdmarkdown4.7 KB
references/design/revolut.mdmarkdown3.6 KB
references/design/robinhood.mdmarkdown4.0 KB
references/design/rolex.mdmarkdown4.1 KB
references/design/runwayml.mdmarkdown3.9 KB
references/design/sanity.mdmarkdown4.6 KB
references/design/sentry.mdmarkdown3.8 KB
references/design/shopify.mdmarkdown4.0 KB
references/design/slack.mdmarkdown4.1 KB
references/design/spacex.mdmarkdown4.6 KB
references/design/spotify.mdmarkdown3.7 KB
references/design/starbucks.mdmarkdown4.8 KB
references/design/stripe.mdmarkdown4.0 KB
references/design/substack.mdmarkdown4.6 KB
references/design/supabase.mdmarkdown3.7 KB
references/design/superhuman.mdmarkdown4.2 KB
references/design/tesla.mdmarkdown4.5 KB
references/design/theverge.mdmarkdown4.4 KB
references/design/together.mdmarkdown4.1 KB
references/design/uber.mdmarkdown3.9 KB
references/design/vercel.mdmarkdown4.0 KB
references/design/warp.mdmarkdown4.3 KB
references/design/webflow.mdmarkdown4.0 KB
references/design/wired.mdmarkdown4.5 KB
references/design/wise.mdmarkdown3.8 KB
references/design/xai.mdmarkdown4.1 KB
references/design/zapier.mdmarkdown4.1 KB
references/desktop.mdmarkdown3.3 KB
references/hybrid.mdmarkdown3.1 KB
references/image-first.mdmarkdown5.3 KB
references/impeccable.mdmarkdown5.3 KB
references/layout.mdmarkdown6.3 KB
references/mobile.mdmarkdown3.2 KB
references/motion-core.mdmarkdown4.1 KB
references/motion.mdmarkdown9.9 KB
references/perfection.mdmarkdown8.9 KB
references/qt-qa.mdmarkdown8.0 KB
references/qt-quick.mdmarkdown10.3 KB
references/qt-widgets.mdmarkdown9.4 KB
references/qt.mdmarkdown11.1 KB
references/redesign.mdmarkdown6.9 KB
references/renderer.mdmarkdown2.9 KB
references/system-map.mdmarkdown7.9 KB
references/upstream-notice.mdmarkdown2.8 KB
references/ux.mdmarkdown22.2 KB
references/web.mdmarkdown15.7 KB
scripts/ds-compliance.mjsscript4.4 KB
scripts/evidence-root.mjsscript5.0 KB
scripts/visual-diff.mjsscript9.6 KB

scripts/visual-diff.mjs

View on GitHub
#!/usr/bin/env node
// Dependency-free PNG visual diff for the Superloopy frontend visual-QA gate.
// Turns "does it look right?" into measured evidence: a per-pixel diffRatio, a
// similarityScore, an alpha-intact flag, and an 8x8 grid of ranked hotspots that
// localize WHERE a render deviates from its reference. The JSON is evidence to AIM
// a review, never the verdict (a 99/100 score can still hide a faked or broken UI).
//
// Uses only node:zlib + node:fs so the loop can run in any sandbox with no install.
// Supports 8-bit non-interlaced PNGs, color types 0/2/4/6 (the shapes headless
// browsers and Playwright emit). Exports decode/diff/encode for tests; runs as a CLI.
//
// CLI:  node visual-diff.mjs <reference.png> <actual.png> [--json] [--tolerance N]

import { readFileSync } from "node:fs";
import { pathToFileURL } from "node:url";
import { deflateSync, inflateSync } from "node:zlib";

const PNG_SIGNATURE = Buffer.from([0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a]);
const GRID_SIZE = 8;
const MAX_PIXELS = 25_000_000;
const MAX_INFLATED_BYTES = 128 * 1024 * 1024;

const CRC_TABLE = (() => {
  const table = new Int32Array(256);
  for (let n = 0; n < 256; n += 1) {
    let c = n;
    for (let k = 0; k < 8; k += 1) c = c & 1 ? 0xedb88320 ^ (c >>> 1) : c >>> 1;
    table[n] = c;
  }
  return table;
})();

function crc32(buffer) {
  let crc = 0xffffffff;
  for (let i = 0; i < buffer.length; i += 1) crc = CRC_TABLE[(crc ^ buffer[i]) & 0xff] ^ (crc >>> 8);
  return (crc ^ 0xffffffff) >>> 0;
}

function paeth(a, b, c) {
  const p = a + b - c;
  const pa = Math.abs(p - a);
  const pb = Math.abs(p - b);
  const pc = Math.abs(p - c);
  if (pa <= pb && pa <= pc) return a;
  return pb <= pc ? b : c;
}

const CHANNELS_BY_COLOR_TYPE = { 0: 1, 2: 3, 4: 2, 6: 4 };

// Decode an 8-bit non-interlaced PNG buffer to { width, height, rgba, hasTransparentPixels }.
export function decodePng(buffer) {
  if (buffer.length < 8 || !buffer.subarray(0, 8).equals(PNG_SIGNATURE)) {
    throw new Error("Not a PNG file (bad signature).");
  }
  let offset = 8;
  let width = 0;
  let height = 0;
  let bitDepth = 0;
  let colorType = 0;
  let interlace = 0;
  const idat = [];
  while (offset < buffer.length) {
    const length = buffer.readUInt32BE(offset);
    const type = buffer.toString("ascii", offset + 4, offset + 8);
    const data = buffer.subarray(offset + 8, offset + 8 + length);
    if (type === "IHDR") {
      width = data.readUInt32BE(0);
      height = data.readUInt32BE(4);
      bitDepth = data[8];
      colorType = data[9];
      interlace = data[12];
    } else if (type === "IDAT") {
      idat.push(Buffer.from(data));
    } else if (type === "IEND") {
      break;
    }
    offset += 12 + length;
  }
  if (bitDepth !== 8) throw new Error(`Unsupported PNG bit depth ${bitDepth} (need 8).`);
  if (interlace !== 0) throw new Error("Interlaced PNG is unsupported.");
  const channels = CHANNELS_BY_COLOR_TYPE[colorType];
  if (channels === undefined) throw new Error(`Unsupported PNG color type ${colorType}.`);
  if (width <= 0 || height <= 0) throw new Error("PNG dimensions must be positive.");
  const pixelsCount = width * height;
  const inflatedBytes = height * (width * channels + 1);
  if (!Number.isSafeInteger(pixelsCount) || pixelsCount > MAX_PIXELS || inflatedBytes > MAX_INFLATED_BYTES) {
    throw new Error(`PNG dimensions exceed safe decode limits (${width}x${height}).`);
  }

  const raw = inflateSync(Buffer.concat(idat));
  const stride = width * channels;
  if (raw.length < inflatedBytes) throw new Error("PNG image data is truncated.");
  if (raw.length > MAX_INFLATED_BYTES) throw new Error("PNG image data exceeds safe decode limits.");
  const pixels = Buffer.alloc(height * stride);
  let prevRow = Buffer.alloc(stride);
  let src = 0;
  for (let y = 0; y < height; y += 1) {
    const filter = raw[src];
    src += 1;
    const row = pixels.subarray(y * stride, y * stride + stride);
    for (let i = 0; i < stride; i += 1) {
      const x = raw[src + i];
      const a = i >= channels ? row[i - channels] : 0;
      const b = prevRow[i];
      const c = i >= channels ? prevRow[i - channels] : 0;
      let value;
      if (filter === 0) value = x;
      else if (filter === 1) value = x + a;
      else if (filter === 2) value = x + b;
      else if (filter === 3) value = x + ((a + b) >> 1);
      else if (filter === 4) value = x + paeth(a, b, c);
      else throw new Error(`Unsupported PNG filter ${filter}.`);
      row[i] = value & 0xff;
    }
    src += stride;
    prevRow = row;
  }

  const rgba = new Uint8ClampedArray(width * height * 4);
  let hasTransparentPixels = false;
  for (let p = 0; p < width * height; p += 1) {
    const s = p * channels;
    let r;
    let g;
    let b;
    let a = 255;
    if (colorType === 0) { r = g = b = pixels[s]; }
    else if (colorType === 4) { r = g = b = pixels[s]; a = pixels[s + 1]; }
    else if (colorType === 2) { r = pixels[s]; g = pixels[s + 1]; b = pixels[s + 2]; }
    else { r = pixels[s]; g = pixels[s + 1]; b = pixels[s + 2]; a = pixels[s + 3]; }
    if (a < 255) hasTransparentPixels = true;
    const d = p * 4;
    rgba[d] = r; rgba[d + 1] = g; rgba[d + 2] = b; rgba[d + 3] = a;
  }
  return { width, height, rgba, hasTransparentPixels };
}

// Encode RGBA (Uint8/Array, length w*h*4) to a color-type-6 PNG buffer. Used by tests
// to synthesize fixtures so the diff can self-verify with no external image files.
export function encodePng(width, height, rgba) {
  const channels = 4;
  const stride = width * channels;
  const raw = Buffer.alloc(height * (stride + 1));
  for (let y = 0; y < height; y += 1) {
    raw[y * (stride + 1)] = 0; // filter: none
    for (let i = 0; i < stride; i += 1) raw[y * (stride + 1) + 1 + i] = rgba[y * stride + i] & 0xff;
  }
  const chunk = (type, data) => {
    const out = Buffer.alloc(12 + data.length);
    out.writeUInt32BE(data.length, 0);
    out.write(type, 4, "ascii");
    data.copy(out, 8);
    out.writeUInt32BE(crc32(out.subarray(4, 8 + data.length)), 8 + data.length);
    return out;
  };
  const ihdr = Buffer.alloc(13);
  ihdr.writeUInt32BE(width, 0);
  ihdr.writeUInt32BE(height, 4);
  ihdr[8] = 8; ihdr[9] = 6; ihdr[10] = 0; ihdr[11] = 0; ihdr[12] = 0;
  return Buffer.concat([PNG_SIGNATURE, chunk("IHDR", ihdr), chunk("IDAT", deflateSync(raw)), chunk("IEND", Buffer.alloc(0))]);
}

// Compare two decoded images. Returns measured fields + ranked grid hotspots.
export function diffImages(reference, actual, tolerance = 0) {
  const width = Math.min(reference.width, actual.width);
  const height = Math.min(reference.height, actual.height);
  const dimensionsMatch = reference.width === actual.width && reference.height === actual.height;
  const grid = Array.from({ length: GRID_SIZE * GRID_SIZE }, () => ({ diff: 0, total: 0 }));
  let diffPixels = 0;
  for (let y = 0; y < height; y += 1) {
    const gy = Math.min(GRID_SIZE - 1, Math.floor((y / height) * GRID_SIZE));
    for (let x = 0; x < width; x += 1) {
      const gx = Math.min(GRID_SIZE - 1, Math.floor((x / width) * GRID_SIZE));
      const cell = grid[gy * GRID_SIZE + gx];
      cell.total += 1;
      const ri = (y * reference.width + x) * 4;
      const ai = (y * actual.width + x) * 4;
      const differs =
        Math.abs(reference.rgba[ri] - actual.rgba[ai]) > tolerance ||
        Math.abs(reference.rgba[ri + 1] - actual.rgba[ai + 1]) > tolerance ||
        Math.abs(reference.rgba[ri + 2] - actual.rgba[ai + 2]) > tolerance ||
        Math.abs(reference.rgba[ri + 3] - actual.rgba[ai + 3]) > tolerance;
      if (differs) { diffPixels += 1; cell.diff += 1; }
    }
  }
  const total = width * height;
  const diffRatio = total === 0 ? 1 : diffPixels / total;
  const hotspots = [];
  for (let gy = 0; gy < GRID_SIZE; gy += 1) {
    for (let gx = 0; gx < GRID_SIZE; gx += 1) {
      const cell = grid[gy * GRID_SIZE + gx];
      if (cell.diff === 0 || cell.total === 0) continue;
      hotspots.push({
        gridX: gx,
        gridY: gy,
        x: Math.floor((gx / GRID_SIZE) * width),
        y: Math.floor((gy / GRID_SIZE) * height),
        width: Math.ceil(width / GRID_SIZE),
        height: Math.ceil(height / GRID_SIZE),
        diffRatio: cell.diff / cell.total
      });
    }
  }
  hotspots.sort((a, b) => b.diffRatio - a.diffRatio);
  return {
    dimensionsMatch,
    width,
    height,
    diffPixels,
    diffRatio,
    similarityScore: Math.round((1 - diffRatio) * 100),
    alphaChannelIntact: !(reference.hasTransparentPixels && !actual.hasTransparentPixels),
    hotspots
  };
}

export function diffPngFiles(referencePath, actualPath, tolerance = 0) {
  return diffImages(decodePng(readFileSync(referencePath)), decodePng(readFileSync(actualPath)), tolerance);
}

function main(argv) {
  const args = argv.filter((a) => a !== "--json");
  const tolFlag = args.indexOf("--tolerance");
  let tolerance = 0;
  if (tolFlag !== -1) { tolerance = Number.parseInt(args[tolFlag + 1], 10) || 0; args.splice(tolFlag, 2); }
  const [reference, actual] = args;
  if (!reference || !actual) {
    process.stderr.write("usage: visual-diff.mjs <reference.png> <actual.png> [--json] [--tolerance N]\n");
    process.exit(2);
  }
  const result = diffPngFiles(reference, actual, tolerance);
  process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
}

// pathToFileURL (not `file://${argv[1]}`): on Windows argv[1] is `C:\...` while
// import.meta.url is `file:///C:/...`, so the string compare never matched and the
// gate silently exited 0 — a passing evidence artifact for an unchecked render.
if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) {
  try {
    main(process.argv.slice(2));
  } catch (error) {
    process.stderr.write(`${error instanceof Error ? error.message : String(error)}\n`);
    process.exit(1);
  }
}
writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 321kUpdated Claude CodeCodexVerifiedInstall
xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.Stars: 197kUpdated Claude CodeCodexVerifiedInstall
shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.Stars: 118kUpdated Claude CodeCodexVerifiedInstall
childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release.Stars: 118kUpdated Claude CodeCodexVerifiedInstall