شعار Ship Web Video

Ship Web Video

المجتمع
Heyvhuang
ship-web-video

Use when a finished film or UI loop has to go on a website, landing page, docs page or README: encoding it for the web, a poster, autoplay or play-on-click, a reserved box, reduced motion, a file-size budget, or checking it does not slow the page or shift the layout. Gives MP4 and WebM files with no audio track and the index first, posters, the markup, and the probes and page checks that prove each rule. Not for making or changing the film itself (build-hyperframes-video).

نظرة عامة

الناشرHeyvhuang
المستودعcopybook-skills
اسم المهارةship-web-video
النجوم
143
التفريعات
9
الملفات المرفقة
6
الترخيصMIT
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • الملفات المرفقة: 6

    نصوص برمجية وقوالب ومراجع يمكن للنموذج قراءتها أثناء عمله. الملفات للقراءة فقط ولا تُنفّذ أبدًا.

  • مفتوحة المصدر

    نشرها Heyvhuang على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Ship Web Video في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/Heyvhuang/copybook-skills/tree/main/plugins/skills/skills/ship-web-video
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Heyvhuang/copybook-skills.git /tmp/copybook-skills
mkdir -p .claude/skills
cp -r /tmp/copybook-skills/plugins/skills/skills/ship-web-video .claude/skills/ship-web-video
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Ship Web Video في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة Ship Web Video تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Ship Web Video بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

Ship a film on a web page

A film on a page is a picture first and a video second: the page reserves its box, paints a poster, and fetches no video byte until the film is in view and allowed to move. A loop in the first screen is the one film that plays from its tag alone. Start from the delivery master (npx hyperframes render --quality delivery); keep the master out of the shipped folder.

1. Decide where and whether

  • One film per page, on the page whose subject it shows, below that page's first screen. Ask whether the page needs a film at all: a film that pops up on arrival became the page's largest paint and nearly doubled it.
  • Write down: does it loop (a UI loop does; a film that ends on a logo does not, since its last frame jumps to its first), which frame is the poster (the frame with the largest words and no cursor; frame 0 for a loop), and its alt text (Video: and what it shows, 120 characters at most).
  • Ratio: list every place the film shows (a cropped tile, a card, the page, a 390 phone) before encoding. A 16:9 master on an upright phone is about 342×192 in a page column, so small text never reads; one 3:2 master at 1440×960 with 40 px text filled a 3:2 tile uncropped and read at 390. Ship a 1:1 or 4:5 cut for phones only where the page can serve a second file.

2. Encode

bash
bash scripts/encode-web.sh renders/film.mp4 public/films film 18.6 3MB

It writes film.mp4 (H.264 High, yuv420p, CRF 21 capped at 2.2 Mb/s, -movflags +faststart, -an), film.webm (two-pass VP9 around 1 Mb/s, -an), and film-poster.png, .jpg and .webp from the second you give, then checks the budget. Budgets: 3,000,000 bytes per film file, 1,500,000 per UI loop (decimal). A 22 s film at 1600×900 came to about 1.75 MB MP4 and 2.2 MB WebM. Over budget: lower the resolution to the largest size the page shows it at, then raise the CRF a step; never cut the frame rate of a UI loop.

3. Markup

html
<figure class="film" data-loop="false" style="aspect-ratio: 1600 / 900" role="img" aria-label="Video: the brief turning into four pieces">
  <img src="/films/film-poster.webp" width="1600" height="900" alt="" loading="lazy" decoding="async">
  <video muted playsinline preload="none" tabindex="-1" width="1600" height="900">
    <source src="/films/film.mp4" type='video/mp4; codecs="avc1.640028"'>
    <source src="/films/film.webm" type='video/webm; codecs="vp9"'>
  </video>
  <button type="button" class="film-play">Play</button>
  <figcaption>From brief to four pieces in 22 seconds</figcaption>
</figure>
<script src="/film.js" defer></script>

A loop in the first screen (a hero) carries muted loop playsinline, its poster, its size and controls on the tag, and no autoplay: film.js starts it once it has read the motion setting, and where the script is late or blocked the reader gets the poster and the browser's own controls, never motion they did not ask for:

html
<figure class="film" data-loop="true" style="aspect-ratio: 1600 / 900" role="img" aria-label="Video: the dashboard filling in">
  <video muted loop playsinline controls poster="/films/loop-poster.webp" width="1600" height="900">
    <source src="/films/loop.mp4" type='video/mp4; codecs="avc1.640028"'>
    <source src="/films/loop.webm" type='video/webm; codecs="vp9"'>
  </video>
  <button type="button" class="film-play" hidden>Pause</button>
</figure>
<script src="/film.js" defer></script>
css
.film { position: relative; margin: 0; }
.film img, .film video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
.film-play { position: absolute; left: 12px; bottom: 12px; min-width: 40px; min-height: 40px; }
.film figcaption { position: absolute; top: 100%; padding-top: 8px; }
@media (prefers-reduced-motion: reduce) { .film img, .film video { transition: none; } }

scripts/film.js is the player: it plays a data-loop="true" film muted when 35% is in view (a hero at once), pauses it out of view or in a hidden tab, keeps a Pause the reader pressed, swaps the poster for the video only on the first presented frame, and leaves the poster and Play under reduced motion or Save-Data. A film that does not loop waits for Play and rests on its last frame.

  • The box is reserved from the first paint by aspect-ratio and the file's own width and height, so mounting the film shifts nothing.
  • controls only on a hero's tag, as the pause that works without the script; film.js takes them off when it shows its own Pause, which the hero's markup keeps hidden until then. No autoplay on any tag: the browser starts an autoplay video before any script can read reduced motion, and fetches it on load wherever it sits, so film.js decides when each film plays.
  • The poster stays until the first frame is actually presented (requestVideoFrameCallback, else the first timeupdate), then the video fades in; fading on playing shows an empty box on slow lines.
  • Reduced motion, Save-Data, or autoplay refused: the poster and a Play button, and no video request below the first screen. Pressed under reduced motion, it plays once and does not loop.
  • Anything that moves for more than 5 s on arrival gets a visible Pause that stays held once pressed (WCAG 2.2.2). Under a coarse pointer, Play is a real button at least 40 px each way.
  • A dark theme dims a light film with filter: brightness(0.65) contrast(1.2) on both the poster and the video.
  • A GitHub README plays only an attachment URL alone on its line (upload the MP4 to an issue or the README editor, up to 10 MB); a repo-relative link or a raw URL does not play, and the poster is dropped.

4. Prove it

bash
bash scripts/probe.sh public/films/film.mp4 1600x900 30 22.0 no 1.2
ffprobe -v trace public/films/film.mp4 2>&1 | grep -o "type:'\(moov\|mdat\)'" | head -2
ffprobe -v error -select_streams a -show_entries stream=index -of csv=p=0 public/films/film.webm
bash scripts/size-check.sh 3MB public/films/film.mp4 public/films/film.webm

probe.sh checks size, fps, length within a frame, no audio stream and that the final hold is still (the last 1.2 s within 45 dB). The trace must print moov before mdat (a fragmented MP4 has no readable index either). The audio probe must print nothing.

Then on the built page, in a headless browser at 390 and 1440 wide:

  • Layout shift is 0 with the page's scripts held back a second; the box keeps its ratio within 0.01, fits its column, and has no sideways scroll.
  • Scrolled 9000 px away, no request goes to the film folder and the video is paused; in view, the poster and at most one video file load, never both formats.
  • With prefers-reduced-motion: reduce emulated, the poster and Play show and nothing plays; below the first screen no video byte is fetched.
  • With film.js served and blocked (route it to a 404), each with motion on and reduced: served with motion on, the hero plays and its Pause stops it; served and reduced, it rests on its poster with Play; blocked, it rests on its poster with the browser's own controls in both, and their play starts it.
  • The test server answers byte-range requests with 206, or seeking breaks.

Pitfalls we hit

  • A film ending on a logo looped and jumped from its dark end to its light start → play once and rest on the last frame.
  • The MP4 index sat at the end, so the browser read the whole file first → -movflags +faststart, then probe for moov before mdat.
  • A "silent" film still carried an empty audio track → encode with -an and probe the shipped file, not the encoder flags.
  • preload="auto" fetched megabytes before anyone looked → preload="none" and play from script.
  • A hero with autoplay on its tag looped for a reader who asked for reduced motion whenever the script failed → no autoplay; poster and controls on its tag, and the script starts it.
  • The page jumped when the film mounted → aspect-ratio from the file's width and height.
  • The poster showed a cursor and tiny type → pick the frame with the largest words, pointer painted out.
  • A badge or the player's own controls over the poster hid its last lines (a control bar at 1440, a corner Play on a 390 phone) → measure the controls' box in film pixels at every width the page has, and keep the poster's words out of it.
  • A control bar covered a third of the poster on a 390 phone → hide it until first play; one round Play named "Play".
  • A floating corner player read as abrupt → place the film inside the page's column.
  • The film's pictured button sat beside the page's real one and confused readers → place it away from the real control, or cut that frame.
  • The build host had no ffprobe → read the MP4 boxes in code (moov, mdat, hdlr, avcC) and the WebM header for its codec ids.

See example.md for one film shipped and checked.

Based on heygen-com/hyperframes (Apache-2.0), rewritten by Copybook.

الملفات المرفقة

يقرأ النموذج هذه الملفات عند الحاجة ما دامت المهارة محمّلة. وهي متاحة للقراءة ولا تُنفّذ أبدًا.

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي Ship Web Video؟

Use when a finished film or UI loop has to go on a website, landing page, docs page or README: encoding it for the web, a poster, autoplay or play-on-click, a reserved box, reduced motion, a file-size budget, or checking it does not slow the page or shift the layout. Gives MP4 and WebM files with no audio track and the index first, posters, the markup, and the probes and page checks that prove each rule. Not for making or changing the film itself (build-hyperframes-video).

لماذا تستخدم Ship Web Video على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Ship Web Video عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Ship Web Video في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/Heyvhuang/copybook-skills/tree/main/plugins/skills/skills/ship-web-video. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة، ويجمع ملفاتها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Ship Web Video؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Ship Web Video؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Ship Web Video معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Ship Web Video مجانية؟

نعم. نشرها Heyvhuang على GitHub بموجب ترخيص MIT. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇