lennoxsaint/Threadify-workflows / plugins/claude/skills/threadify-director-mode
threadify-director-mode
VerifiedStop editing. Start directing. Turn one raw talking-head video into a finished post in four levels - Speed (cut dead air and retakes), Altitude (move the strongest proof line to second 1), Depth (an outside judge scores the first 3 seconds, the agent fixes the top fault) and Range (sound effects, word-highlight captions and a title card) - with a one-line scoreboard after each, then Threadify writes the post in your voice and schedules it with the video only after one exact yes. Free and local; your original file is never touched. Use when someone has a raw clip, wants it edited for them, says "director mode", or asks to turn a talking-head take into a post.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 15.5 KB |
| references/generation-models.json | config | 751 B |
| references/post.md | markdown | 3.6 KB |
| references/threadify-001.md | markdown | 3.7 KB |
| references/workflow-manifest.json | config | 5.8 KB |
| references/workflow-readme.md | markdown | 1.9 KB |
| scripts/casing-guard.mjs | script | 7.1 KB |
| scripts/director-mode.mjs | script | 47.0 KB |
| scripts/director-net.mjs | script | 3.0 KB |
scripts/director-net.mjs
View on GitHub// Network reads for Director Mode, kept apart from director-mode.mjs, which
// runs ffmpeg and whisper-cli. One rule for every bundled script: a file that
// talks to the network never starts processes, and the reverse.
//
// Openverse needs no key; the anonymous limit is 20 calls a minute and 200 a
// day, so calls are spaced and counted in <homeDir>/openverse/rate.json.
import fs from 'node:fs';
import path from 'node:path';
import { Readable } from 'node:stream';
import { pipeline } from 'node:stream/promises';
export const OPENVERSE = 'https://api.openverse.org/v1/audio/';
export const MODEL_URL = 'https://huggingface.co/ggerganov/whisper.cpp/resolve/main/';
export const DEFAULT_MODEL = 'ggml-base.en.bin';
const USER_AGENT = 'threadify-director-mode/1.0';
function rateState(homeDir) {
const file = path.join(homeDir, 'openverse', 'rate.json');
let calls = [];
try { calls = JSON.parse(fs.readFileSync(file, 'utf8')); } catch { /* first call */ }
return { file, calls: calls.filter((t) => Date.now() - t < 86_400_000) };
}
async function openverseGet(homeDir, url) {
const state = rateState(homeDir);
if (state.calls.length >= 190) throw new Error('Openverse daily budget reached (200/day anonymous); use cached sounds or try tomorrow');
const wait = 3200 - (Date.now() - (state.calls[state.calls.length - 1] ?? 0));
if (wait > 0) await new Promise((r) => setTimeout(r, wait));
state.calls.push(Date.now());
fs.mkdirSync(path.dirname(state.file), { recursive: true });
fs.writeFileSync(state.file, JSON.stringify(state.calls));
const res = await fetch(url, { headers: { 'User-Agent': USER_AGENT } });
if (!res.ok) throw new Error(`Openverse ${res.status} for ${url}`);
return res;
}
/** One Openverse API call, parsed as JSON. */
export async function openverseJson(homeDir, url) {
return (await openverseGet(homeDir, url)).json();
}
/** Save an Openverse audio file to `file` (the caller converts it). */
export async function openverseDownload(homeDir, url, file) {
const res = await openverseGet(homeDir, url);
fs.mkdirSync(path.dirname(file), { recursive: true });
fs.writeFileSync(file, Buffer.from(await res.arrayBuffer()));
return file;
}
/** Download a whisper.cpp speech model into <homeDir>/models (about 148 MB for the default). */
export async function downloadModel(homeDir, name = DEFAULT_MODEL) {
if (!/^ggml-[\w.-]+\.bin$/.test(name)) throw new Error(`bad model name ${name} (expected ggml-<name>.bin)`);
const target = path.join(homeDir, 'models', name);
if (fs.existsSync(target)) return { model: target, downloaded: false };
fs.mkdirSync(path.dirname(target), { recursive: true });
const res = await fetch(`${MODEL_URL}${name}`, { redirect: 'follow', headers: { 'User-Agent': USER_AGENT } });
if (!res.ok || !res.body) throw new Error(`model download failed: HTTP ${res.status} for ${name}`);
const partial = `${target}.part`;
await pipeline(Readable.fromWeb(res.body), fs.createWriteStream(partial));
fs.renameSync(partial, target);
return { model: target, downloaded: true, bytes: fs.statSync(target).size };
}
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: 468k | 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: 321k | 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: 321k | 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: 321k | Updated | Claude CodeCodex | Verified | Install |