Skip to content

lookbkdev/lookbk-skills / skills/shop-collection-kit

shop-collection-kit

Verified

Build a small brand's collection or category page from one page.json - a collection header with the brand's point of view, a sticky filter bar whose chips re-lay the grid with a FLIP glide (no jump), numbered product plates that turn over on hover, focus or tap to show the reverse of the piece (the raw foot and maker's stamp, the hallmark inside a band), swatches that change the photograph, honest prices with their currency and one plain stock line (low, back soon with a date, sold out with Notify me), an editorial band in the grid, a quick-view sheet with options, sizes and per-option stock, and an Add to bag that turns into a bag slip. Phone layout with a 2-up grid, a sticky chip bar, a filter sheet and bottom sheets. Includes a three.js still-life renderer that makes true-scale product photographs (ceramics, jewellery) from the same config when the shop has no photos yet, a check at four widths and a frame-by-frame recorder. Use for independent shops: ceramics, jewellery, homewares, small-batch goods.

FileKindSize
NOTICE.mdmarkdown2.1 KB
SKILL.mdskill md17.8 KB
TESTED.jsonconfig524 B
examples/sorne/page.jsonconfig17.4 KB
examples/sorne/photos/band-gold-turn.webpbinary13.9 KB
examples/sorne/photos/band-gold.webpbinary15.0 KB
examples/sorne/photos/band-silver-turn.webpbinary12.4 KB
examples/sorne/photos/band-silver.webpbinary13.5 KB
examples/sorne/photos/disc-pendant-gold-turn.webpbinary19.7 KB
examples/sorne/photos/disc-pendant-gold.webpbinary16.5 KB
examples/sorne/photos/ed-375.webpbinary33.6 KB
examples/sorne/photos/moonstone-gold-turn.webpbinary14.1 KB
examples/sorne/photos/moonstone-gold.webpbinary15.7 KB
examples/sorne/photos/onyx-silver-turn.webpbinary13.8 KB
examples/sorne/photos/onyx-silver.webpbinary14.7 KB
examples/sorne/photos/pearl-studs-gold-turn.webpbinary9.9 KB
examples/sorne/photos/pearl-studs-gold.webpbinary10.2 KB
examples/sorne/photos/scale.jsonconfig1.7 KB
examples/sorne/photos/small-hoops-gold-turn.webpbinary18.2 KB
examples/sorne/photos/small-hoops-gold.webpbinary18.2 KB
examples/sorne/photos/small-hoops-silver-turn.webpbinary15.7 KB
examples/sorne/photos/small-hoops-silver.webpbinary16.0 KB
examples/sorne/photos/stack-gold-turn.webpbinary17.8 KB
examples/sorne/photos/stack-gold.webpbinary26.5 KB
examples/sorne/photos/wide-hoops-gold-turn.webpbinary30.3 KB
examples/sorne/photos/wide-hoops-gold.webpbinary30.4 KB
examples/wrenfold/page.jsonconfig9.4 KB
examples/wrenfold/photos/breakfast-bowl-celadon-turn.webpbinary14.8 KB
examples/wrenfold/photos/breakfast-bowl-celadon.webpbinary11.1 KB
examples/wrenfold/photos/breakfast-bowl-iron-turn.webpbinary15.7 KB
examples/wrenfold/photos/breakfast-bowl-iron.webpbinary12.8 KB
examples/wrenfold/photos/breakfast-bowl-oat-turn.webpbinary16.2 KB
examples/wrenfold/photos/breakfast-bowl-oat.webpbinary14.1 KB
examples/wrenfold/photos/bud-vase-ash-turn.webpbinary13.3 KB
examples/wrenfold/photos/bud-vase-ash.webpbinary11.2 KB
examples/wrenfold/photos/bud-vase-celadon-turn.webpbinary14.2 KB
examples/wrenfold/photos/bud-vase-celadon.webpbinary13.0 KB
examples/wrenfold/photos/carafe-oat-turn.webpbinary18.5 KB
examples/wrenfold/photos/carafe-oat.webpbinary16.1 KB
examples/wrenfold/photos/ed-kiln.webpbinary31.5 KB
examples/wrenfold/photos/pasta-plate-iron-turn.webpbinary27.5 KB
examples/wrenfold/photos/pasta-plate-iron.webpbinary20.7 KB
examples/wrenfold/photos/pasta-plate-oat-turn.webpbinary27.8 KB
examples/wrenfold/photos/pasta-plate-oat.webpbinary21.6 KB
examples/wrenfold/photos/scale.jsonconfig2.2 KB
examples/wrenfold/photos/serving-bowl-iron-turn.webpbinary23.6 KB
examples/wrenfold/photos/serving-bowl-iron.webpbinary17.4 KB
examples/wrenfold/photos/side-plate-chalk-turn.webpbinary16.9 KB
examples/wrenfold/photos/side-plate-chalk.webpbinary12.1 KB
examples/wrenfold/photos/tea-bowl-ash-turn.webpbinary10.7 KB
examples/wrenfold/photos/tea-bowl-ash.webpbinary9.7 KB
examples/wrenfold/photos/tea-bowl-celadon-turn.webpbinary10.1 KB
examples/wrenfold/photos/tea-bowl-celadon.webpbinary9.0 KB
examples/wrenfold/photos/tumblers-mixed-turn.webpbinary15.2 KB
examples/wrenfold/photos/tumblers-mixed.webpbinary13.5 KB
scripts/build.mjsscript147 B
scripts/check.mjsscript147 B
scripts/chrome.mjsscript3.6 KB
scripts/kit/build.mjsscript30.1 KB
scripts/kit/cdp.mjsscript4.9 KB
scripts/kit/check.mjsscript25.0 KB
scripts/kit/record.mjsscript6.0 KB
scripts/kit/runtime.jsscript20.9 KB
scripts/kit/serve.mjsscript2.5 KB
scripts/kit/style.cssother21.9 KB
scripts/record.mjsscript149 B
scripts/serve.mjsscript147 B
scripts/stills.mjsscript215 B
scripts/stills/objects.jsscript28.9 KB
scripts/stills/render.mjsscript8.0 KB
scripts/stills/shapes.jsscript30.9 KB
scripts/stills/studio.htmlother480 B
scripts/stills/studio.jsscript38.2 KB

scripts/chrome.mjs

View on GitHub
// Headless Chrome helpers for check.mjs and screenshot.mjs. 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 })
  }
}
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: 198kUpdated Claude CodeCodexVerifiedInstall
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: 196kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 196kUpdated Claude CodeCodexVerifiedInstall
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: 196kUpdated Claude CodeCodexVerifiedInstall