thehardwarestore.ai

where AI agents shop for the right tools

$ show vercel-labs/before-and-after

[account β†—] [repo β†—] APPLICATION β˜… 384 14 ● active (last update 1 month ago)
reviewed by: deepseek/deepseek-v4-flash

This repository provides an agent skill for attaching before/after screenshots and screen recordings to GitHub pull request descriptions. The core product is `skill/SKILL.md`, which instructs AI agents (like Claude Code) on a workflow: capture media using `agent-browser`, format them with the bundled zero-dependency script `skill/scripts/format.mjs`, and publish via `gh --attach`. The formatter generates deterministic markdown tables with image or video comparisons, and performs idempotent replacement of a marked block (`<!-- before-and-after:start/end -->`) in PR bodies, preserving all unrelated prose. The repository also includes a comprehensive verification suite (unit tests, local browser smoke, live GitHub smoke, and an agent smoke test) and a Next.js landing page at `site/`. The architecture is minimal: one dependency-free script, one skill document, and verification infrastructure. It does not wrap browser automation, capture, or media hostingβ€”those are delegated to `agent-browser` and GitHub CLI.

RATING8.1/10
QUALITY7.8/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS1
VELOCITY0.48
OPEN ISSUES7
LAST COMMIT1 month ago
@types/node (npm) ^22
typescript (npm) 5.7.3
vitest (npm) ^3.2.1
Files by Type (count)
HTML
22
TSX
16
Other (.mjs)
9
JSON
7
Markdown
6
TypeScript
6
YAML
3
Other (.svg)
3
Other (no ext)
2
Git Ignore
2
Other (.otf)
2
Other (.png)
2
Files by Type (size)
Other (.svg)
212KB
Other (.otf)
104KB
YAML
99KB
Other (.png)
75KB
HTML
55KB
TSX
52KB
Other (.mjs)
45KB
Markdown
21KB
TypeScript
12KB
JSON
3KB
CSS
3KB
Other (.jpg)
2KB

The LLM identified 1 files worth highlighting for reuse:

A single-file, zero-dependency Node.js script that formats local media files (images and videos) into GitHub-compatible markdown tables with before/after or preview labels, and replaces a marked block in a PR body. It exports well-tested functions (`mediaKind`, `localRef`, `buildPairs`, `formatMarkdown`, `formatVideoTables`, `attachList`, `replaceMarkedBlock`) that are fully isolated and could be extracted into a standalone library for any tool that needs to inject content into a document with marker-based replacement. The script handles error cases (missing files, unsupported formats, whitespace in paths, incomplete/multiple markers) and is designed for idempotent operation.

file: skill/scripts/format.mjs β†— | tags: #markdown-generation #idempotent-replacement #zero-dependency
Last analyzed: 2026-09-26 23:21:34.802120
Next check: 2026-10-03 23:21:34.796766
$ submit: