Skip to content

anbeime/skill / skills/machine-skill/machine-skill

machine

Verified

Turn one line ("a turbofan jet engine", "a mechanical watch", "an LVAD heart pump") into a photoreal, physics based, interactive 3D simulation of that machine in a single HTML file, plus a 20 to 30 second film to post it. Real proportions in metres, real materials (PBR metals, paints, polymers, glass), studio lighting with soft shadows, moving parts driven by a small solver that computes real numbers (thrust, torque, rpm, flow, pressure, efficiency), and modes to explode it, cut it open with clean section caps, x-ray it, slow it down, label it and break it. Use this whenever someone asks to build, simulate, visualise, explain or "show how X works" for any machine, engine, mechanism, device, instrument or piece of hardware, wants an interactive 3D model or a cutaway, or wants a video of a machine for a post, even if they never say "simulation" or "three.js".

FileKindSize
.github/REPO.mdmarkdown617 B
.github/assets/compressor.jpgbinary149.9 KB
.github/assets/hero.webpbinary5.1 MB
.github/assets/refinery-pump.jpgbinary134.7 KB
.github/assets/rocket-engine.jpgbinary91.8 KB
.github/assets/social.jpgbinary79.3 KB
.github/assets/turbofan.jpgbinary112.5 KB
.gitignoreother49 B
CHANGELOG.mdmarkdown614 B
CONTRIBUTING.mdmarkdown1.6 KB
LAUNCH.mdmarkdown3.5 KB
LICENSEother1.1 KB
README.mdmarkdown13.8 KB
SKILL.mdskill md14.2 KB
V2-IDEAS.mdmarkdown3.5 KB
evals/evals.jsonconfig2.5 KB
examples/compressor.htmlother144.8 KB
examples/posters/compressor.jpgbinary149.9 KB
examples/posters/refinery-pump.jpgbinary134.7 KB
examples/posters/rocket-engine.jpgbinary91.8 KB
examples/posters/turbofan.jpgbinary112.5 KB
examples/refinery-pump.htmlother161.6 KB
examples/rocket-engine.htmlother115.2 KB
examples/turbofan.htmlother120.0 KB
film/README.mdmarkdown543 B
film/launch.htmlother16.3 KB
film/reply.htmlother10.6 KB
film/stills/compressor_0.0.jpgbinary210.7 KB
film/stills/refinery-pump_0.0.jpgbinary213.1 KB
film/stills/rocket-engine_1.5.jpgbinary195.4 KB
film/stills/rocket-engine_13.5.jpgbinary268.7 KB
film/stills/rocket-engine_18.6.jpgbinary242.1 KB
film/stills/rocket-engine_23.4.jpgbinary260.7 KB
film/stills/rocket-engine_5.0.jpgbinary238.3 KB
film/stills/rocket-engine_9.8.jpgbinary262.7 KB
film/stills/turbofan_1.5.jpgbinary185.2 KB
film/stills/turbofan_13.5.jpgbinary296.7 KB
film/stills/turbofan_18.6.jpgbinary263.8 KB
film/stills/turbofan_23.4.jpgbinary269.8 KB
film/stills/turbofan_5.0.jpgbinary203.2 KB
film/stills/turbofan_9.8.jpgbinary222.3 KB
kit/lab-kit.jsscript93.9 KB
kit/template.htmlother2.1 KB
package.jsonmanifest493 B
references/solvers.mdmarkdown6.3 KB
scripts/inline.mjsscript1.4 KB
scripts/pinkscan.mjsscript2.0 KB
scripts/record.mjsscript7.2 KB
scripts/shot.mjsscript3.3 KB

scripts/shot.mjs

View on GitHub
#!/usr/bin/env node
// Screenshots for self review (Claude reads every PNG it makes).
//   node scripts/shot.mjs examples/turbofan.html out/review.png [--wait 4] [--js "lab.toggle('cut', true)"] [--then 2] [--w 1920 --h 1080]
//   node scripts/shot.mjs examples/turbofan.html out/film --film 1.5,8,14,20   (film stills at those times)
// Reports page errors, frame time and the part / triangle count.
//   --steps views.json   more views from the same load: [{ "js": "lab.toggle('explode', true)", "wait": 3, "out": "out/ex.png" }]
import { dirname, resolve, relative } from 'node:path'
import { mkdirSync } from 'node:fs'
import { serve } from './lib/serve.mjs'
import { launch } from './lib/browser.mjs'
const a = process.argv.slice(2)
const opt = (k, d) => { const i = a.indexOf(k); return i >= 0 ? a[i + 1] : d }
const pos = a.filter((x, i) => !x.startsWith('--') && !(i > 0 && a[i - 1].startsWith('--')))
const [PAGE, OUT] = pos
const W = Number(opt('--w', 1920)), H = Number(opt('--h', 1080))
const file = resolve(PAGE), root = resolve(opt('--root', dirname(dirname(file))))
const srv = await serve(root)
const film = opt('--film')
const url = `${srv.url}/${relative(root, file)}${film ? '?film=1&shot=' + opt('--shot', 'main') : ''}${opt('--q') ? (film ? '&' : '?') + opt('--q') : ''}`
mkdirSync(dirname(resolve(OUT)), { recursive: true })
const { browser, page } = await launch({ width: W, height: H })
await page.goto(url, { waitUntil: 'load', timeout: 120000 })
if (film) {
  await page.waitForFunction(() => window.__film?.ready && window.__film.loaded(), null, { timeout: 180000 })
  await page.evaluate(() => document.fonts.ready)
  await page.evaluate(() => window.__film.start())
  for (let k = 0; k < 4; k++) await page.evaluate(() => window.__film.step(0))
  for (const t of film.split(',').map(Number)) {
    await page.evaluate((t) => window.__film.seek(t), t)
    await page.screenshot({ path: `${OUT}_${t.toFixed(1)}.jpg`, type: 'jpeg', quality: 90 }); console.log('still', t)
  }
} else {
  await page.waitForFunction(() => window.__lab?.renderer, null, { timeout: 120000 })
  await page.evaluate(() => document.fonts.ready)
  await page.waitForTimeout(Number(opt('--wait', 4.5)) * 1000)
  if (opt('--js')) { await page.evaluate((s) => { const lab = window.__lab; return eval(s) }, opt('--js')); await page.waitForTimeout(Number(opt('--then', 2.5)) * 1000) }
  const info = await page.evaluate(async () => { const lab = window.__lab; const t0 = performance.now(); let n = 0; await new Promise((r) => { const f = () => { n++; if (performance.now() - t0 < 1000) requestAnimationFrame(f); else r() }; requestAnimationFrame(f) }); return { fps: n, parts: lab.partCount(), tris: lab.tris, materials: lab.matCount, calls: lab.renderer.info.render.calls } })
  console.log(JSON.stringify(info))
  await page.screenshot({ path: OUT, timeout: 600000 })
  // --steps file.json: [{ "js": "...", "wait": 3, "out": "out/x.png" }, ...] more views from the same page load
  if (opt('--steps')) {
    const { readFileSync } = await import('node:fs')
    for (const st of JSON.parse(readFileSync(opt('--steps'), 'utf8'))) {
      if (st.js) await page.evaluate((s) => { const lab = window.__lab; return eval(s) }, st.js)
      await page.waitForTimeout((st.wait ?? 3) * 1000)
      await page.screenshot({ path: st.out, timeout: 600000 }); console.log('shot', st.out)
    }
  }
}
await browser.close(); srv.server.close()
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: 196kUpdated 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: 193kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 193kUpdated 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: 193kUpdated Claude CodeCodexVerifiedInstall