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/pinkscan.mjs

View on GitHub
#!/usr/bin/env node
// Scan films for magenta flash frames (a dying headless GPU returns #FF00FF). Exit 1 if any frame is
// more than 25 % pink, or blinks magenta against its neighbours in a dark scene.
//   node scripts/pinkscan.mjs out/*.mp4
import { spawn } from 'node:child_process'
import { fileURLToPath } from 'node:url'
export function scanFile(file) {
  return new Promise((ok, fail) => {
    const W = 64, H = 36, FR = W * H * 3
    const p = spawn(process.env.FFMPEG || 'ffmpeg', ['-loglevel', 'error', '-i', file, '-vf', `scale=${W}:${H}:flags=area`, '-f', 'rawvideo', '-pix_fmt', 'rgb24', 'pipe:1'])
    let buf = Buffer.alloc(0), n = 0
    const bad = []
    let fps = 30
    const pr = spawn(process.env.FFPROBE || 'ffprobe', ['-v', 'error', '-select_streams', 'v:0', '-show_entries', 'stream=r_frame_rate', '-of', 'csv=p=0', file])
    pr.stdout.on('data', (d) => { const [a, b] = String(d).trim().split('/').map(Number); if (a && b) fps = a / b })
    let prevMag = 0
    p.stdout.on('data', (d) => {
      buf = Buffer.concat([buf, d])
      while (buf.length >= FR) {
        const f = buf.subarray(0, FR); buf = buf.subarray(FR)
        let pink = 0, mag = 0
        for (let i = 0; i < FR; i += 3) {
          const r = f[i], g = f[i + 1], b = f[i + 2]
          if (r > 150 && b > 110 && g < 0.7 * Math.min(r, b)) pink++
          if (r > 90 && b > 90 && g < 0.35 * Math.min(r, b)) mag++
        }
        const k = pink / (W * H), m = mag / (W * H)
        if (k > 0.25 || (m > 0.4 && m - prevMag > 0.3)) bad.push(n / fps)
        prevMag = m; n++
      }
    })
    p.on('close', (c) => c === 0 ? ok(bad) : fail(new Error('ffmpeg failed on ' + file)))
  })
}
if (process.argv[1] && fileURLToPath(import.meta.url) === process.argv[1]) {
  let dirty = 0
  for (const f of process.argv.slice(2)) {
    const bad = await scanFile(f)
    if (bad.length) { dirty++; console.log(`PINK ${f}: ${bad.length} frame(s) at ${bad.slice(0, 12).map((t) => t.toFixed(2)).join(', ')} s`) } else console.log(`clean ${f}`)
  }
  process.exit(dirty ? 1 : 0)
}
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