Makkov-design/makkov-harness / skills/media-use
media-use
VerifiedGet or make any media for a HyperFrames video - music, sound effects, images, icons, logos, voiceover, avatar and generated video, transcripts, cutouts, colour grades and looks - with HeyGen or free local tools, and mix placed audio. Also for footage that looks dark, flat or dull, or should be stylized or hidden.
scripts/lib/config-lock.mjs
View on GitHub// The one lock on ~/.hyperframes/config.json, for the CLI, its auto-update step and media-use. The auto-update step
// embeds this function's source, so it must use only its arguments and globals.
export function withFileLock(lockPath, fs, task) {
const token = `${process.pid}-${Date.now()}-${Math.random().toString(36).slice(2)}`;
const started = Date.now();
for (;;) {
let fd;
try {
fd = fs.openSync(lockPath, "wx");
} catch (error) {
if (error.code !== "EEXIST") throw error;
// Never taken over: a lock older than any hold was left by a process that stopped, and a person removes it.
let leftover = false;
try {
leftover = Date.now() - fs.statSync(lockPath).mtimeMs > 5000;
} catch {}
if (leftover || Date.now() - started > 10000)
throw Object.assign(
new Error(
`Settings are locked by another hyperframes process. If none is running, delete ${lockPath}`,
),
{ code: "HF_SETTINGS_LOCKED" },
);
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, 25);
continue;
}
try {
fs.writeSync(fd, token);
} catch (error) {
fs.rmSync(lockPath, { force: true });
throw error;
} finally {
fs.closeSync(fd);
}
break;
}
try {
return task();
} finally {
// No code removes another's lock, so release needs no check (only a person deleting a live one defeats it).
try {
fs.rmSync(lockPath);
} catch {}
}
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| 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: 198k | Updated | Claude CodeCodex | Verified | Install |
| 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: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| 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: 194k | Updated | Claude CodeCodex | Verified | Install |