Content Engine
Full-stack AI content studio: compile visual identity once, generate premium content at scale, distribute everywhere.
(WORLD) → COMPILE → GENERATE → POST-PRODUCE → LAYOUT GATE (9:16) → DISTRIBUTE → MEASURE → REFINE
WORLD runs first, and only for a fictional production that has no world yet.
Commands
| Command |
What it does |
/content-engine universe |
Grill an owner from nothing to a documented world (bible, canon, cast, locations, look, sound, formats, asset manifest) that skene can produce; generates nothing (content-engine-universe) |
/content-engine compile |
Raw assets → compiled visual DNA (brand, character, style) |
/content-engine lint |
Health-check compiled knowledge for consistency |
/content-engine generate |
Create content using compiled identity + scene brief |
/content-engine autopilot setup {tool} |
Save browser session for a generation tool |
/content-engine autopilot run |
Batch generation via browser automation |
/content-engine campaign {brief} |
Full pipeline: compile → generate → distribute |
/content-engine loop |
Compound existing skills for distribution |
/content-engine layout-check {video|image|spec} |
9:16 layout gate: python3 scripts/check_vertical_layout.py video final.mp4 --expect-captions --expect-title for a render with captions and a title hook (see Vertical Layout Gate) |
Architecture
Five sub-skills, each handling one layer:
[content-engine-universe] World-Building Pre-Production
↓ grill → bible, canon, species-aware sheets, style lock, asset manifest
[content-engine-dna] Visual DNA Compiler
↓ raw/ → compiled/ (brand DNA, character sheets, style guides)
[content-engine-cinema] Cinematic Generation Layer
↓ compiled identity → tool-specific prompts → generation
[content-engine-autopilot] Browser Orchestration
↓ Playwright drives tools OR API calls → organized output
[content-engine-loop] Content Loop + Distribution
compounds /blog-post + /content-creation + /social-intelligence
Quick Start
1. Compile Brand Identity
Drop reference assets into knowledge/raw/:
- Brand campaign photos →
knowledge/raw/brand-assets/
- Character face references →
knowledge/raw/character-refs/
- Style inspiration (mood boards, reference reels) →
knowledge/raw/style-inspiration/
Then compile:
/content-engine compile
This analyzes all raw assets via Gemini multimodal and produces compiled identity files in knowledge/compiled/ with tool-specific prompt fragments.
2. Generate Content
Write a scene brief or use a campaign plan:
/content-engine generate --brand acme --character luna --scenes 5 --format reels
The engine:
- Reads compiled identity (brand DNA + character sheet + style guide)
- Selects the best tool per the tool priority matrix
- Injects compiled identity into tool-specific prompts
- Generates via API (fal.ai, @google/genai) or browser automation
- Runs post-production (upscale → grade)
- Organizes output with manifest.json tracking
3. Run a Full Campaign
/content-engine campaign "Mediterranean lifestyle, 10 summer scenes, golden hour, reels + carousel"
Orchestrates all four skills end-to-end: compile (if needed) → generate scenes → post-produce → adapt for platforms → distribute.
4. Distribute
/content-engine loop
Compounds existing skills for multi-platform distribution:
/blog-post — Writing + 6 platform adaptations
/content-creation — TTS, Remotion video, media pipeline
/social-intelligence — Distribution + engagement monitoring
/brainrot-for-good — High-retention short-form video
/brand-icons — OG images, social cards
Setup & Prerequisites
Required
# Check prerequisites
echo "=== Required ==="
which ffmpeg && echo "ok ffmpeg" || echo "MISSING: brew install ffmpeg"
echo ""
echo "=== API Keys ==="
[ -n "$GEMINI_API_KEY" ] && echo "ok GEMINI_API_KEY" || echo "MISSING: needed for Gemini analysis + Veo 3.1"
[ -n "$FAL_KEY" ] && echo "ok FAL_KEY" || echo "MISSING: needed for Nano Banana 2, Kling via fal.ai"
echo ""
echo "=== Higgsfield CLI (recommended for agent workflows) ==="
which higgsfield && echo "ok higgsfield $(higgsfield version 2>/dev/null | head -1)" || echo "MISSING: curl -fsSL https://raw.githubusercontent.com/higgsfield-ai/cli/main/install.sh | sh"
echo ""
echo "=== Browser Automation ==="
which agent-browser && echo "ok agent-browser" || echo "MISSING: needed for autopilot mode"
Higgsfield: two integration paths
Higgsfield offers BOTH a CLI and an MCP. Pick based on your runtime:
| Runtime |
Recommended path |
Why |
| Claude Code, Codex, agent-browser, scripts |
higgsfield CLI + the higgsfield-* skills |
Per Higgsfield's own guidance: "If you are using Claude Code or Codex, it's better to use the CLI." Direct programmatic access, scriptable, integrates with the skill bundle. |
| Claude Desktop, web Claude, IDE plugins |
Higgsfield MCP at https://mcp.higgsfield.ai |
One-click connector; UI-native; no CLI install. Can't be scripted. |
CLI path (recommended for content-engine):
# Install
curl -fsSL https://raw.githubusercontent.com/higgsfield-ai/cli/main/install.sh | sh
# Auth (interactive, opens browser)
higgsfield auth login
# Verify
higgsfield account status
# Capabilities exposed via three skill-level wrappers:
# higgsfield-generate — 30+ models (Nano Banana 2, Soul V2, Veo 3.1, Kling 3.0, Seedance 2.0, Flux 2)
# higgsfield-product-photoshoot — Brand-quality product images with mode-specific enhancement
# higgsfield-soul-id — Train Soul Character refs for consistent face/identity
MCP path (for Claude Desktop):
- Open Claude settings → Connectors → Add custom connector
- Name:
Higgsfield
- URL:
https://mcp.higgsfield.ai
- Click Add → Connect → authenticate via Higgsfield account
Both paths use the same Higgsfield credit pool. No API key needed for either; auth is via your Higgsfield account.
Optional (enhance quality)
- Topaz Gigapixel AI — CLI upscaling (falls back to Real-ESRGAN)
- ComfyUI — Local node-based pipelines with LoRA style-locking
- Weavy account — Scene variation with character consistency
- Artlist.io — AI-powered music matching
Tool Session Setup
For browser-automated tools (legacy path; prefer the CLI when available):
/content-engine autopilot setup higgsfield # browser fallback if CLI not available
/content-engine autopilot setup weavy
This launches Chrome, you log in manually, and the session is saved for future automated use.
Knowledge Architecture
Karpathy Compile-Then-Query Pattern
knowledge/
├── raw/ # Immutable source material (never modified by LLM)
│ ├── brand-assets/ # Campaign photos, logos, style guides
│ ├── character-refs/ # Face photos, pose references
│ ├── style-inspiration/# Mood boards, reference reels
│ └── scene-briefs/ # Scene descriptions
├── compiled/ # LLM-compiled identity files (the "wiki")
│ ├── brands/ # Per-brand DNA (.md)
│ ├── characters/ # Per-character sheets (.md)
│ └── styles/ # Compiled style guides (.md)
└── schema.md # Compilation rules + templates
raw/ is source code. compiled/ is executable. The LLM is the compiler.
Every compiled file:
- Traces provenance to raw sources
- Contains tool-specific prompt fragments
- Is human-reviewable Markdown
- Gets actively maintained via lint
Mapping to Existing Patterns
| Content Engine |
Karpathy Wiki |
MemPalace |
Broomva Knowledge Graph |
raw/ |
raw/ |
— |
Layer 2 (raw extracts) |
compiled/ |
wiki/ |
Rooms/Closets |
Layer 3 (entity pages) |
schema.md |
CLAUDE.md |
Wings/Halls |
CLAUDE.md |
| Feedback loop |
Linting pass |
Tunnels |
Layer 4 (synthesis) |
Tool Priority Matrix
| Task |
Best Tool |
Fallback |
Path |
| Cinematic start frame |
Soul Cinema (higgsfield-generate --model soul_v2) |
Nano Banana Pro |
CLI |
| Character consistency |
Nano Banana Pro |
SD + LoRA |
CLI / fal.ai |
| Custom face/identity training |
higgsfield-soul-id (Soul Character training) |
LoRA fine-tuning |
CLI |
| Branded product photoshoot |
higgsfield-product-photoshoot (mode-specific enhancement) |
Nano Banana + manual prompt |
CLI |
| Marketing Studio (avatar + product ad) |
higgsfield-generate --model marketing_studio_video |
Veo 3.1 with prompt engineering |
CLI |
| Multi-angle generation |
Nano Banana 2 |
Weavy |
CLI / fal.ai |
| Scene variation |
Weavy |
Nano Banana + scene prompt |
Browser |
| Video from keyframe |
Veo 3.1 / Seedance 2.0 (via higgsfield-generate) |
Kling |
CLI |
| Motion transfer |
Kling |
Wan |
Browser + ComfyUI |
| Upscaling |
Topaz Gigapixel |
Real-ESRGAN |
CLI |
| Color grading |
Lightroom |
ffmpeg LUT |
CLI/Browser |
| AI music |
Artlist.io |
Suno |
Browser |
| Intent captions |
OpenCaptions |
ffmpeg burn-in |
CLI (future) |
Generation Modes
Mode 1: API-First (fastest, programmatic — preferred for agent workflows)
- higgsfield CLI (via
higgsfield-generate, higgsfield-product-photoshoot, higgsfield-soul-id) → 30+ models including Soul V2, Nano Banana 2, Veo 3.1, Kling 3.0, Seedance 2.0, Flux 2, GPT Image 2; plus Marketing Studio (avatar + product ad modes); plus Soul Character training
- fal.ai → Nano Banana 2, Kling, Veo (alternate provider when models overlap)
- @google/genai → Veo 3.1, Gemini image (Google-native path)
- All three callable directly from Claude Code, no browser needed
Mode 2: MCP-driven (for Claude Desktop / IDE plugins)
- Higgsfield MCP at
https://mcp.higgsfield.ai — same models, GUI-native auth, can't be scripted from Claude Code
- ComfyUI MCP (planned extension)
Mode 3: Browser-Automated (tools without APIs or MCP)
- Playwright drives Weavy, Artlist, Soul Cinema (legacy — prefer CLI now)
- Auth persisted via saved session state
- Batch generation with organized output
Mode 4: Local Pipeline (maximum control)
- ComfyUI + Stable Diffusion + LoRA
- Full node-based control over every generation step
- Topaz CLI for upscaling
Mode 3: Local Pipeline (maximum control)
- ComfyUI + Stable Diffusion + LoRA
- Full node-based control over every generation step
- Topaz CLI for upscaling
Output Organization
output/{campaign-slug}/
├── raw/ # Direct generation output
├── upscaled/ # After Topaz/Real-ESRGAN pass
├── graded/ # After color grading
└── manifest.json # Prompts, identity refs, tool used, timestamps
Vertical Layout Gate (9:16)
Every 9:16 asset (Reels, TikTok, Shorts, Stories) passes this gate before it is
distributed. The contract is layout/vertical-9x16.json, measured from a creator's
layout-guide Reel; the rules, their source and the checker's limits are in
references/vertical-layout.md. The Remotion ContentEngineReel composition reads its
overlay geometry from the same JSON. Its renders are still gated like any other video,
because reading the right numbers does not guarantee that the pixels land inside them.
| Rule |
What must hold (1080x1920) |
| VL1 |
Canvas 9:16, at least 1080 wide |
| VL2 |
Overlay text inside the safe zone x 143-938, y 277-1643 (title band excepted) |
| VL3 |
No overlay text or face on the action rail (x ≥ 872, y ≥ 922) or the bottom band (y ≥ 1686); small text there WARNs; a face counts if it is there in over a third of a shot |
| VL4 |
Title hook inside the top band, y 121-436 (the source Reel's title centres near y 278) |
| VL5 |
Captions in the band x 220-860, y 1288-1463, centred; with --expect-captions, a band with no readable text FAILs. It cannot see captions only partly out of the band, readable in only some frames, or elsewhere while other text sits in the band (reference: "What it does not catch") |
| VL6 |
Eyes at 33-45% of the height (source Reel: 38-40%) |
| VL7 |
Eye line moves at most 58px across a punch-in; WARN only (a cut to another framing looks the same to the detector) |
| VL8 |
Face inside the safe zone (median, and in two thirds of each shot's samples) |
| VL9 |
Text over a busy background has a stroke: FAIL when declared without one, WARN on measured low edge contrast |
Run it:
# rendered video with burned-in text (Remotion ContentEngineReel, CapCut export, ...)
python3 scripts/check_vertical_layout.py video final.mp4 --expect-captions --expect-title
# raw generated clip, before any text: read VL1 and VL6-VL8 (text rules describe
# text inside the footage, not overlays)
python3 scripts/check_vertical_layout.py video clip.mp4
# overlay geometry you are about to draw (watermarks, CTAs: small text that video
# mode classes as scene text)
python3 scripts/check_vertical_layout.py spec overlays.json
# paid placements: Meta's 14% top / 35% bottom / 6% sides. ContentEngineReel draws the
# organic layout and FAILS this profile; place ad captions above 65% by hand
python3 scripts/check_vertical_layout.py --profile meta-ads-9x16 video ad.mp4
Pass --expect-captions / --expect-title for text the asset burned in, and only for
that. The flags are how a misplaced caption is caught: the gate does not guess which
text is a caption (see "Why roles are declared" in the reference).
Outside this skill's root, the script is at
~/.claude/skills/content-engine/scripts/check_vertical_layout.py.
compose-video.py --aspect-ratio 9:16 (with --remotion, it renders ContentEngineReel)
prints the gate commands for what this run produced: the stitch stitch_clips returned,
and the render only if render.sh exited 0. It does not gate in-process. Run them
before distributing. The report records input_sha256, so a report is tied to the
bytes it checked; re-run the gate after any re-render.
Pass criteria. The checker exits 0 and the last line of its table output reads
VERDICT: PASS. Then:
- Every FAIL is fixed and the gate re-run. When the rule does not apply to this
asset (a b-roll face, text that is part of the footage), send the owner the report
and the guide sheet. Only the owner grants a waiver: a file bound to this render's
sha256, with a reason, passed as
--waive waivers.json. An agent never writes one.
VL1, VL9 and declared text that is not found are never waived. The policy is in
references/vertical-layout.md, "Waivers".
- Every UNCHECKED rule is closed by looking at
<video>.layout-guide.png (zones
painted on six frames; guide --frames N paints more). tesseract has no face
detector, so VL6-VL8 are UNCHECKED off macOS; use --strict where that must fail.
- Every SKIP is one you expected (a raw clip has no text; a b-roll has no face). A
render that burned in text must be run with
--expect-captions/--expect-title,
because OCR sees unreadable text as no text. The declared: line in the output
shows which flags were passed.
- The guide sheet is looked at for what the gate cannot see: every item under "What
it does not catch" and "Known limits" in
references/vertical-layout.md.
- Every WARN is looked at:
- VL9: low contrast around the glyph edges. Add a stroke or a backing, or confirm
on the guide sheet that it is a fade frame.
- VL7: an eye-line jump. It is fine at a cut; a punch-in must be scaled about the
eye line.
- VL3: small text on the rail. A handle or link there gets covered.
Record the verdict line and the report path with the asset (campaign manifest or PR).
Extension Points
Extensions live in extensions/. Each extension:
- Has its own SKILL.md declaring which pipeline stage it hooks into
- Hook points: pre-generation, post-generation, post-production, distribution
- Can read from
compiled/ but only writes to its own output namespace
- Registered in
extensions/README.md
Planned Extensions
- OpenCaptions — Intent-driven captions (post-production hook)
- ComfyUI MCP — Direct tool calls for node pipelines
- LoRA Training — Compiled DNA as training data for custom models
Reference Library — distilled craft
Deep, copy-paste-ready craft references live alongside each sub-skill. The cluster below was distilled from the full AI Video Creators course (BRO-1525 — 12.7 h video + 54 lessons; source playbook in broomva/workspace docs/reference/ai-video-creators-course/). Load the one that matches the task; the prompt structure and craft laws are durable even as model versions rotate.
| Reference |
Sub-skill |
What it gives |
skills/content-engine-cinema/references/ai-video-prompt-packs.md |
cinema |
The transferable prompt-craft laws (image/video/motion formulas, 5 universal control levers, JSON-by-model, camera→look cheat sheet) + verbatim copy-paste packs (identity-lock, image-to-image product integration, motion w/ strict negatives, master upscale, ChatGPT 3-step content engine, lip-sync, image-editing). |
skills/content-engine-cinema/references/audio-sound-design.md |
cinema |
Audio + sound-design + edit craft — the trailer arc, 3–5 layer named-role stack, verbatim ElevenLabs SFX prompts, the A/B mute-test gate, rhythm-before-sound editing, CapCut export discipline. |
skills/content-engine-cinema/references/cinematic-prompting.md → §AVCC |
cinema |
SHOT+LENS+LIGHT+TEXTURE+COMPOSITION+STYLE formula, NBP Object→Context→Technical, the 5 control levers, 7 aesthetics + meta-messages, shot/lens reference tables, the taste-training loop. |
skills/content-engine-cinema/references/motion-animation.md → §AVCC |
cinema |
Kling model-tier element budgets + model-first rule, Subject+Action+Context+Style, TTV-vs-I2V, motion-endpoint/99% hang, count-nouns overload rule, negative constraints, the Constraint Sandwich, reverse-motion trick. |
skills/content-engine-dna/references/visual-dna-framework.md |
dna |
The art-direction layer: Meaning→Trust→Conversion, the Visual DNA Pyramid, Brand Core, the full Meaning Map dictionary, 5 amateur→premium rules, the verbatim "Act as an art director" prompt, the 15-item Legend template. |
skills/content-engine-dna/references/character-sheets.md → §AVCC |
dna |
Character DNA = Master Prompt (Fixed DNA + Variable Context), "1 account = 1 character", hero-portrait-first + reuse, Hybrid-Reality face-swap, Kling Motion Control tripod rule, + product / non-human identity lock (REF 1/2/3 integration, cross-scene verification). |
skills/content-engine-loop/references/monetization-playbook.md |
loop |
Creator→revenue: the 4 paths, exact pricing tiers + brand-placement packages, the 60-sec lead-qual script, margin rules, the micro-funnel + viral loop, Skool referral math. Grounds the Kleos proof-driven-demand engine. |
Compounding Skills
This skill compounds on the existing broomva content ecosystem:
| Skill |
Role |
/content-creation |
Media pipeline (Nano Banana, Veo 3.1, TTS, Remotion) |
/blog-post |
Writing + 6 platform adaptations + publish.sh |
/social-intelligence |
Engagement loop + knowledge extraction |
/brainrot-for-good |
High-retention short-form video |
/brand-icons |
OG images, social cards |
/higgsfield-generate |
30+ Higgsfield models, Marketing Studio (avatar + product ads) |
/higgsfield-product-photoshoot |
Brand-quality product images with mode-specific enhancement |
/higgsfield-soul-id |
Train Soul Character refs for consistent face/identity |
/agent-browser |
Playwright browser automation |
/arcan-glass |
Brand styling tokens |
Research Sources
Built from analysis of:
- viznfr — Claude Code + Playwright autopilot, Nano Banana character sheets, brand DNA extraction
- ohneis652 — ComfyUI node pipelines, LoRA style-locking, Soul Cinema start-frame doctrine, 25 design styles
- AI Video Creators (Skool) — fully captured & distilled (BRO-1525): ReelEngine/PromptEngine prompt craft, image-first pipeline, Visual-DNA art direction, character consistency, motion control, audio/edit craft, and the monetization playbook. See the Reference Library above +
broomva/workspace docs/reference/ai-video-creators-course/.
- MemPalace — Spatial hierarchy, AAAK compression, MCP-native memory
- Karpathy LLM Wiki — raw/wiki/schema 3-layer architecture, compile-then-query, active linting
1---2name: content-engine3category: video4description: "Full-stack AI content studio — orchestrates visual DNA compilation, cinematic generation (via Higgsfield CLI or MCP), browser-automated tool execution, and multi-platform distribution into a unified content pipeline. Compiles brand identity, character sheets, and style guides into persistent knowledge (Karpathy compile-then-query pattern), then generates premium cinematic content using Higgsfield (30+ models including Soul V2, Nano Banana 2, Veo 3.1, Kling 3.0, Seedance 2.0, Flux 2), Soul Cinema, Weavy, and ComfyUI with consistent character identity and intentional visual direction. Triggers on: 'content engine', 'generate campaign', 'compile brand', 'cinematic content', 'AI content studio', 'batch generate', 'content pipeline', 'visual DNA', 'character consistency', 'higgsfield', 'marketing studio', 'product photoshoot', 'soul character', 'world-building', 'universe bible', 'pre-production'."5metadata:6 source: https://skillmd.com/skills/broomva/content-engine7---89# Content Engine1011Full-stack AI content studio: compile visual identity once, generate premium content at scale, distribute everywhere.1213```14(WORLD) → COMPILE → GENERATE → POST-PRODUCE → LAYOUT GATE (9:16) → DISTRIBUTE → MEASURE → REFINE15```1617WORLD runs first, and only for a fictional production that has no world yet.1819## Commands2021| Command | What it does |22|---------|-------------|23| `/content-engine universe` | Grill an owner from nothing to a documented world (bible, canon, cast, locations, look, sound, formats, asset manifest) that skene can produce; generates nothing (content-engine-universe) |24| `/content-engine compile` | Raw assets → compiled visual DNA (brand, character, style) |25| `/content-engine lint` | Health-check compiled knowledge for consistency |26| `/content-engine generate` | Create content using compiled identity + scene brief |27| `/content-engine autopilot setup {tool}` | Save browser session for a generation tool |28| `/content-engine autopilot run` | Batch generation via browser automation |29| `/content-engine campaign {brief}` | Full pipeline: compile → generate → distribute |30| `/content-engine loop` | Compound existing skills for distribution |31| `/content-engine layout-check {video\|image\|spec}` | 9:16 layout gate: `python3 scripts/check_vertical_layout.py video final.mp4 --expect-captions --expect-title` for a render with captions and a title hook (see Vertical Layout Gate) |3233## Architecture3435Five sub-skills, each handling one layer:3637```38[content-engine-universe] World-Building Pre-Production39 ↓ grill → bible, canon, species-aware sheets, style lock, asset manifest40[content-engine-dna] Visual DNA Compiler41 ↓ raw/ → compiled/ (brand DNA, character sheets, style guides)42[content-engine-cinema] Cinematic Generation Layer43 ↓ compiled identity → tool-specific prompts → generation44[content-engine-autopilot] Browser Orchestration45 ↓ Playwright drives tools OR API calls → organized output46[content-engine-loop] Content Loop + Distribution47 compounds /blog-post + /content-creation + /social-intelligence48```4950## Quick Start5152### 1. Compile Brand Identity5354Drop reference assets into `knowledge/raw/`:55- Brand campaign photos → `knowledge/raw/brand-assets/`56- Character face references → `knowledge/raw/character-refs/`57- Style inspiration (mood boards, reference reels) → `knowledge/raw/style-inspiration/`5859Then compile:60```61/content-engine compile62```6364This analyzes all raw assets via Gemini multimodal and produces compiled identity files in `knowledge/compiled/` with tool-specific prompt fragments.6566### 2. Generate Content6768Write a scene brief or use a campaign plan:69```70/content-engine generate --brand acme --character luna --scenes 5 --format reels71```7273The engine:741. Reads compiled identity (brand DNA + character sheet + style guide)752. Selects the best tool per the tool priority matrix763. Injects compiled identity into tool-specific prompts774. Generates via API (fal.ai, @google/genai) or browser automation785. Runs post-production (upscale → grade)796. Organizes output with manifest.json tracking8081### 3. Run a Full Campaign8283```84/content-engine campaign "Mediterranean lifestyle, 10 summer scenes, golden hour, reels + carousel"85```8687Orchestrates all four skills end-to-end: compile (if needed) → generate scenes → post-produce → adapt for platforms → distribute.8889### 4. Distribute9091```92/content-engine loop93```9495Compounds existing skills for multi-platform distribution:96- `/blog-post` — Writing + 6 platform adaptations97- `/content-creation` — TTS, Remotion video, media pipeline98- `/social-intelligence` — Distribution + engagement monitoring99- `/brainrot-for-good` — High-retention short-form video100- `/brand-icons` — OG images, social cards101102## Setup & Prerequisites103104### Required105106```bash107# Check prerequisites108echo "=== Required ==="109which ffmpeg && echo "ok ffmpeg" || echo "MISSING: brew install ffmpeg"110echo ""111echo "=== API Keys ==="112[ -n "$GEMINI_API_KEY" ] && echo "ok GEMINI_API_KEY" || echo "MISSING: needed for Gemini analysis + Veo 3.1"113[ -n "$FAL_KEY" ] && echo "ok FAL_KEY" || echo "MISSING: needed for Nano Banana 2, Kling via fal.ai"114echo ""115echo "=== Higgsfield CLI (recommended for agent workflows) ==="116which higgsfield && echo "ok higgsfield $(higgsfield version 2>/dev/null | head -1)" || echo "MISSING: curl -fsSL https://raw.githubusercontent.com/higgsfield-ai/cli/main/install.sh | sh"117echo ""118echo "=== Browser Automation ==="119which agent-browser && echo "ok agent-browser" || echo "MISSING: needed for autopilot mode"120```121122### Higgsfield: two integration paths123124Higgsfield offers BOTH a CLI and an MCP. Pick based on your runtime:125126| Runtime | Recommended path | Why |127|---------|------------------|-----|128| **Claude Code, Codex, agent-browser, scripts** | **higgsfield CLI** + the `higgsfield-*` skills | Per Higgsfield's own guidance: "If you are using Claude Code or Codex, it's better to use the CLI." Direct programmatic access, scriptable, integrates with the skill bundle. |129| **Claude Desktop, web Claude, IDE plugins** | **Higgsfield MCP** at `https://mcp.higgsfield.ai` | One-click connector; UI-native; no CLI install. Can't be scripted. |130131**CLI path (recommended for content-engine):**132```bash133# Install134curl -fsSL https://raw.githubusercontent.com/higgsfield-ai/cli/main/install.sh | sh135136# Auth (interactive, opens browser)137higgsfield auth login138139# Verify140higgsfield account status141142# Capabilities exposed via three skill-level wrappers:143# higgsfield-generate — 30+ models (Nano Banana 2, Soul V2, Veo 3.1, Kling 3.0, Seedance 2.0, Flux 2)144# higgsfield-product-photoshoot — Brand-quality product images with mode-specific enhancement145# higgsfield-soul-id — Train Soul Character refs for consistent face/identity146```147148**MCP path (for Claude Desktop):**1491. Open Claude settings → Connectors → Add custom connector1502. Name: `Higgsfield`1513. URL: `https://mcp.higgsfield.ai`1524. Click Add → Connect → authenticate via Higgsfield account153154Both paths use the same Higgsfield credit pool. No API key needed for either; auth is via your Higgsfield account.155156### Optional (enhance quality)157158- **Topaz Gigapixel AI** — CLI upscaling (falls back to Real-ESRGAN)159- **ComfyUI** — Local node-based pipelines with LoRA style-locking160- **Weavy account** — Scene variation with character consistency161- **Artlist.io** — AI-powered music matching162163### Tool Session Setup164165For browser-automated tools (legacy path; prefer the CLI when available):166```167/content-engine autopilot setup higgsfield # browser fallback if CLI not available168/content-engine autopilot setup weavy169```170171This launches Chrome, you log in manually, and the session is saved for future automated use.172173## Knowledge Architecture174175### Karpathy Compile-Then-Query Pattern176177```178knowledge/179├── raw/ # Immutable source material (never modified by LLM)180│ ├── brand-assets/ # Campaign photos, logos, style guides181│ ├── character-refs/ # Face photos, pose references182│ ├── style-inspiration/# Mood boards, reference reels183│ └── scene-briefs/ # Scene descriptions184├── compiled/ # LLM-compiled identity files (the "wiki")185│ ├── brands/ # Per-brand DNA (.md)186│ ├── characters/ # Per-character sheets (.md)187│ └── styles/ # Compiled style guides (.md)188└── schema.md # Compilation rules + templates189```190191**raw/** is source code. **compiled/** is executable. The LLM is the compiler.192193Every compiled file:194- Traces provenance to raw sources195- Contains tool-specific prompt fragments196- Is human-reviewable Markdown197- Gets actively maintained via lint198199### Mapping to Existing Patterns200201| Content Engine | Karpathy Wiki | MemPalace | Broomva Knowledge Graph |202|---------------|--------------|-----------|----------------------|203| `raw/` | `raw/` | — | Layer 2 (raw extracts) |204| `compiled/` | `wiki/` | Rooms/Closets | Layer 3 (entity pages) |205| `schema.md` | `CLAUDE.md` | Wings/Halls | CLAUDE.md |206| Feedback loop | Linting pass | Tunnels | Layer 4 (synthesis) |207208## Tool Priority Matrix209210| Task | Best Tool | Fallback | Path |211|------|-----------|----------|------|212| Cinematic start frame | Soul Cinema (`higgsfield-generate --model soul_v2`) | Nano Banana Pro | CLI |213| Character consistency | Nano Banana Pro | SD + LoRA | CLI / fal.ai |214| Custom face/identity training | `higgsfield-soul-id` (Soul Character training) | LoRA fine-tuning | CLI |215| Branded product photoshoot | `higgsfield-product-photoshoot` (mode-specific enhancement) | Nano Banana + manual prompt | CLI |216| Marketing Studio (avatar + product ad) | `higgsfield-generate --model marketing_studio_video` | Veo 3.1 with prompt engineering | CLI |217| Multi-angle generation | Nano Banana 2 | Weavy | CLI / fal.ai |218| Scene variation | Weavy | Nano Banana + scene prompt | Browser |219| Video from keyframe | Veo 3.1 / Seedance 2.0 (via `higgsfield-generate`) | Kling | CLI |220| Motion transfer | Kling | Wan | Browser + ComfyUI |221| Upscaling | Topaz Gigapixel | Real-ESRGAN | CLI |222| Color grading | Lightroom | ffmpeg LUT | CLI/Browser |223| AI music | Artlist.io | Suno | Browser |224| Intent captions | OpenCaptions | ffmpeg burn-in | CLI (future) |225226## Generation Modes227228**Mode 1: API-First** (fastest, programmatic — preferred for agent workflows)229- **higgsfield CLI** (via `higgsfield-generate`, `higgsfield-product-photoshoot`, `higgsfield-soul-id`) → 30+ models including Soul V2, Nano Banana 2, Veo 3.1, Kling 3.0, Seedance 2.0, Flux 2, GPT Image 2; plus Marketing Studio (avatar + product ad modes); plus Soul Character training230- fal.ai → Nano Banana 2, Kling, Veo (alternate provider when models overlap)231- @google/genai → Veo 3.1, Gemini image (Google-native path)232- All three callable directly from Claude Code, no browser needed233234**Mode 2: MCP-driven** (for Claude Desktop / IDE plugins)235- Higgsfield MCP at `https://mcp.higgsfield.ai` — same models, GUI-native auth, can't be scripted from Claude Code236- ComfyUI MCP (planned extension)237238**Mode 3: Browser-Automated** (tools without APIs or MCP)239- Playwright drives Weavy, Artlist, Soul Cinema (legacy — prefer CLI now)240- Auth persisted via saved session state241- Batch generation with organized output242243**Mode 4: Local Pipeline** (maximum control)244- ComfyUI + Stable Diffusion + LoRA245- Full node-based control over every generation step246- Topaz CLI for upscaling247248**Mode 3: Local Pipeline** (maximum control)249- ComfyUI + Stable Diffusion + LoRA250- Full node-based control over every generation step251- Topaz CLI for upscaling252253## Output Organization254255```256output/{campaign-slug}/257├── raw/ # Direct generation output258├── upscaled/ # After Topaz/Real-ESRGAN pass259├── graded/ # After color grading260└── manifest.json # Prompts, identity refs, tool used, timestamps261```262263## Vertical Layout Gate (9:16)264265Every 9:16 asset (Reels, TikTok, Shorts, Stories) passes this gate **before it is266distributed**. The contract is `layout/vertical-9x16.json`, measured from a creator's267layout-guide Reel; the rules, their source and the checker's limits are in268`references/vertical-layout.md`. The Remotion `ContentEngineReel` composition reads its269overlay geometry from the same JSON. Its renders are still gated like any other video,270because reading the right numbers does not guarantee that the pixels land inside them.271272| Rule | What must hold (1080x1920) |273|------|---------------------------|274| VL1 | Canvas 9:16, at least 1080 wide |275| VL2 | Overlay text inside the safe zone x 143-938, y 277-1643 (title band excepted) |276| VL3 | No overlay text or face on the action rail (x ≥ 872, y ≥ 922) or the bottom band (y ≥ 1686); small text there WARNs; a face counts if it is there in over a third of a shot |277| VL4 | Title hook inside the top band, y 121-436 (the source Reel's title centres near y 278) |278| VL5 | Captions in the band x 220-860, y 1288-1463, centred; with `--expect-captions`, a band with no readable text FAILs. It cannot see captions only partly out of the band, readable in only some frames, or elsewhere while other text sits in the band (reference: "What it does not catch") |279| VL6 | Eyes at 33-45% of the height (source Reel: 38-40%) |280| VL7 | Eye line moves at most 58px across a punch-in; WARN only (a cut to another framing looks the same to the detector) |281| VL8 | Face inside the safe zone (median, and in two thirds of each shot's samples) |282| VL9 | Text over a busy background has a stroke: FAIL when declared without one, WARN on measured low edge contrast |283284**Run it:**285286```bash287# rendered video with burned-in text (Remotion ContentEngineReel, CapCut export, ...)288python3 scripts/check_vertical_layout.py video final.mp4 --expect-captions --expect-title289# raw generated clip, before any text: read VL1 and VL6-VL8 (text rules describe290# text inside the footage, not overlays)291python3 scripts/check_vertical_layout.py video clip.mp4292# overlay geometry you are about to draw (watermarks, CTAs: small text that video293# mode classes as scene text)294python3 scripts/check_vertical_layout.py spec overlays.json295# paid placements: Meta's 14% top / 35% bottom / 6% sides. ContentEngineReel draws the296# organic layout and FAILS this profile; place ad captions above 65% by hand297python3 scripts/check_vertical_layout.py --profile meta-ads-9x16 video ad.mp4298```299300Pass `--expect-captions` / `--expect-title` for text the asset burned in, and only for301that. The flags are how a misplaced caption is caught: the gate does not guess which302text is a caption (see "Why roles are declared" in the reference).303Outside this skill's root, the script is at304`~/.claude/skills/content-engine/scripts/check_vertical_layout.py`.305306`compose-video.py --aspect-ratio 9:16` (with `--remotion`, it renders `ContentEngineReel`)307prints the gate commands for what this run produced: the stitch `stitch_clips` returned,308and the render only if `render.sh` exited 0. It does not gate in-process. Run them309before distributing. The report records `input_sha256`, so a report is tied to the310bytes it checked; re-run the gate after any re-render.311312**Pass criteria.** The checker exits 0 and the last line of its table output reads313`VERDICT: PASS`. Then:3143151. Every **FAIL** is fixed and the gate re-run. When the rule does not apply to this316 asset (a b-roll face, text that is part of the footage), send the owner the report317 and the guide sheet. Only the owner grants a waiver: a file bound to this render's318 sha256, with a reason, passed as `--waive waivers.json`. An agent never writes one.319 VL1, VL9 and declared text that is not found are never waived. The policy is in320 `references/vertical-layout.md`, "Waivers".3212. Every **UNCHECKED** rule is closed by looking at `<video>.layout-guide.png` (zones322 painted on six frames; `guide --frames N` paints more). tesseract has no face323 detector, so VL6-VL8 are UNCHECKED off macOS; use `--strict` where that must fail.3243. Every **SKIP** is one you expected (a raw clip has no text; a b-roll has no face). A325 render that burned in text must be run with `--expect-captions`/`--expect-title`,326 because OCR sees unreadable text as no text. The `declared:` line in the output327 shows which flags were passed.3284. The guide sheet is looked at for what the gate cannot see: every item under "What329 it does not catch" and "Known limits" in `references/vertical-layout.md`.3305. Every **WARN** is looked at:331 - **VL9:** low contrast around the glyph edges. Add a stroke or a backing, or confirm332 on the guide sheet that it is a fade frame.333 - **VL7:** an eye-line jump. It is fine at a cut; a punch-in must be scaled about the334 eye line.335 - **VL3:** small text on the rail. A handle or link there gets covered.336337Record the verdict line and the report path with the asset (campaign manifest or PR).338339## Extension Points340341Extensions live in `extensions/`. Each extension:342- Has its own SKILL.md declaring which pipeline stage it hooks into343- Hook points: pre-generation, post-generation, post-production, distribution344- Can read from `compiled/` but only writes to its own output namespace345- Registered in `extensions/README.md`346347### Planned Extensions348- **OpenCaptions** — Intent-driven captions (post-production hook)349- **ComfyUI MCP** — Direct tool calls for node pipelines350- **LoRA Training** — Compiled DNA as training data for custom models351352## Reference Library — distilled craft353354Deep, copy-paste-ready craft references live alongside each sub-skill. The cluster below was distilled from the full **AI Video Creators** course (BRO-1525 — 12.7 h video + 54 lessons; source playbook in `broomva/workspace docs/reference/ai-video-creators-course/`). Load the one that matches the task; the **prompt structure and craft laws are durable** even as model versions rotate.355356| Reference | Sub-skill | What it gives |357|-----------|-----------|---------------|358| `skills/content-engine-cinema/references/ai-video-prompt-packs.md` | cinema | The transferable prompt-craft laws (image/video/motion formulas, 5 universal control levers, JSON-by-model, camera→look cheat sheet) + verbatim copy-paste packs (identity-lock, image-to-image product integration, motion w/ strict negatives, master upscale, ChatGPT 3-step content engine, lip-sync, image-editing). |359| `skills/content-engine-cinema/references/audio-sound-design.md` | cinema | Audio + sound-design + edit craft — the trailer arc, 3–5 layer named-role stack, verbatim ElevenLabs SFX prompts, the A/B mute-test gate, rhythm-before-sound editing, CapCut export discipline. |360| `skills/content-engine-cinema/references/cinematic-prompting.md` → §AVCC | cinema | SHOT+LENS+LIGHT+TEXTURE+COMPOSITION+STYLE formula, NBP Object→Context→Technical, the 5 control levers, 7 aesthetics + meta-messages, shot/lens reference tables, the taste-training loop. |361| `skills/content-engine-cinema/references/motion-animation.md` → §AVCC | cinema | Kling model-tier element budgets + model-first rule, Subject+Action+Context+Style, TTV-vs-I2V, motion-endpoint/99% hang, count-nouns overload rule, negative constraints, the Constraint Sandwich, reverse-motion trick. |362| `skills/content-engine-dna/references/visual-dna-framework.md` | dna | The art-direction layer: Meaning→Trust→Conversion, the Visual DNA Pyramid, Brand Core, the full Meaning Map dictionary, 5 amateur→premium rules, the verbatim "Act as an art director" prompt, the 15-item Legend template. |363| `skills/content-engine-dna/references/character-sheets.md` → §AVCC | dna | Character DNA = Master Prompt (Fixed DNA + Variable Context), "1 account = 1 character", hero-portrait-first + reuse, Hybrid-Reality face-swap, Kling Motion Control tripod rule, **+ product / non-human identity lock** (REF 1/2/3 integration, cross-scene verification). |364| `skills/content-engine-loop/references/monetization-playbook.md` | loop | Creator→revenue: the 4 paths, exact pricing tiers + brand-placement packages, the 60-sec lead-qual script, margin rules, the micro-funnel + viral loop, Skool referral math. Grounds the Kleos proof-driven-demand engine. |365366## Compounding Skills367368This skill compounds on the existing broomva content ecosystem:369370| Skill | Role |371|-------|------|372| `/content-creation` | Media pipeline (Nano Banana, Veo 3.1, TTS, Remotion) |373| `/blog-post` | Writing + 6 platform adaptations + publish.sh |374| `/social-intelligence` | Engagement loop + knowledge extraction |375| `/brainrot-for-good` | High-retention short-form video |376| `/brand-icons` | OG images, social cards |377| `/higgsfield-generate` | 30+ Higgsfield models, Marketing Studio (avatar + product ads) |378| `/higgsfield-product-photoshoot` | Brand-quality product images with mode-specific enhancement |379| `/higgsfield-soul-id` | Train Soul Character refs for consistent face/identity |380| `/agent-browser` | Playwright browser automation |381| `/arcan-glass` | Brand styling tokens |382383## Research Sources384385Built from analysis of:386- **viznfr** — Claude Code + Playwright autopilot, Nano Banana character sheets, brand DNA extraction387- **ohneis652** — ComfyUI node pipelines, LoRA style-locking, Soul Cinema start-frame doctrine, 25 design styles388- **AI Video Creators (Skool)** — fully captured & distilled (BRO-1525): ReelEngine/PromptEngine prompt craft, image-first pipeline, Visual-DNA art direction, character consistency, motion control, audio/edit craft, and the monetization playbook. See the Reference Library above + `broomva/workspace docs/reference/ai-video-creators-course/`.389- **MemPalace** — Spatial hierarchy, AAAK compression, MCP-native memory390- **Karpathy LLM Wiki** — raw/wiki/schema 3-layer architecture, compile-then-query, active linting