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/kit/cdp.mjs

View on GitHub
// Shop Collection Kit (shared Lookbk helper): a small Chrome DevTools Protocol client over
// --remote-debugging-pipe. Nothing to install: it starts the Chrome,
// Chromium or Edge already on the machine (found like chrome.mjs does, or
// CHROME_PATH) and talks to it on file descriptors 3 and 4, which works the
// same on macOS, Windows and Linux.
import { spawn } from 'node:child_process'
import { existsSync, mkdtempSync, rmSync } from 'node:fs'
import { tmpdir } from 'node:os'
import { join } from 'node:path'
import { findChrome } from '../chrome.mjs'

/** chrome.mjs's list, plus per-user installs it doesn't look in. */
export function findBrowser() {
  const found = findChrome()
  if (found) return found
  const local = process.env.LOCALAPPDATA
  const more = [
    local && join(local, 'Google', 'Chrome', 'Application', 'chrome.exe'),
    local && join(local, 'Chromium', 'Application', 'chrome.exe'),
    'C:\\Program Files\\Microsoft\\Edge\\Application\\msedge.exe',
    '/usr/bin/chromium-freeworld',
    '/opt/google/chrome/chrome',
    '/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary',
    '/Applications/Brave Browser.app/Contents/MacOS/Brave Browser',
  ]
  return more.filter(Boolean).find((p) => existsSync(p))
}

/**
 * Starts headless Chrome with a window of `width`×`height` and returns
 * { send(method, params, sessionId), on(event, fn), page(), close() }.
 */
export async function launch({ width, height, bin = findBrowser(), args: extra = [] }) {
  if (!bin) throw new Error('no Chrome, Chromium or Edge found; set CHROME_PATH')
  const profile = mkdtempSync(join(tmpdir(), 'motion-hero-'))
  const args = [
    '--headless=new',
    '--remote-debugging-pipe',
    `--user-data-dir=${profile}`,
    '--no-first-run',
    '--no-default-browser-check',
    '--hide-scrollbars',
    '--mute-audio',
    '--force-color-profile=srgb',
    '--ignore-gpu-blocklist',
    // WebGL on machines without a usable GPU (CI, virtual machines)
    '--enable-unsafe-swiftshader',
    '--disable-background-timer-throttling',
    '--disable-backgrounding-occluded-windows',
    '--disable-renderer-backgrounding',
    '--disable-extensions',
    `--window-size=${width},${height}`,
    ...(process.getuid?.() === 0 ? ['--no-sandbox'] : []),
    ...extra,
    'about:blank',
  ]
  const proc = spawn(bin, args, { stdio: ['ignore', 'ignore', 'pipe', 'pipe', 'pipe'] })
  let log = ''
  proc.stderr.on('data', (d) => (log = (log + d).slice(-4000)))
  const out = proc.stdio[3]
  const inp = proc.stdio[4]
  let id = 0
  const waiting = new Map()
  const listeners = new Map()
  let buf = Buffer.alloc(0)
  let closed = false
  inp.on('data', (chunk) => {
    buf = Buffer.concat([buf, chunk])
    let end
    while ((end = buf.indexOf(0)) !== -1) {
      const msg = JSON.parse(buf.subarray(0, end).toString('utf8'))
      buf = buf.subarray(end + 1)
      if (msg.id && waiting.has(msg.id)) {
        const { ok, no, method } = waiting.get(msg.id)
        waiting.delete(msg.id)
        if (msg.error) no(new Error(`${method}: ${msg.error.message}`))
        else ok(msg.result)
      } else if (msg.method) for (const fn of listeners.get(msg.method) ?? []) fn(msg.params, msg.sessionId)
    }
  })
  const died = new Promise((_, no) =>
    proc.on('exit', (code) => {
      closed = true
      const err = new Error(`Chrome exited (${code}) ${log.split('\n').slice(-3).join(' ')}`)
      for (const w of waiting.values()) w.no(err)
      no(err)
    }),
  )
  died.catch(() => {})
  const send = (method, params = {}, sessionId) =>
    new Promise((ok, no) => {
      if (closed) return no(new Error('Chrome has exited'))
      const msg = { id: ++id, method, params }
      if (sessionId) msg.sessionId = sessionId
      waiting.set(msg.id, { ok, no, method })
      out.write(JSON.stringify(msg) + '\0')
    })
  const on = (event, fn) => listeners.set(event, [...(listeners.get(event) ?? []), fn])
  const once = (event, sessionId, ms = 30000) =>
    new Promise((ok, no) => {
      const t = setTimeout(() => no(new Error(`timed out waiting for ${event}`)), ms)
      on(event, (p, s) => {
        if (!sessionId || s === sessionId) {
          clearTimeout(t)
          ok(p)
        }
      })
    })

  /** A new tab, attached; returns a session-bound send. */
  async function page() {
    const { targetId } = await send('Target.createTarget', { url: 'about:blank' })
    const { sessionId } = await send('Target.attachToTarget', { targetId, flatten: true })
    const s = (method, params) => send(method, params, sessionId)
    return { sessionId, send: s, once: (event, ms) => once(event, sessionId, ms) }
  }

  async function close() {
    if (!closed) {
      await Promise.race([send('Browser.close').catch(() => {}), new Promise((r) => setTimeout(r, 3000))])
      if (!closed) proc.kill()
    }
    await new Promise((r) => setTimeout(r, 200))
    try {
      rmSync(profile, { recursive: true, force: true, maxRetries: 3 })
    } catch {}
  }
  return { send, on, page, close, bin }
}
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