Recording logo

Recording

Organization
MatrixReligio
recording

使用 Playwright 进行浏览器自动化录屏。当需要录制 Web 应用操作演示、生成带时间线的屏幕录像时使用。

Overview

PublisherMatrixReligio
RepositoryProductVideoCreator
Skill namerecording
Stars
44
Forks
9
Bundled files
Instructions only
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by MatrixReligio on GitHub. Read the source before you install it.

Installation

Install the Recording AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/MatrixReligio/ProductVideoCreator/tree/main/.claude/skills/recording
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/MatrixReligio/ProductVideoCreator.git /tmp/ProductVideoCreator
mkdir -p .claude/skills
cp -r /tmp/ProductVideoCreator/.claude/skills/recording .claude/skills/recording
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Recording in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Recording on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Recording is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

浏览器录屏技能

核心要求

  1. 单次连续录制 - 不要分段录制
  2. 记录时间线 - 每个操作的精确时间戳
  3. 真实数据 - 使用真实或有意义的测试数据
  4. 适当节奏 - 留足够时间让画面呈现

录屏脚本结构

javascript
const { chromium } = require("playwright");
const path = require("path");
const fs = require("fs/promises");

const BASE_URL = "http://localhost:5173";
const OUTPUT_DIR = path.join(__dirname, "..", "public", "recordings");
const VIEWPORT = { width: 1920, height: 1080 };

// 测试数据 - 使用真实有意义的数据
const TEST_DATA = {
  // 定义测试数据
};

// 时间线记录器 - 关键组件
class TimelineRecorder {
  constructor() {
    this.startTime = Date.now();
    this.events = [];
  }

  mark(event) {
    const elapsed = (Date.now() - this.startTime) / 1000;
    this.events.push({ time: elapsed, event });
    console.log(`  [${elapsed.toFixed(1)}s] ${event}`);
    return elapsed;
  }

  getTimeline() {
    return this.events;
  }
}

async function recordDemo() {
  await fs.mkdir(OUTPUT_DIR, { recursive: true });

  const browser = await chromium.launch({
    headless: false,
    slowMo: 50,  // 稍微放慢操作,更自然
  });

  const context = await browser.newContext({
    viewport: VIEWPORT,
    recordVideo: {
      dir: OUTPUT_DIR,
      size: VIEWPORT,
    },
    locale: "zh-CN",
  });

  const page = await context.newPage();
  const timeline = new TimelineRecorder();

  try {
    // 场景录制...

  } finally {
    // 保存时间线
    const timelineData = {
      totalDuration: (Date.now() - timeline.startTime) / 1000,
      events: timeline.getTimeline(),
    };

    await fs.writeFile(
      path.join(OUTPUT_DIR, "timeline.json"),
      JSON.stringify(timelineData, null, 2)
    );

    await page.close();
    await context.close();
    await browser.close();
  }
}

录屏最佳实践

1. 等待时间设置

javascript
// 页面加载后等待
await page.goto(url, { waitUntil: "networkidle" });
await page.waitForTimeout(1500);

// 点击后等待响应
await element.click();
await page.waitForTimeout(2000);

// 表单输入后等待
await input.fill(value);
await page.waitForTimeout(500);

// 弹窗打开后等待
await dialog.waitFor({ state: "visible" });
await page.waitForTimeout(1500);

2. 操作节奏

操作类型建议等待时间
页面加载1.5-3 秒
点击按钮1-2 秒
表单输入0.5-1 秒
弹窗出现1.5-2 秒
数据加载2-3 秒
场景切换2-3 秒

3. 悬停展示

javascript
// 悬停显示 tooltip
await element.hover();
timeline.mark("悬停显示提示");
await page.waitForTimeout(3000);  // 留足时间让观众看清

4. 逐字输入效果

javascript
// 更真实的输入效果
for (const char of text) {
  await input.type(char, { delay: 80 });
}

时间线记录规范

必须记录的事件

  • 页面加载完成
  • 主要区域就绪
  • 每次点击操作
  • 每次数据加载完成
  • 弹窗打开/关闭
  • 录制结束

事件命名规范

javascript
timeline.mark("页面加载完成");
timeline.mark("点击[按钮名]按钮");
timeline.mark("输入用户名: xxx");
timeline.mark("[弹窗名]弹窗打开");
timeline.mark("显示查询结果");
timeline.mark("录制结束");

视频格式转换

录制完成后转换为 MP4:

javascript
// 使用 FFmpeg 转换
const { execSync } = require("child_process");

execSync(`ffmpeg -y -i ${webmPath} -c:v libx264 -preset fast -crf 23 ${mp4Path}`);

故障排除

Chromium 未安装

bash
npx playwright install chromium

录制黑屏

确保 headless: false

操作太快

增加 slowMo 值或 waitForTimeout

元素未找到

使用更稳定的选择器:

javascript
// 推荐
page.locator('button:has-text("查询")')
page.locator('.el-button--primary')

// 避免
page.locator('button:nth-child(2)')

Frequently asked questions

What does the Recording AI skill do?

使用 Playwright 进行浏览器自动化录屏。当需要录制 Web 应用操作演示、生成带时间线的屏幕录像时使用。

Why use Recording on TypingMind?

Because you install it once and use it with any model. Recording is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Recording in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/MatrixReligio/ProductVideoCreator/tree/main/.claude/skills/recording. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Recording?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Recording?

As many as you like. As long as a model supports skills, you can use Recording with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Recording AI skill free?

It is published on GitHub by MatrixReligio. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇