gooseworks-ai/goose-skills / skills/video/create-apple-notes-mockup
create-apple-notes-mockup
VerifiedRender pixel-accurate Apple Notes (iPhone, light mode) screenshot mockups from a JSON note spec. Outputs HTML + PNG at the iPhone 16/15 Pro native 1180×2556. Supports paragraphs, images, checklists, dividers, autocorrect underline, smart quotes, and an optional iOS keyboard chrome overlay used by the parent video-ad molecule.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 10.0 KB |
| examples/frame-1-title-only.json | config | 457 B |
| examples/long.json | config | 867 B |
| examples/mid.json | config | 649 B |
| examples/short.json | config | 458 B |
| examples/with-checklist.json | config | 889 B |
| examples/with-image.json | config | 581 B |
| generate.js | script | 7.8 KB |
| package.json | manifest | 376 B |
| render.jsexecutable | script | 3.8 KB |
| screenshot.js | script | 1.8 KB |
| skill.meta.json | config | 140 B |
| templates/icons.js | script | 6.4 KB |
| templates/note.css | other | 8.4 KB |
| tests/expected-output.md | markdown | 1.2 KB |
| tests/human-test.md | markdown | 848 B |
| tests/run-all.shexecutable | script | 393 B |
| tests/sample-input.md | markdown | 1.1 KB |
| tests/smoke-test.md | markdown | 474 B |
screenshot.js
View on GitHub// screenshot.js — render a standalone HTML file to PNG via Playwright.
//
// Usage: const { screenshotHtml } = require('./screenshot.js');
// await screenshotHtml({ html, outPath, htmlBasePath, viewport, dpr });
//
// `htmlBasePath` is the file path the HTML should be considered to live at,
// used to resolve relative URLs (images) in the page. If omitted, the HTML is
// loaded via setContent and relative URLs will fail.
const fs = require('fs');
const os = require('os');
const path = require('path');
const { chromium } = require('playwright');
async function screenshotHtml({ html, outPath, htmlBasePath, viewport = { width: 1180, height: 2556 }, dpr = 2 }) {
const browser = await chromium.launch();
const ctx = await browser.newContext({
viewport,
deviceScaleFactor: dpr,
});
const page = await ctx.newPage();
let cleanupTmp = null;
if (htmlBasePath) {
// Write HTML to disk so the browser resolves relative URLs against it.
fs.mkdirSync(path.dirname(htmlBasePath), { recursive: true });
fs.writeFileSync(htmlBasePath, html);
await page.goto('file://' + htmlBasePath, { waitUntil: 'networkidle' });
} else {
// Fall back to setContent (relative URLs in HTML will fail).
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'apple-notes-'));
const tmpHtml = path.join(tmpDir, 'index.html');
fs.writeFileSync(tmpHtml, html);
cleanupTmp = tmpDir;
await page.goto('file://' + tmpHtml, { waitUntil: 'networkidle' });
}
await page.waitForTimeout(300);
fs.mkdirSync(path.dirname(outPath), { recursive: true });
await page.screenshot({ path: outPath, fullPage: false });
await browser.close();
if (cleanupTmp) {
try { fs.rmSync(cleanupTmp, { recursive: true, force: true }); } catch {}
}
}
module.exports = { screenshotHtml };
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |