lookbkdev/lookbk-skills / skills/process-steps-kit
process-steps-kit
VerifiedBuild the "how it works / our process" section of a service or product from one process.json - the schedule page of a signed proposal rather than numbered circles. Three to seven steps, each saying who does it, how long it really takes, what the buyer gives, gets and pays. A programme chart draws every step to scale on one calendar of working weeks, with a lane that adds up the hours the buyer is needed. As you scroll, the project day moves a cursor through the programme and changes the deliverable on a sticky desk. The build checks the arithmetic (no gaps or overlaps unless marked parallel, steps add up to the stated weeks, buyer hours match the rounding rule, payments add up to 100 % or the fixed fee). Self-contained page and paste-in embed, a check at four widths (text size and contrast, chart labels that never collide, bars to scale, reduced motion, no JavaScript) and a frame-by-frame recorder. Use for a "how it works" or "our process" section.
| File | Kind | Size |
|---|---|---|
| NOTICE.md | markdown | 1.4 KB |
| SKILL.md | skill md | 16.4 KB |
| TESTED.json | config | 548 B |
| examples/ashby/process.json | config | 6.1 KB |
| examples/northfold/process.json | config | 5.3 KB |
| kit/process.css | other | 19.0 KB |
| kit/runtime.js | script | 13.0 KB |
| scripts/build.mjs | script | 144 B |
| scripts/check.mjs | script | 144 B |
| scripts/chrome.mjs | script | 3.6 KB |
| scripts/kit/artifacts.mjs | script | 6.7 KB |
| scripts/kit/build.mjs | script | 11.7 KB |
| scripts/kit/cdp.mjs | script | 4.9 KB |
| scripts/kit/check.mjs | script | 16.8 KB |
| scripts/kit/record.mjs | script | 6.2 KB |
| scripts/kit/schema.mjs | script | 19.7 KB |
| scripts/kit/serve.mjs | script | 2.5 KB |
| scripts/record.mjs | script | 146 B |
| scripts/serve.mjs | script | 144 B |
scripts/chrome.mjs
View on GitHub// Headless Chrome helpers for the check and the recorder. Nothing to
// install: it drives the Chrome, Chromium or Edge already on the machine.
import { execFileSync } from 'node:child_process'
import { existsSync, readFileSync, rmSync, writeFileSync } from 'node:fs'
import { homedir } from 'node:os'
import { dirname, join } from 'node:path'
import { pathToFileURL } from 'node:url'
export function findChrome() {
return [
process.env.CHROME_PATH,
'/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
'/Applications/Chromium.app/Contents/MacOS/Chromium',
'/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge',
`${homedir()}/Applications/Google Chrome.app/Contents/MacOS/Google Chrome`,
'/usr/bin/google-chrome',
'/usr/bin/google-chrome-stable',
'/usr/bin/chromium',
'/usr/bin/chromium-browser',
'/usr/bin/microsoft-edge',
'/snap/bin/chromium',
'C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe',
'C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe',
'C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe',
]
.filter(Boolean)
.find((p) => existsSync(p))
}
/** Runs headless Chrome on a URL and returns what it printed. */
export function chrome(bin, url, args) {
return execFileSync(
bin,
[
'--headless=new',
'--disable-gpu',
...(process.getuid?.() === 0 ? ['--no-sandbox'] : []),
'--hide-scrollbars',
'--virtual-time-budget=8000',
...args,
url,
],
{ stdio: ['ignore', 'pipe', 'ignore'], maxBuffer: 64 * 1024 * 1024 },
).toString()
}
/**
* Loads the page in a frame exactly `width` px wide, once per width, and
* runs `fn` in it after its fonts have loaded. Returns fn's result for each
* width (anything JSON can hold), or null where the page didn't finish.
*
* The frame is there because Chrome's window can't be narrower than 500px,
* so a 390px phone can't be measured in the window itself.
*/
export function inFrame(bin, page, widths, fn) {
const dir = dirname(page)
const probe = join(dir, '.lookbook-probe.html')
const frame = join(dir, '.lookbook-frame.html')
const html = readFileSync(page, 'utf8')
const script = `<script>addEventListener('load', () => (document.fonts ? document.fonts.ready : Promise.resolve()).then(() => new Promise((r) => setTimeout(r, 100))).then(() => parent.postMessage({ lookbook: JSON.stringify((${fn.toString()})()) }, '*')))</script>`
writeFileSync(
probe,
html.includes('</body>')
? html.replace('</body>', `${script}</body>`)
: html + script,
)
writeFileSync(
frame,
`<!doctype html><meta charset="utf-8"><body style="margin:0"><script>
addEventListener('message', (e) => {
if (!e.data || typeof e.data.lookbook !== 'string') return
const out = document.createElement('script')
out.type = 'application/json'
out.id = 'lookbook-result'
out.textContent = e.data.lookbook.replace(/</g, '\\\\u003c')
document.body.appendChild(out)
})
const f = document.createElement('iframe')
f.src = '.lookbook-probe.html'
f.style.cssText = 'border:0;display:block;width:' + location.hash.slice(1) + 'px;height:900px'
document.body.appendChild(f)
</script>`,
)
try {
return widths.map((w) => {
const dom = chrome(bin, `${pathToFileURL(frame).href}#${w}`, [
`--window-size=${Math.max(w, 500)},900`,
'--dump-dom',
])
const found =
/<script type="application\/json" id="lookbook-result">([\s\S]*?)<\/script>/.exec(
dom,
)
return found ? JSON.parse(found[1]) : null
})
} finally {
rmSync(probe, { force: true })
rmSync(frame, { force: true })
}
}
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: 196k | 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: 196k | 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: 196k | Updated | Claude CodeCodex | Verified | Install |