BuilderIO/agent-native / .agents/skills/design-editor-repro
design-editor-repro
VerifiedReproduce and verify Design editor issues against the application itself.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 2.2 KB |
| harness-recipes.md | markdown | 1.2 KB |
| harness/dlib.mjs | script | 27.1 KB |
| harness/doctor.mjs | script | 3.1 KB |
| harness/harness-env.mjs | script | 5.1 KB |
| harness/lock.mjs | script | 1.9 KB |
| harness/osmouse-linuxexecutable | script | 1.7 KB |
| harness/osmouse.swift | script | 3.7 KB |
| harness/sheet.mjs | script | 3.1 KB |
| harness/shot.mjs | script | 2.6 KB |
| harness/start-dev.shexecutable | script | 1.6 KB |
| reference/fixing.md | markdown | 947 B |
| reference/input-and-osmouse.md | markdown | 938 B |
| reference/performance.md | markdown | 1.0 KB |
| reference/tests-and-blast-radius.md | markdown | 719 B |
| reference/verification.md | markdown | 578 B |
| scripts/clip.mjs | script | 4.2 KB |
| scripts/copy-design.mjs | script | 7.2 KB |
harness/lock.mjs
View on GitHubimport {
linkSync,
readFileSync,
renameSync,
rmSync,
writeFileSync,
} from "node:fs";
/**
* Machine-wide mutex for the physical cursor (osmouse). Headless Design app
* work never needs this.
*/
function isAlive(pid) {
if (!Number.isInteger(pid) || pid <= 0) return false;
try {
process.kill(pid, 0);
return true;
} catch (err) {
return err.code !== "ESRCH";
}
}
function acquire(path) {
// link() publishes the lock with its PID already written, so no reader ever sees it empty.
const mine = `${path}.${process.pid}`;
writeFileSync(mine, String(process.pid));
try {
linkSync(mine, path);
return true;
} catch (err) {
if (err.code !== "EEXIST") throw err;
} finally {
rmSync(mine, { force: true });
}
let held;
try {
held = readFileSync(path, "utf8");
} catch {
return false;
}
if (isAlive(Number(held))) return false;
// Two waiters can find the same dead holder. Move the file aside atomically,
// and put it back if a new holder's lock was taken instead.
const stale = `${path}.stale.${process.pid}`;
try {
renameSync(path, stale);
} catch {
return false;
}
const moved = readFileSync(stale, "utf8");
if (moved !== held) {
try {
linkSync(stale, path);
} catch {}
rmSync(stale, { force: true });
return false;
}
rmSync(stale, { force: true });
return acquire(path);
}
export async function withLock(name, fn, { timeoutMs = 15 * 60 * 1000 } = {}) {
const path = `/tmp/an-harness-${name}.lock`;
const started = Date.now();
let waited = false;
while (!acquire(path)) {
if (Date.now() - started > timeoutMs)
throw new Error(`lock timeout: ${name}`);
if (!waited) {
console.log(`[lock] waiting for ${name}…`);
waited = true;
}
await new Promise((r) => setTimeout(r, 2000));
}
if (waited) console.log(`[lock] acquired ${name}`);
try {
return await fn();
} finally {
rmSync(path, { force: true });
}
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |