sahin.io

All skills and agents

page-video

Use when planning, pricing, generating or reviewing a video clip for a public page on sahin.io/angel-investments (og:video and the video at the top of the page). Requires a price check, a one-page test and before/after mockups before anything ships.

Source file
.claude/skills/page-video/SKILL.md

Page video

Owner, 2026-12-01: "can we creatae a video relatred to the page using the cheapest best model ? og:meta and in the top we will have video view". He approved this skill on 2026-12-03 ("yes").

Order of work

  1. Price the models first. curl https://openrouter.ai/api/v1/videos/models lists every video model with pricing_skus, durations, resolutions and supported_frame_images. Never quote a price from memory.
  2. Make one test clip for one page. Report its real cost from the job's usage.cost.
  3. Show the clip and before/after mockups of the page top, desktop and phone, each its own file (ui-before-after).
  4. Generate more clips or ship only after the owner's yes (ship-to-production, deploy-gate).

What a clip is

  • Image-to-video from the company's own backdrop (client/public/images/discovery/company/<slug>.webp) as the first frame. The scene stays the page's own; the model adds motion only.
  • 4 seconds, 720p, 16:9, no audio. Muted, looping, playsinline, poster first, loaded lazily at the top of the page.
  • The same file is the page's og:video (server/publicSchema.ts OG_VIDEO_PATHS, server/publicChrome.ts).
  • Prompt: slow push-in, subtle natural motion, "no text, no letters, no logos, no people, no faces". Look at the first and last frame of every clip; re-render one that shows any of those.

API facts (checked 2026-12-03)

  • POST https://openrouter.ai/api/v1/videos with model, prompt, duration, resolution, aspect_ratio, generate_audio: false, frame_images: [{ type: "image_url", image_url: { url }, frame_type: "first_frame" }]. Poll polling_url until completed, then download unsigned_urls[0] with the key.
  • Frame images must be JPEG or PNG. WebP is refused (400). Convert the backdrop to a 1280x720 JPEG; a data:image/jpeg;base64, URL works.
  • Cheapest per-second model that day: google/veo-3.1-lite, $0.03 per second at 720p without audio, so $0.12 for 4 seconds. The first test (Anthropic) cost exactly $0.12.
  • The raw clip is about 3.6 MB. Re-encode for the web (ffmpeg -an -c:v libx264 -crf 27 -pix_fmt yuv420p -movflags +faststart): about 0.8 MB.
  • Key: OPENROUTER_API_KEY in ~/.zshrc; run through zsh -ic. Never print or commit it.

What is built (2026-12-03)

  • pnpm videos:render (scripts/render-company-videos.mjs): renders a clip for every company that has none; name slugs to re-render; --limit N; --dry-run prints the count and the price and spends nothing. It writes client/public/images/video/company/<slug>.mp4 (960x540, about 0.4 MB) and data/company-videos.json.
  • A company page shows its clip above the header (CompanyViewPage.tsx, .cvw-video) when the file exists. The still backdrop is the poster. The clip starts when the page is idle and never for reduced-motion or data-saving visitors.
  • The same file is the page's og:video (companyVideoPath, ogVideoSize in server/publicSchema.ts), 960x540.
  • Tests: server/company-videos.test.ts, the og:video block in server/public-schema.test.ts.
  • Owner chose "All 239 companies" on 2026-12-03. Confirm the total price with him before a batch.

Rules that apply

  • .mp4 is already an allowed public asset type; a new type needs the allowlist (production-deployment).
  • No VC firm logos, no private data, no noindex. Copy stays in YAML (page-content-yaml).
  • A clip is public content: it must not show text, a brand mark or a person.