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/doctor.mjs
View on GitHub// Checks the harness can do its job: node .agents/skills/design-editor-repro/harness/doctor.mjs
// PASS: go on. WAIT (exit 75): the dev server is still starting or compiling;
// run it again. FAIL (exit 1): report the line and its screenshot, and stop.
import { action, api, newDesign, openEditor } from "./dlib.mjs";
import {
BASE,
CDP_URL,
FUSION,
PROD_BASE,
SHOTS_DIR,
TEST_ACCOUNT,
describeEnv,
} from "./harness-env.mjs";
const results = [];
const check = async (name, fn, { required = true } = {}) => {
console.error(`doctor: ${name}…`);
const started = Date.now();
try {
const detail = await fn();
results.push(
`PASS ${name}${detail ? `: ${detail}` : ""} (${Math.round((Date.now() - started) / 1000)}s)`,
);
return true;
} catch (err) {
const status = err.wait ? "WAIT" : required ? "FAIL" : "WARN";
results.push(`${status} ${name}: ${err.message.split("\n")[0]}`);
return false;
}
};
async function answers(url, timeoutMs, hint = "") {
const deadline = Date.now() + timeoutMs;
let last = "no response";
while (Date.now() < deadline) {
const res = await fetch(url, {
signal: AbortSignal.timeout(5000),
redirect: "manual",
}).catch((e) => e);
if (res instanceof Response && res.status < 500)
return `HTTP ${res.status}`;
last = res instanceof Response ? `HTTP ${res.status}` : res.message;
await new Promise((r) => setTimeout(r, 2000));
}
throw Object.assign(new Error(`${url} not answering (${last})${hint}`), {
wait: FUSION,
});
}
await check(
FUSION ? "branch browser" : "your Chrome on :9222 (physical input only)",
() =>
answers(
`${CDP_URL}/json/version`,
FUSION ? 30000 : 3000,
FUSION ? "" : ". Start Chrome with --remote-debugging-port=9222",
),
{ required: false },
);
const up = await check("dev server", () =>
answers(
`${BASE}/`,
FUSION ? 45000 : 10000,
FUSION
? ""
: ". Start it: .agents/skills/design-editor-repro/harness/start-dev.sh",
),
);
if (up && (await check("local login", async () => (await api()).dispose()))) {
await check("editor opens a design", async () => {
let d;
try {
d = await openEditor(await newDesign("Harness doctor"));
} catch (err) {
throw Object.assign(err, {
wait: err.compiling || err.name === "TimeoutError",
});
}
const shot = `${SHOTS_DIR}/doctor-editor.png`;
await d.page.screenshot({ path: shot });
await d.close();
const ctx = await api();
await action(ctx, "delete-design", { id: d.designId }).catch(() => {});
await ctx.dispose();
return shot;
});
}
await check(
"test account",
async () => {
if (!TEST_ACCOUNT)
throw new Error("DESIGN_TEST_EMAIL / DESIGN_TEST_PASSWORD not set");
await (await api(PROD_BASE, TEST_ACCOUNT)).dispose();
return TEST_ACCOUNT.email;
},
{ required: false },
);
console.log(describeEnv());
console.log(results.join("\n"));
if (results.some((r) => r.startsWith("FAIL"))) process.exit(1);
if (results.some((r) => r.startsWith("WAIT"))) {
console.log(
"Still starting or compiling: run the doctor again. Do not work around it.",
);
process.exit(75);
}
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 |