Diogenesoftoronto/keating / video/keating-surface-tour/.agents/skills/media-use
media-use
FlaggedAgent Media OS, the single skill for every media need in a HyperFrames project. Resolve BGM, SFX, image, icon, brand logo, voice, color grade, or LUT into a frozen local file or paste-ready block + ledger record (one verb, `resolve`); generate via TTS / music / image models when the catalog misses; produce voiceover, transcription, captions, and background removal through one shared audio engine; operate on media (cut / reframe / transform); and reuse assets across projects. Also use for vague feedback that real footage looks dark, flat, boring, should feel retro/camcorder/print/ASCII, needs privacy, or needs a media reveal.
scripts/lib/specs.test.mjs
View on GitHubimport { strict as assert } from "node:assert";
import { test } from "node:test";
import { probeSpecs } from "./specs.mjs";
// Fake os module + exec so the probe is deterministic across CI machines.
const fakeOs = (over = {}) => ({
platform: () => over.platform ?? "linux",
arch: () => over.arch ?? "x64",
cpus: () => Array.from({ length: over.cores ?? 8 }),
totalmem: () => (over.ramMB ?? 16384) * 1024 * 1024,
});
test("probeSpecs reports structured caps", () => {
const s = probeSpecs({ osMod: fakeOs({ cores: 12, ramMB: 32768 }), exec: () => null });
assert.equal(s.cpuCores, 12);
assert.equal(s.ramMB, 32768);
assert.equal(s.platform, "linux");
assert.equal(s.gpu.present, false);
// probe unavailable (exec returns null) -> availableRamMB falls back to total
assert.equal(s.availableRamMB, 32768);
});
test("availableRamMB is read from /proc/meminfo on Linux", () => {
const exec = (cmd) =>
cmd.includes("meminfo") ? "MemTotal: 33554432 kB\nMemAvailable: 8388608 kB\n" : null;
const s = probeSpecs({ osMod: fakeOs({ platform: "linux", ramMB: 32768 }), exec });
assert.equal(s.availableRamMB, 8192, "8388608 kB -> 8192 MB");
});
test("availableRamMB is summed from reclaimable vm_stat pages on macOS", () => {
const vmStat =
"Mach Virtual Memory Statistics: (page size of 16384 bytes)\n" +
"Pages free: 100000.\n" +
"Pages inactive: 200000.\n" +
"Pages speculative: 50000.\n" +
"Pages purgeable: 10000.\n";
const exec = (cmd) => (cmd.includes("vm_stat") ? vmStat : null);
const s = probeSpecs({
osMod: fakeOs({ platform: "darwin", arch: "arm64", ramMB: 24576 }),
exec,
});
// (100000+200000+50000+10000) pages * 16384 B / 1MiB = 5625 MB
assert.equal(s.availableRamMB, 5625);
});
test("Apple Silicon is detected as a unified-memory GPU", () => {
const s = probeSpecs({
osMod: fakeOs({ platform: "darwin", arch: "arm64", ramMB: 24576 }),
exec: () => null,
});
assert.equal(s.appleSilicon, true);
assert.equal(s.gpu.present, true);
assert.equal(s.gpu.kind, "apple");
// unified memory: VRAM tracks system RAM
assert.equal(s.gpu.vramMB, 24576);
});
test("NVIDIA GPU is detected via nvidia-smi VRAM query", () => {
const exec = (cmd) => (cmd.includes("nvidia-smi") ? "24564" : null);
const s = probeSpecs({ osMod: fakeOs({ platform: "linux" }), exec });
assert.equal(s.gpu.present, true);
assert.equal(s.gpu.kind, "nvidia");
assert.equal(s.gpu.vramMB, 24564);
});
test("no GPU when nvidia-smi is absent / fails", () => {
const s = probeSpecs({
osMod: fakeOs({ platform: "linux" }),
exec: () => {
throw new Error("command not found");
},
});
assert.equal(s.gpu.present, false);
assert.equal(s.gpu.vramMB, 0);
});
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |