Skills and code: the machinery
The plan says what we do; this page shows how. Each skill is a folder of instructions (SKILL.md), references and scripts; the scripts are plain Node programs with no dependencies that check, build and record. 297 files from the repository are published here, each as its own page, shown as it is.
- The spine:
video-script-productiontakes facts to a finished script by stages S0 to S11;scripts/check.jsruns every gate and says what to do next. - The rules are code:
scripts/lint.jsreadsscripts/rules.json; a damage test (scripts/selftest.js) breaks each property on purpose and checks the matching rule fires. - What is excluded: research files, data, anything over 400 KB, and any file with a key-like string. The list is at the bottom.
1. The plan, stage by stage, and the files that do it
| Stage | What happens | Files and skills |
|---|---|---|
| S0 | Set up Create the script folder and its files; the gate runner reads which stage the files show. | scripts/scaffold.js, scripts/check.js, references/runbook.md |
| S1, S1b | Rival-video brief and harvest of what already exists Search results, rival videos, articles and filings become saved sources. | references/s1-rival-brief.md, references/research-protocol.md, scripts/fetch-articles.mjs, google-ai-mode |
| S2 | Teardown of winners What winning videos do, with quotes. | winning-video-teardown, references/s2-teardown.md |
| S3 | Fact base and ledger Every figure checked in a second source and given a status; the ledger check refuses a spoken figure that is not in it. | scripts/ledger-check.js, references/research-protocol.md |
| S4 | Thesis and packaging The question, the promise, the title tension, the opening. | references/opening-protocol.md, references/quality-bar.md |
| S5 | Chain and texture plan The declared structure: loops, people, pulls, figures, beats. | references/chain-schema.md, references/beat-contract.md, references/texture.md, references/implicit-pull.md |
| S6, S7 | Draft the voice-over, then two passes The voice, the lessons, the load budget. | references/voice.md, references/principles.md, references/stakes-and-load.md |
| S8 | The gate loop Lint (70 rules), damage test, ledger, timecodes, the bar numbers. | scripts/check.js, scripts/lint.js, scripts/rules.json, scripts/voice-patterns.json, scripts/selftest.js, scripts/retime.js, references/lint-fixes.md |
| S9 | Read-aloud pass A person reads it aloud against a checklist. | references/read-aloud-checklist.md |
| S10 | Reader pass Blind readers (only when the user asks for subagents). | references/reader-prompts.md, scripts/extract-vo.js, script-cohort-analysis |
| S11 | Hand-off and close Manual gates, what is unproven, the research log, the learnings. | references/handoff-template.md, scripts/session-log.js, references/learnings.md, references/tools.md, references/history.md |
| After | Hinglish version Translate paragraph by paragraph; lint and damage test run with the Hinglish overlay; parity with the English. | references/hinglish-adaptation.md, scripts/lang-hi.json, scripts/hinglish-parity.js |
| After | Voice Prompts, recording with a lead-in, transcription, alignment, trim; the quota fallback through AI Studio. | scripts/tts-gemini.js, scripts/tts-gemini-record.js, scripts/tts-trim-lead-in.js, groq-transcribe, script-audio-align |
| After | Video Beat sheets, scenes, sound, stitching; Haiku sub-agents for the long mechanical stages. | video-visual-production, video-beats-orchestrate, video-beat-prepare, video-beat-storyboard, video-beat-build, video-beat-review |
| Record | This site The docs are built and deployed from the repository. | deploy-docs, scripts/build-source.js, scripts/deploy-docs.js |
2. Skills
A skill is a folder under .claude/skills/. Open one to see its instructions, its references (the rules and the reasons) and its scripts (the tools).
Writing the script
video-script-production (48 files: 26 references, 19 scripts)
SKILL.md Take a topic (or a research brief, a verified fact base and a winners teardown) to a finished YouTube explainer script at the Moser Baer v6 bar - title/thumbnail promise, core driving loop, beat-by-beat voice-over, fact ledger - and prove it with a one-command gate runner.
References
beat-contract.mdThe beat contract: A script is a chain of beats, each 60 to 100 seconds, each doing four things in order.chain-schema.mdScript file and chain sidecar: formats the linter reads: Two files per script version, side by side:handoff-template.mdThe hand-off message (Step S11): The final message is the user's one view of the work.hinglish-adaptation.mdTurning a finished English script into Hinglish (and the TTS prompts): Written 2026-10-25 from two rounds on Moser Baer: the v6 Hinglish (a…history.mdHow we got to v6: the build history: Reconstructed from the session transcript (a528adfb-...jsonl, the user's messages and my reports), the git log…implicit-pull.mdImplicit pull: keeping a viewer waiting between the questions: Added after the Moser Baer v4 review: "the open loop that keeps the viewer watching…launch-prompt.mdThe launch prompt: A prompt that makes a fresh Claude session (including a small model such as Haiku) run the whole pipeline for one topic,…learnings.mdLearnings log (script production): Read this before every script. Add new points after every script: one or two sentences each, with the project and…lesson-protocol.mdHow a review comment becomes a lesson (the protocol that produced A to M): Every rule in this pipeline began as one of the user's remarks on a draft.lint-fixes.mdLint fixes: what each rule is telling you and the fix that worked: For Step S8. check.js (or lint.js) names the rule and the quote or stretch.opening-protocol.mdOpening protocol: the core driving loop and the first 60 seconds: The hook has one job: make the viewer need the answer to one question, prove they…principles.mdPrinciples: why the rules exist, and how much to trust each: Every rule in scripts/rules.json traces to one of four lessons (A to D) from the Moser…quality-bar.mdThe v6 bar: what "finished" means: Moser Baer v6 is the script the user approved ("i like v6").read-aloud-checklist.mdThe read-aloud checklist (Step S9): The linter checks that the declared structure is in the text. It cannot hear the script.reader-prompts.mdReader prompts (Step S10): Blind readers are the check on what the linter cannot see: whether a care line lands, whether a BUT really reverses an…research-log-round7.mdResearch log: review round 7 (the Hinglish v6 notes, 2026-10-25): Generated by scripts/session-log.js --since 2026-10-25T05:00:00Z from the session…research-log.mdResearch log: what was searched and fetched, by phase, and what each piece was for: This is the record of the web research behind Moser Baer v4, v5…research-protocol.mdResearch protocol: building the fact base (Step S3): This is how the Moser Baer facts were gathered and verified, as a procedure.review-round-7.mdReview round 7: the Hinglish v6 annotations, and how they became lessons K, L and M: This is the record of how thirty-five line-level notes on one…runbook.mdRunbook: from a topic to a script at the v6 bar: This is the procedure that produced Moser Baer v6, written so that it can be run again on another…s1-rival-brief.mdS1: the rival-video research brief (from "given X" to a cited brief): Goal. Given only a topic ("the fall of Cafe Coffee Day"), find what YouTube…s2-teardown.mdS2: the teardown of rival videos (what they do, how, and what to avoid): Goal.stakes-and-load.mdStakes and load: how to use data without losing the viewer: Data is the value of the video. Unanchored data is the cost.texture.mdTexture: personality, rhythm and the human element (Lessons G, H, I): Added 2026-10-25 after the Moser Baer v5 review.tools.mdTools and skills registry: Rule: when you create or change a skill, a script or a template for this pipeline, add or update its row here in the same…voice.mdSpoken voice: taking the machine out of the sentences: Added after the Moser Baer v4 review ("at times it feels full of AI speak: no x, no y, just a…
Scripts and data
calibrate.jsMeasure a folder of winner transcripts with the same ruler the linter uses, so thresholds come from data and not from the author's taste.check.jsThe gate runner: one command that says whether a script version meets the v6 bar and what to do next.compare.jsCompare two linted script versions on the measures that are computed from the spoken text alone, and show how each beat opens.extract-vo.jsPrints the spoken text of a script, for the read-aloud pass and for blind readers.fetch-articles.mjsS1b: save pre-existing articles and documents about the topic as plain text, so the research is in the repo.hinglish-parity.jsParity check between an English script and its Hinglish (or other-language) version.lang-hi.jsonJSON: comparator, human, stake_prev, additive_openers, additive_inline, greeting, pronoun, …ledger-check.jsFact-ledger gate. Every figure the script SAYS must be findable in the fact ledger, and the hand-off sections must exist.lint.jsScript linter and scorer. Enforces lessons A to D (references/principles.md) on a script and its declared chain.package.jsonJSON: typeretime.jsKeeps the time ranges in the beat headings equal to the word counts (cumulative words / wpm).rules.jsonJSON: version, wpm, hook, ladder, load, chain, loops, …scaffold.jsStarts a script, or the next version of one. node scaffold.js --dir <scriptDir> --version v1 --beats 12 [--title "Video title"] a blank script,…selftest.jsDamage test for the linter (same idea as script-cohort-analysis/scripts/perturb.js): take a script that passes, break one property at a time, and…session-log.jsWrites the research record of a Claude Code session as markdown: every web search, every page fetched (and what it was asked), every subagent spawned…tts-gemini-record.jsSends one beat's Gemini TTS prompt to the API and saves the audio as a WAV file.tts-gemini.jsBuilds the per-beat Gemini TTS prompt files from a finished script and a small spec of where the tags go.tts-trim-lead-in.jsCuts the spoken lead-in off a recording, using word times from script-audio-align's alignment.json.voice-patterns.jsonJSON: negation_pivot, run_up, meta, stock_depth, ai_words, intensifiers, extremes, …
Other files
Building the video
video-visual-production (42 files: 5 references, 25 scripts)
SKILL.md Build, rebuild, edit and check a video beat (1080p, 30 fps) for the "Why X died" channel from a finished voice-over, its aligned word times and a hand-written beat sheet. Produces on-screen evidence (captured article passages, licensed photos), data and diagram scenes tied to spoken words, synthesised sound effects, a quiet placeholder bed and a measured mix.
References
edit-guide.mdHandling the user's notes: cheap edits, no rewrites: The rule: a note changes the beat sheet by the smallest possible amount, through edit.js, and…plan-format.mdPlan format: how to storyboard a beat with few words: You do not write the beat sheet.runbook.mdRunbook: make a video beat, step by step: Read this top to bottom once, then follow the steps in order.scene-catalogue.mdScene catalogue: Twelve scene types exist today (render/scenes.js). A scene in the beat sheet looks like this; every field is explained below.troubleshooting.mdTroubleshooting: Find the line you saw; do the fix. Never fix a failure by editing a rule, a threshold or a check script.
Scripts and data
align-beat.jsAlign one beat's voice-over to its script words in one command: Groq Whisper (groq-transcribe) + script-audio-align + conversion.assets.jsV4 Assets: satisfy the asset requests in a beat sheet and write one record per asset.beatsheet-lint.jsV3 Beat-sheet lint: the hard gates (H) and warnings (W) that can be decided from the beat sheet, the word times and the ledger.brief-beat.jsWrite a brief for one aligned beat: what the voice says sentence by sentence with word indexes and times, the graphic note and the plan section for…build-beat.jsBuild (or rebuild) a video beat from its beat sheet. Scenes that did not change come from a cache, so a small edit is cheap.build-many.jsBuild several beats one after another (no agents) and print one verdict line per beat. Unchanged scenes come from the cache.captions.jsV9 Captions (sidecar only): SRT from the aligned script words, 3 to 6 words a cue, breaking at punctuation and pauses.check-video.jsV8 Check: look at the rendered file and the sound stems and report what can be decided by measurement.compose-beat.jsCompile a compact storyboard plan into the full beat sheet and ledger, so the storyboarder writes props, not bookkeeping.contact-sheet.jsMake a labelled grid of PNG frames so a reviewer (Claude or the user) can see the whole beat at a glance.edit.jsCheap, safe edits to a beat sheet. Every change is snapshotted, linted (and undone if it breaks a hard gate) and logged.cdp.jsMinimal Chrome DevTools Protocol client over Node's built-in WebSocket (Node 22+). No dependencies.dsp.jsDependency-free DSP: seeded noise, biquad band-pass, WAV read/write. All sounds are deterministic from their parameters.util.jsShared helpers for the video-visual-production scripts. Node only, no dependencies.mix.jsV7 Mix: voice (upsampled) + synthesised effects + a quiet synthesised bed ducked from the word times + room tone, then two-pass loudnorm to -14 LUFS,…new-beat.jsScaffold a beat sheet for a new beat: one plain typographic scene per sentence, every cue on a real word, ledger stub.package.jsonJSON: typepreview-scene.jsSee one scene as a PNG in about a second, without rendering any video. Use it to check an edit before a rebuild.review.jsWrites REVIEW-<beat>.md beside the beat sheet: one row per scene with its time, what the voice says, what is on screen and which sounds fire, so the…score.jsAmbient score synthesis, deterministic and dependency-free. One beat's score from a small spec: root (MIDI note), chords (arrays of semitone offsets…sfx.jsV7 functional sounds, built in code from the recipes in research/video-production/03-sound.md section 4.smoke-b1.jsSmoke test: build the final video for beat B1 end to end, including the lint damage test.stitch.jsStitch the built beats into one video: transitions between beats, one continuous ambient score, one mix.timeline.jsV5 Timeline: beat sheet + aligned word times -> integer frames at 30 fps, cue times per scene, sound events on frames.words-from-alignment.jsTurn the output of the `script-audio-align` skill into a words file this pipeline reads (beat, i, text, start, end, source, flags).
Other files
contacts.jsSeconds after a cue at which a visual event "lands" (the contact frame). Scenes animate to these constants and the timeline places each sound effect…draw.jsDrawing helpers: theme, fonts, easing, text with layout boxes, icons. Scenes are pure functions of (env, t, props).OFL-Poppins.txtmake-plan-format.jsRegenerates references/plan-format.md from the verified EXAMPLES of the scene files, so the cheat sheet cannot drift from the code.package.jsonJSON: name, version, private, type, description, dependenciesrender.jsV6 Render: draw every frame of a timeline on a canvas and pipe raw RGBA straight into ffmpeg (no frame files).scenes-b0.jsScene types added for beat B0 (the hook): disc, plant, black, workers, person, chips3, dots, loop, pivotno.scenes-data.jsGeneric data and diagram scenes for the middle beats: stat, bars, line, photo2, chips, race, stalls, treadmill, unitgrid, stamps, paths, rungs.scenes-more.jsMore generic scenes for beats B6 to B13: calendar, deadline, layers, objects, cards, queue, stopbtn.scenes.jsScene library. Each scene is a pure function (env, t, props, S): t is seconds since the scene started;selftest-scenes.jsSelf-test for the scene library: draws every example in scenes-data.js at its end state and at mid-build, writes a contact sheet.
video-beats-orchestrate (1 files: 0 references, 0 scripts)
SKILL.md Run the video beat pipeline for several beats in parallel (B2 to B13 of Moser Baer in batches of four). Launches Haiku sub-agents for the long mechanical stages and Sonnet sub-agents for the stages that need judgment, enforces file ownership and the two-builds-at-a-time limit, and integrates the results. Use when the user asks to produce more beats of the video "in parallel" or "in a batch".
video-beat-prepare (1 files: 0 references, 0 scripts)
SKILL.md Stage 1 of the video beat pipeline (mechanical, long-running, run on HAIKU only). For one beat of the Moser Baer video: align the voice-over to the script with Groq Whisper, write the brief, scaffold the beat sheet. Use via the video-beats-orchestrate skill or the video-beat-prepare agent; never on a stronger model.
video-beat-storyboard (1 files: 0 references, 0 scripts)
SKILL.md Stage 2 of the video beat pipeline (run on HAIKU). For one prepared beat of the Moser Baer video, write a compact storyboard plan (one scene per sentence or clause), compile it with compose-beat.js into the beat sheet and ledger, fetch assets, and get the lint to zero hard gates. A fixed recipe with a short reading list; do not explore. Use via the video-beats-orchestrate skill or the video-beat-storyboard agent.
video-beat-build (1 files: 0 references, 0 scripts)
SKILL.md Stage 3 of the video beat pipeline (mechanical, long-running, run on HAIKU only). Build one storyboarded beat into an MP4, run the checks, fix only the mechanical failures with the troubleshooting table, and report. Use via the video-beats-orchestrate skill or the video-beat-build agent.
video-beat-review (1 files: 0 references, 0 scripts)
SKILL.md Stage 4 of the video beat pipeline (run on HAIKU, checklist-driven). Look at a built beat's contact sheet and the review sheet against a fixed checklist, make only the listed cheap fixes with edit.js, rebuild once, and list what needs a person. Use via the video-beats-orchestrate skill or the video-beat-review agent.
Studying the niche, the winners and the competition
ecosystem-rater (6 files: 0 references, 5 scripts)
SKILL.md Ecosystem rater: Each data/<eco>-ecosystem.db is a biased sample: channels found through search, collected to different depths (one ecosystem may have 400 channels from 33 searches, another 1,500 from 130).
Scripts and data
bands.jsonJSON: version, notes, weights, metrics, tier1_countrieslib.mjsShared helpers for the ecosystem rater: args, paths, read-only DB access, age parsing, robust statistics.package.jsonJSON: typeprobe-search.mjsRuns the frozen probe query set for one ecosystem through YouTube search and saves the top results as JSON.rate.mjsDeterministic ecosystem rating from data already in an ecosystem database (plus optional probe-search results).
script-cohort-analysis (21 files: 6 references, 14 scripts)
SKILL.md Blind, pre-registered analysis of a cohort of YouTube transcripts (e.g. 2 best / 2 median / 2 worst from one channel) to test which script rules actually predict performance, which rules failed or could not be measured, and where the analysis is stumped. Produces a per-run rule scorecard with evidence.
References
learnings.mdLearnings log: Read this before every analysis. Add new points after every analysis: one or two sentences each, with the run they came from.packaging-prompt.mdBlind packaging rater instructions: You will see only a list of video titles from one YouTube channel, with labels P1, P2, … You haven't seen the…pair-prompt.mdBlind pairwise script comparison: You will read two transcripts from one YouTube channel, labelled A and B.rater-prompt.mdBlind script rater instructions (rubric v3): You are one of several independent raters scoring one YouTube video transcript.rubric.mdRubric v2: definitions: The scored checks are in the run's checklist.md, which is generated from scripts/checklist.js.topic-prompt.mdBlind topic comparison: You'll see short, neutral topic cards (T1, T2, …). Each card describes only what a video is about.
Scripts and data
analyze.jsPhase 3: unseal the key, test every pre-registered feature against performance, measure reliability, find stumped samples, build the rule scorecard,…check.jsValidate one output file, or every expected output of a run. node check.js --file <runDir>/scores/S1.r1.json | <runDir>/pairs/P01.json |…checklist.jsRubric v3 (2026-10-24; v2 plus H5, H6, C5, K4, K5 and the stakes_load dimension G1-G4, from the Moser Baer script review): every dimension is a set…compare.jsCompare two analyzed runs of the SAME cohort (e.g. different rater models). node compare.js --a <runDirA> --b <runDirB> [--out <file.md>] Samples are…features.jsThe default pre-registered feature set (rubric v3). direction: +1 = higher predicts better performance, -1 = lower predicts better, 0 = exploratory…ledger.jsHypothesis ledger: post-hoc ideas become pre-registered tests on the NEXT cohort.lexicon.jsonJSON: contrast, causal, additive, question_words, second_person, imagine, magnitudelib.jsShared helpers: parsing, seeded RNG, statistics. No dependencies.package.jsonJSON: typeperturb.jsCalibration ("damage test"): damage ONE property of a transcript and check that blind raters move the measures for that property, and leave the…prepare.jsPhase 1: blind the cohort, compute deterministic features, freeze the pre-registration, and write one task file per blind rater.raterFeatures.jsTurn one rater JSON (rubric v3) into numeric features. Shared by analyze.js and perturb.js so calibration and cohort analysis measure exactly the…scorecard.jsRule scorecard: for every rule (dimension, feature, checklist item) answer "did it work as expected, and what is the evidence?" Five independent…topics.jsWave 2: build blind topic cards from the raters' neutral topic_card fields and write the topic-comparison task.
winning-video-teardown (9 files: 3 references, 5 scripts)
SKILL.md Take a set of YouTube videos that performed very well and work out, for each one, what it does well and exactly how it achieves the effect, in both the script (open loops, narrative, psychology, pacing) and the packaging (title and thumbnail promise, information gap, hidden-world and information-asymmetry promises, whether the video earns them).
References
analyst-prompt.mdAnalyst instructions: You are a close reader of YouTube videos. You are given ONE video that performed very well, its transcript, its metadata, and…schema.mdAnalysis JSON schema: Write one JSON object. Every evidence item is {"ts": "mm:ss", "quote": "<verbatim words from the transcript, in the original…taxonomy.mdMechanism taxonomy: Tag a video with a mechanism ONLY when you can quote the moment it happens (timestamp + verbatim words).
Scripts and data
aggregate.jsCounts what the teardowns have in common. Writes aggregate.json and aggregate.md into the run directory. node aggregate.js --run <runDir>package.jsonJSON: typeprepare.jsBuilds the case files for a teardown run: one folder per video with metadata + transcript, the thumbnail downloaded so analysts can look at it, and…report.jsAssembles the per-video teardowns into one readable markdown file (teardowns.md) in the run directory. node report.js --run <runDir>validate.jsValidates one teardown analysis: structure, vocabulary, and above all that every quote is really in the transcript.
within-channel-study (6 files: 0 references, 5 scripts)
SKILL.md Within-channel study: Videos on one channel share the same audience, thumbnail style, authority and baseline. Comparing its best, median and worst videos therefore holds most channel-level causes constant, and what remains to differ is the…
Scripts and data
check-prereqs.jsGate for the within-channel study: (1) catalogue mined, (2) six sampled transcripts present.dossier.jsBuilds the fact-only study dossier for one channel from the DB + the six sampled transcripts.lib.jsShared helpers: arg parsing, DB lookup (read-only), sampler-compatible ranking and folder naming.package.jsonJSON: typeprobe.jsTests title/metadata hypotheses on the WHOLE mined catalogue (up to 300 videos) instead of the six sampled ones.
meme-fetcher (3 files: 0 references, 2 scripts)
SKILL.md Given a situation (for example "people rolling in cash", "founder ignores the warnings"), search for memes and recognisable internet or Indian pop-culture clips that fit it, and add each new one to the meme template library (research/meme-library) with use-when and don't-use-when metadata, skipping any meme already in the library.
Scripts and data
gallery.cjsBuilds research/meme-library/index.html from catalogue.json: a filterable gallery. One self-contained file;library.cjsMeme library helper: search, duplicate check, add (with image download), list, validate. No dependencies. Node 18+ (uses global fetch).
Publishing and housekeeping
deploy-docs (4 files: 0 references, 3 scripts)
SKILL.md Deploy the project's static HTML docs (docs/*.html and docs/assets) to the Cloudflare Pages site ecosystem-docs, uploading nothing else, then verify every page live. Use when the user asks to deploy, publish or update the docs site, or after adding or changing a docs page and the user wants it live.
Scripts and data
build-source.jsBuilds the "skills and code" part of the docs site from the repository itself.deploy-docs.jsDeploys ONLY the static docs site (docs/*.html, docs/source/**/*.html and docs/assets/**) to Cloudflare Pages, then checks every page on the live URL.package.jsonJSON: type
3. Agents
Agent definitions fix the model and the tools for the sub-agents that run the long mechanical stages (Haiku, by the user's choice, to save tokens).
script-rater.mdBlind rater for the script-cohort-analysis skill. Executes exactly one task file (rate a transcript, rate titles, or rank transcripts) and writes…video-beat-build.mdStage 3 of the video beat pipeline (mechanical, Haiku): build one storyboarded beat to MP4, run the checks, fix only mechanical failures, report.video-beat-prepare.mdStage 1 of the video beat pipeline (mechanical, Haiku): align one beat's voice-over with Groq Whisper, write its brief, scaffold its beat sheet.video-beat-review.mdStage 4 of the video beat pipeline (checklist, Haiku): review a built beat's contact sheet and stills, fix cheap defects with edit.js, rebuild,…video-beat-storyboard.mdStage 2 of the video beat pipeline (creative but constrained, Haiku): storyboard one prepared beat into a lint-clean beat sheet, fact ledger and…
4. Global skills the pipeline uses
These live in ~/.claude/skills/, not in the repository, so they are copied here at build time. They transcribe audio, align a script to it, and drive Google AI Mode for research.
groq-transcribe (2 files: 0 references, 1 scripts)
SKILL.md Transcribe an audio file with Groq's hosted Whisper (whisper-large-v3-turbo) and get word-level and segment-level timestamps, for alignment of a script to audio. Use when the user asks for a transcript, word timings, or alignment of audio to text, and does not want to run Whisper locally. Uses the Groq key stored at ~/.claude/secrets/groq-api-key.txt.
Scripts and data
transcribe.mjsGroq Whisper transcription with word and segment timestamps. Node 18+ built-ins only.
script-audio-align (2 files: 0 references, 1 scripts)
SKILL.md Align an authoritative script (gold standard) to a word-timestamped transcript from groq-transcribe, and output a timestamp for every script word, paragraph start and end times, and a list of words the transcript heard that the script does not have. Use when the user wants a script timed against recorded audio, a per-word or per-beat breakdown of a voice-over, or a check of how closely a recording follows its script.
Scripts and data
align.mjsAlign an authoritative script to a word-timestamped transcript (Groq/Whisper JSON). The script is the gold standard: every script word gets a time.
google-ai-mode (1 files: 0 references, 0 scripts)
SKILL.md Use Google AI Mode through Claude in Chrome to get a sourced answer to a question, push follow-ups until the question is answered, and save the full thread as a markdown source file. Use when the user asks to research a topic through Google AI Mode, or to turn an AI Mode conversation into a saved source.
5. Project code
The series and channel study code (discovery, qualification, transcripts, analysis, viewers) that feeds the research stages.
src/ (100 files)
channel-evidence.jschannel-metric-features.jschannel-priority-scoring.jschannel-qualification-store.jschannel-queues-report.jschannel-queues.jsembeddings.jsniche-clustering.jspriority-report-format.jsqualification-retry-policy.jsA malformed batch response should fan out to one-channel retries once.qualification-scope.jsqueue-table-store.jsDedicated, auditable persistence for each of the five channel queues.rating-evidence.jsresearch-schema.jstemporal.jsvocabulary-store.jswithin-channel-performance-report.jswithin-channel-performance-schema.jswithin-channel-performance-store.jswithin-channel-performance.jswithin-channel-queue-evidence.jswithin-channel-statistics.jsanalysis-schema.jschannel-explorer.jschannel-qualification.jsconcept-store.jsdb.jsv2-schema.jsv2-utils.jsgemini.jsllm-client.jsOpenAI-compatible adapter for local Ollama or another compatible endpoint.llm.jsmetadata-utils.jsobservations.jspattern-store.jscli.jscohorts.jsCohort selection and transcript-quality checks for the script study. Two cohorts are drawn from the same ranked pool with the same rule, differing…queries.jsreport.jsscoring.jssignals.jsstore.jstopic-study.jsTopic study: which subjects (companies, brands, people, countries) draw the most views for a series, not which single video wins.app.jsSeries analysis viewer client. Routes: / | /s/:series[?tab=videos|channels&channel=..] | /s/:series/v/:videoIdstyle.cssserver.jsSeries-analysis viewer: browse the videos and channels found for each series, open a video to see its title, thumbnail, description, transcript and…teardown-job.jsGenerates a teardown for one video on demand: makes sure a transcript exists, builds the case folder the winning-video-teardown skill expects, runs a…01-5-enrich.js01-discover.js02-channel-metadata.js03-profile-channels.js04-profile-videos.js05-expand-discovery.js06-backfill-video-signals.js06-import-reference-channels.js07-analyze-corpus.js08-normalize-temporal-data.js09-build-vocabulary.js10-review-vocabulary.js11-build-feature-matrix.js12-embed-video-titles.js13-prioritize-channels.js14-report-channel-priorities.js15-backfill-video-metadata.js16-repair-date-normalization.js17-rate-channel-queues.js18-rating-evidence-audit.js19-snapshot-video-metrics.js20-expand-channel-catalogue.js21-backfill-missing-qualifications.js22-audit-channel-metrics.js23-mine-channel-catalogue.js24-migrate-queue-tables.js25-qualify-channels-with-llm.js26-discovery-v2.js27-discovery-v2-report.js28-discovery-v2-enrich.js29-discovery-v2-score.js30-enrichment-coverage-report.js31-within-channel-performance.js32-within-channel-performance-report.js33-sample-channel-transcripts.jscli.jsUsage: node src/topic-research/cli.js "the fall of moser baer" [--entity="Moser Baer"] [--max=8] [--also="query"] [--refresh] Stages (each cached…export-cohort.jsUsage: node src/topic-research/export-cohort.js <research dir> <out cohort dir> <videoId> [<videoId> ...] Writes one transcript .txt per video in the…export-csv.jsUsage: node src/topic-research/export-csv.js <search.json dir> [--resubscribe] Writes <dir>/all-videos.csv: every video the search saw, with channel…extract.jsreport.jsgoogle-ai-mode.jsPlaceholder for Google Search "AI Mode" as a second source (not wired in yet).youtube.jssynthesize.jsutil.jstranscript-fetch.jstranscript-sampling.jsvideo-explorer.jsvideo-info-fetch.jsvideo-normalization.jsDefensive normalizers for YouTube search results and youtubei.js channel feeds.viewer-database-registry.jsviewer.jsyoutube-channel.jsyoutube.js
scripts/ (1 files)
tests/ (16 files)
channel-evidence.test.jschannel-metric-features.test.jschannel-qualification-store.test.jschannel-queues.test.jsdiscovery-v2.test.jsllm-parse-json.test.jsqualification-retry-policy.test.jsqualification-uses-existing-llm.test.jsqueue-table-store.test.jsrating-evidence.test.jsseries-analysis.test.jstemporal-normalization.test.jstranscript-sampling.test.jsvideo-info-fetch.test.jsvideo-normalization.test.jswithin-channel-performance.test.js
Top-level code (18 files)
compare-qualification-llm.jsconfig-art.jsconfig-cricket.jsconfig-geopolitics.jsconfig-indian-business.jsconfig-old.jsconfig-science.jsconfig.jscricket-config.jsdump-project.jspackage.jsonJSON: name, version, type, scripts, dependencies, devDependenciestest-channel-response.jstest-gemini.jstest-google-ai-mode.jsGoogle AI Mode feasibility test (Playwright, no API). Run: node test-google-ai-mode.js ["custom question"] [--headless] Opens…test-groq.jstest-openrouter.jstest-transcript-fetch.jsTranscript fetch test (no official YouTube API). Run: node test-transcript-fetch.js - Source video is hardcoded: HinExp's most-viewed video in…test-youtube-channel-fetch.mjsYouTube Ecosystem Intelligence — YouTube channel fetch diagnostic Run: node test-youtube-channel-fetch.mjs - Installs its own dependencies into an…
6. Project documents
The instructions to a fresh session and the front-door documents.
catalogue-crawl-investigation-v1.mdYouTube catalogue acquisition notesCLAUDE.mdProject instructions: This repository builds a YouTube production pipeline. Phase 1 is a channel in the Indian business ecosystem with a series "Why…QUEUE-DEFINITIONS.mdFive research queues: The queues answer different questions; a channel may appear in more than one.README-SERIES-ANALYSIS.mdSeries analysis: Takes a series idea (series/<id>.json), finds YouTube videos with the same or adjacent packaging, fetches video and channel…README-WITHIN-CHANNEL-ANALYSIS.mdGeneric Within-Channel Performance Analysis Overlay: This overlay adds the within-channel performance analysis flow to the generic YouTube Ecosystem…README.mdYouTube Ecosystem Intelligence: A configurable research pipeline for discovering YouTube channels, collecting channel/video evidence, profiling…SCIENCE-ECOSYSTEM-RUNBOOK.mdScience YouTube Ecosystem — Setup, Execution Order, Checks, and Debugging: This runbook is written against the supplied ecosystem-generic project…SCRIPT-PIPELINE.mdThe script pipeline: from a topic to a script at the v6 bar: Status (2026-10-25). Built across five rounds of feedback on one video (Moser Baer).
7. How these pages are made
build-source.js(indeploy-docs) reads the repository, writes every page underdocs/source/, adds this page to the navigation, and links file names in the other pages to their source pages.scripts/deploy-docs.jsruns it, checks every link, and publishes only the allowlisted files.- Each file page shows markdown rendered (with the raw text under a toggle) and code as text. The home directory is replaced by
<home>. - 13 skills in the repository, 3 global skills, 297 files in all.
- Excluded on purpose:
research/(the scripts and sources for each video),data/,reports/,transcripts/,seeds/, lock files and.envfiles, skillexamples/(except their README), and files over 400 KB.
Written 2026-11-03 by build-source.js from the files in the repository. If a page and a file disagree, the file is right: rebuild.