Skillpedia
الحركة والرسوم المتحركة40k · #7418

screen-recording

ما الذي تفعله

تنشئ هذه المهارة مقاطع GIF متحركة قصيرة توضح كيفية استخدام برنامج أو ميزة. يمكنك إضافة أسهم ونصوص وتمييز الأجزاء المهمة لشرح أفضل.

متى تستخدمها

  • ✓عندما تريد توضيح كيفية استخدام ميزة جديدة في موقع.
  • ✓عندما تريد شرح خطأ حدث في برنامج.
  • ✓عندما تريد إنشاء دليل سريع عن طريقة تنفيذ شيء ما.

رابط المهارة

https://github.com/github/awesome-copilot/blob/main/skills/screen-recording/SKILL.md

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/github/awesome-copilot/blob/main/skills/screen-recording/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“أنشئ GIF متحركًا يوضح كيفية تسجيل الدخول إلى الموقع X، مع تمييز حقل كلمة المرور.”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

تسجّل المهارة شاشة حاسوبك وتأخذ « لقطات » على فترات. ثم تدمج اللقطات في مقطع قصير (GIF)، وتتيح لك إضافة تعليقات توضيحية مثل الأسهم والنصوص لشرح ما يحدث.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من GitHub.

Screen Recording

Create animated GIF demos that show a feature or workflow in action — with annotations, variable timing, and proper pacing. Useful for PR descriptions, documentation, and release notes.

When to Use This Skill

Use this skill when you need to:

  • Record a multi-step UI interaction as an animated GIF
  • Create a demo showing before/after behavior
  • Build annotated walkthroughs for documentation or release notes
  • Show a bug reproduction or fix in action

Prerequisites

pip install playwright Pillow imageio numpy scipy mss -q
playwright install chromium

Core Workflow

1. Capture frames

Use Playwright to step through the interaction and capture each frame:

from playwright.async_api import async_playwright

async def record_frames(url, steps, width=1400, height=900):
    """
    steps: list of dicts with 'action' (async callable taking page)
           and 'name' (frame filename)
    """
    async with async_playwright() as p:
        browser = await p.chromium.launch()
        page = await browser.new_page(viewport={"width": width, "height": height})
        await page.goto(url, wait_until="networkidle")

        for step in steps:
            if step.get("action"):
                await step["action"](page)
                await page.wait_for_timeout(step.get("wait", 500))
            await page.screenshot(path=step["name"])

        await browser.close()

2. Assemble GIF with imageio

Use imageio, not PIL, for GIF writing — PIL's GIF encoder merges visually similar frames, which kills animations.

import imageio.v3 as iio
from PIL import Image
import numpy as np

frames = []
durations = []

for frame_path, duration_ms in frame_list:
    img = Image.open(frame_path)
    frames.append(np.array(img))
    durations.append(duration_ms)

iio.imwrite("demo.gif", frames, duration=durations, loop=0)

3. Variable frame timing

Uniform timing makes everything feel either too fast or too slow. Use variable durations:

Phase Duration Why
Fast action (typing, clicking) 100ms Feels natural, keeps energy
Pause after action 600-800ms Let the viewer process what happened
Hero/final message 500ms+ Main takeaway needs time to land

4. Annotate frames

Apply annotations to specific frames using the image-annotations skill:

from PIL import Image, ImageDraw, ImageFont

def annotate_frame(frame_path, annotations, out_path):
    img = Image.open(frame_path)
    draw = ImageDraw.Draw(img)

    for ann in annotations:
        # Apply annotation (rect, arrow, label, etc.)
        pass

    img.save(out_path)

5. Fade-in annotations

For smooth annotation appearance:

def apply_fade(base_frame, annotation_layer, alpha):
    """Blend annotation onto frame at given alpha (0.0 to 1.0)"""
    blended = Image.blend(
        base_frame.convert("RGBA"),
        annotation_layer.convert("RGBA"),
        alpha
    )
    return blended.convert("RGB")

# 2-frame pop-in at 10fps: 50% then 100%
faded_frames = [
    apply_fade(base, annotations, 0.5),  # frame 1: half opacity
    apply_fade(base, annotations, 1.0),  # frame 2: full opacity
]

At 10fps, use 2 fade frames (0.2s total). At 30fps, use 3-4 frames. Easing curves look bad at low FPS — simple pop-in is snappier and more readable.

Build as a Script

The annotation logic gets complex for anything beyond trivial demos. Write a dedicated script (e.g., annotate_gif.py) with functions instead of inline code. You'll iterate on timing and placement.

Testing Animations

Always test in isolation first — don't rebuild the full demo to test a fade tweak:

# Small test GIF: 10 bare frames → fade frames → 15 hold frames
# Add a frame counter overlay for debugging:
draw.text((10, height - 30), f"F{i}/{total} a={alpha:.0%} FADE",
          fill="white", font=small_font)

Desktop Screen Recording (mss)

For recording desktop apps, terminals, or anything outside a browser. Uses mss for fast screen capture.

import mss
from PIL import Image
import time

def record_gif(output_path, region=None, duration=5, fps=8):
    """Record screen region to GIF. region = {left, top, width, height} or None for full screen."""
    with mss.mss() as sct:
        if region is None:
            region = sct.monitors[1]  # primary monitor

        frames = []
        t_end = time.time() + duration

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

هل أحتاج إلى تثبيت شيء؟

نعم، تحتاج إلى تثبيت بعض أدوات البرمجة مثل « playwright » و« Pillow » و« imageio ». فـ Playwright يسجّل الشاشة، والأدوات الأخرى تنشئ الـ GIF.

هل أستطيع إضافة نصوص وأسهم؟

نعم، يمكنك إضافة تعليقات توضيحية مثل النصوص والأسهم والمربعات لتمييز الأجزاء المهمة في GIF.

هل سيكون حجم الـ GIF كبيرًا؟

للحفاظ على حجم معقول للملف، يُنصح بمعدل إطارات (FPS) يبلغ 10 أو أقل، خاصة لتسجيلات سطح المكتب.

التفاصيل

الوصف الأصلي من المؤلف

Create annotated animated GIF demos and screen recordings for pull requests and documentation. Covers frame capture, timing, imageio-based GIF creation, and per-frame annotation workflows.

repo: github/awesome-copilot

الشعبية

نجوم GitHub
40k
الترتيب
#7418
الترخيص
MIT
آخر تحديث
15‏/10‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة