Skip to content

sykk/ircx / scripts/run-ircx

run-ircx

Verified

Build, run, and drive ircx. Use when asked to start ircx, run its tests, build it, take a screenshot of its UI, click through the app, or check that a frontend change works in the running client.

FileKindSize
SKILL.mdskill md20.7 KB
driver.mjsscript14.2 KB
quickserver.mjsscript4.5 KB
seed.mjsscript13.0 KB
shift.pyscript2.1 KB
soak.mjsscript10.2 KB
startup.mjsscript11.2 KB
vite.browser.config.mjsscript2.7 KB
window.mjsscript16.9 KB
xsend.cother5.2 KB
"""Vertical offset between two screenshots of the timeline, in pixels.

    python3 shift.py before.png after.png

Takes a band of rows out of the second image and slides it over the first,
scoring by absolute difference. The answer is where the content now at y in the
second image sat in the first, so 0 means nothing moved and the residual says
how well it matched — a residual near zero with a nonzero shift is the pane
having moved rather than redrawn.

`md5sum` answers "did anything change at all" for nothing, and a still pane is
byte-identical. Reach for this only on the pairs that differ.
"""

import array
import subprocess
import sys

# The window window.mjs opens, and the timeline inside it.
WIDTH = 1200
X0, X1, Y0, Y1 = 262, 1060, 80, 700

BAND = 80
"""Rows of the second image to match. Tall enough to hold a message and its
name, so a band of blank pane cannot match anywhere it likes."""

STRIDE = 3
"""Every third pixel across. Text at this size leaves no run of three that is
all background, and the whole-band score settles at the same offset either way."""


def rows(path):
    grey = subprocess.run(
        ["magick", path, "-colorspace", "Gray", "-depth", "8", "gray:-"],
        capture_output=True,
        check=True,
    ).stdout
    pixels = array.array("B", grey)
    return [pixels[y * WIDTH + X0 : y * WIDTH + X1] for y in range(Y0, Y1)]


before, after = rows(sys.argv[1]), rows(sys.argv[2])
band_top = (Y1 - Y0) // 2 - BAND // 2
band = after[band_top : band_top + BAND]

best_score, best_shift = None, None
for shift in range(-300, 301):
    top = band_top + shift
    if top < 0 or top + BAND > len(before):
        continue
    total = sum(
        abs(before[top + i][j] - band[i][j])
        for i in range(BAND)
        for j in range(0, len(band[i]), STRIDE)
    )
    score = total / (BAND * len(band[0]) / STRIDE)
    if best_score is None or score < best_score:
        best_score, best_shift = score, shift

name = lambda path: path.rsplit("/", 1)[-1]
print(f"{name(sys.argv[1])} -> {name(sys.argv[2])}: shift {best_shift:+d}px (residual {best_score:.2f})")
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated Claude CodeCodexVerifiedInstall
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: 198kUpdated Claude CodeCodexVerifiedInstall