Communitygithub.com

webapp-walkthrough

把一个已开发完的 Web 系统,一键录制成「覆盖全部功能点的中文使用教学视频」:真实操作每个模块/功能点,带章节卡、光标与元素高亮、教学式旁白、烧录字幕,产出成片 mp4 + 教学讲稿 + 功能点清单 + 每步截图。也保留旧版「逐选项卡自动走查」模式。当用户说"给系统做一套使用教学视频/操作教程"、"把所有功能点讲一遍录下来"、"以XX系统为例子做个教学片"、"做完系统帮我跑一遍并录像"、"给每个模块每个 tab 点一遍"、"录制操作演示并配音"时使用。

O que é webapp-walkthrough?

webapp-walkthrough is a Claude Code agent skill that 把一个已开发完的 Web 系统,一键录制成「覆盖全部功能点的中文使用教学视频」:真实操作每个模块/功能点,带章节卡、光标与元素高亮、教学式旁白、烧录字幕,产出成片 mp4 + 教学讲稿 + 功能点清单 + 每步截图。也保留旧版「逐选项卡自动走查」模式。当用户说"给系统做一套使用教学视频/操作教程"、"把所有功能点讲一遍录下来"、"以XX系统为例子做个教学片"、"做完系统帮我跑一遍并录像"、"给每个模块每个 tab 点一遍"、"录制操作演示并配音"时使用。.

Funciona com~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/XXingmfy/lunwen-skills/tree/HEAD/webapp-walkthrough

Perguntar na sua IA favorita

Abre um novo chat com esta habilidade de agente já pré-carregada.

Documentação

webapp-walkthrough — System Instructional Video (All Features)

Turn a "finished system" into a "tutorial that can be shown directly to users/students/reviewers".

Two modes:

ModeInputOutputUse Case
Instructional Video (Recommended, Main Mode)lesson.json lesson scriptChaptered instructional video + teaching script + feature checklistFor explaining "how each feature is used" and covering all features
Auto-browse (Legacy)Auto-discovers plan.jsonTab-by-tab demo video + walkthrough scriptFor quickly scanning each page for white screens/errors

Underlying technology: ego-browser (ego lite) for real clicks/input → Page.captureScreenshot for periodic frame capture → Windows SAPI Chinese TTS → ffmpeg for composition (intro/chapter cards/subtitles/outro). The teaching layer (chapter cards, cursor, element highlights, click ripples, lower-third title bar) is implemented via injected DOM overlays and is captured directly into the video.

When to Use

  • System launch/delivery, needing a "feature-complete user instructional video"
  • Need to show students/clients/reviewers "how each feature works and how to read the results"
  • Opportunistic discovery of 500 errors, white screens, and other basic issues (the generated feature checklist flags anomalies)

Not suitable for: pixel-perfect animations (frame capture ~2–4 fps); recording desktop/other applications.

Prerequisites

DependencyCheckIf Missing
ego-browserScript auto-scans C:\Program Files\Citro Labs\ego lite\Application\*\ego-browser.exe for highest versionInstall per ~/.agents/skills/ego-browser/references/install.md
ffmpegffmpeg -version or winget package pathwinget install Gyan.FFmpeg
Python 3.10+python --versionAlready installed
numpy / pillowpython -I -c "import numpy, PIL"pip install numpy pillow
Chinese TTSedge_tts installed with network access (preferred); or SAPI with Microsoft Huihui DesktopFalls back to SAPI if edge unavailable; any zh-CN voice

The target system must be locally accessible (http://127.0.0.1:xxxx) and initialized with demo data. If login is required, credentials should be written into the login step of lesson.json (the instructional video typically includes the login process itself).

Directory Convention

~/ego-walkthrough/
├── active.txt                 # Points to current working directory (written by run_all.py automatically)
└── <project>/
    ├── config.json            # Base configuration (system name, address, viewport, voice, etc.)
    ├── lesson.json            # Lesson script (core input for main mode)
    ├── plan.json              # Auto-discovered (auto-browse mode only)
    └── run/                   # Current run outputs
        ├── frames/            # Captured frames + index.json
        ├── shots/             # One screenshot per feature point
        ├── steps.jsonl        # Step-by-step stream (single source of truth for narration and editing)
        ├── meta.json
        ├── 教学讲稿.md         # Chapter timeline + narration text + key points + anomalies
        ├── 功能点清单.md       # Full feature checklist (including status, screenshots)
        ├── narration.wav / narration.srt / timeline.json
        └── concat.txt

Quick Start (Instructional Video)

1. Write config.json

Copy from templates/config.json, minimally modify:

{
  "systemName": "基于BERT的学生评教文本情感分析系统",
  "baseUrl": "http://127.0.0.1:8037",
  "outDir": "D:/work/xxx/video_demo",
  "recorder": { "width": 1440, "height": 860, "jpegQuality": 70 },
  "voice": { "name": "Microsoft Huihui Desktop", "rate": 1 }
}
  • outDir: Output directory (preferred); falls back to <projectDir>/video_demo/, then D:/video_demo/.
  • recorder: Shooting viewport, determines video resolution; jpegQuality 68–75 is balanced.

2. Write lesson.json (Lesson Script)

This is the core of the instructional video: organized by "chapter → feature point", each step clearly describes "what this step teaches, how to operate it, how to read the result, and what key points exist". Refer to templates/lesson.example.json.

{
  "systemName": "…",
  "baseUrl": "http://127.0.0.1:8037",
  "cardMs": 2000,
  "intro": "Opening remark, one sentence explaining what this video covers.",
  "outro": "Closing remark.",
  "chapters": [
    {
      "title": "登录与工作台",
      "summary": "What this chapter covers (will be displayed on the chapter card).",
      "steps": [
        {
          "title": "账号登录",
          "url": "/login",
          "narration": "This sentence is the voiceover and also the subtitle. Colloquial, explaining one feature point at a time.",
          "tips": "Optional, small text shown in the lower third",
          "actions": [
            { "type": "fill", "selector": "input[placeholder=\"用户名 / 学号\"]", "value": "admin" },
            { "type": "fill", "selector": "input[placeholder=\"密码\"]", "value": "123456" },
            { "type": "click", "selector": "button.el-button", "label": "点击登录" },
            { "type": "wait", "ms": 1500 }
          ],
          "holdMs": 1400
        }
      ]
    }
  ]
}

Field Description:

FieldRequiredDescription
cardMsChapter card duration in ms, default 2000
intro / outroIntro/outro narration; auto-generated if omitted
chapters[].title✅Chapter name (used for chapter card, lower third, teaching script)
chapters[].summary✅Chapter introduction (subtitle of the chapter card + narration for that chapter)
chapters[].cardSet to false to skip the chapter card for this chapter
steps[].title✅Feature point name (lower third main title + teaching script/checklist row name)
steps[].urlRoute for this feature point; navigation occurs before operation
steps[].narration✅Explanation text for this step (voiceover + subtitle)
steps[].tipsYellow key-point small text in the lower third
steps[].actionsSequence of operations (see table below); empty means just display the page
steps[].highlightTarget to highlight after completion: { "selector": "..." } or { "text": "..." }
steps[].holdMsExtra hold time after operations, default = settleMs
steps[].settleMsOverride for stabilization wait time after navigation for this step

Supported type in actions:

typeParametersEffect
fillselector (or omitted=first visible input), valueClears and types character by character (visible typing for ≤44 characters)
clicktext or selector; findSelector (for highlight positioning); label; msClicks, draws cursor/highlight/ripple
gotourl, msRoute navigation
presskeyKeyboard press (e.g., Enter)
hovertext/selectorHover
scrolldyPage scroll
waitmsPure wait (for API/animation)

When clicking a button in a multi-row table, use selector: ".el-table__body .el-button >> nth=0", and findSelector: ".el-table__body .el-button" to specify the highlight target, to avoid "matched 2 elements" errors.

3. One-Click Video Generation

python -I scripts/run_all.py ~/ego-walkthrough/<project>

If lesson.json is detected in the working directory, it runs in instructional video mode (skipping auto-discovery). Four phases: recording → narration/subtitles/teaching script → composition, with real-time logging.

Alternatively, use --lesson path/to/lesson.json to explicitly specify (copied to working directory).

4. Fine-Tuning (Optional)

To change the narration of a single step without re-recording, write a narration.json (keys are step indices) and re-run only narration and composition:

python -I scripts/run_all.py ~/ego-walkthrough/<project> --narrate-only --script narration.json

TTS Voices (voice)

The TTS engine can be switched, configured in config.json under voice:

engineExampleDescription
edge (Recommended){"engine":"edge","name":"zh-CN-YunxiNeural","rate":1}Microsoft neural voices, high naturalness, requires internet (edge-tts)
sapi{"engine":"sapi","name":"Microsoft Huihui Desktop","rate":0}Offline Windows SAPI, more robotic
AutoOnly fill nameIf name starts with zh-CN-, uses edge; otherwise uses sapi

Common Chinese neural voices (for the name field):

  • Female: zh-CN-XiaoxiaoNeural (Xiaoxiao·warm), zh-CN-XiaoyiNeural (Xiaoyi·lively), zh-CN-liaoning-XiaobeiNeural (Northeastern dialect·humorous), zh-CN-shaanxi-XiaoniNeural (Shaanxi dialect·bright)
  • Male: zh-CN-YunxiNeural (Yunxi·sunny), zh-CN-YunyangNeural (Yunyang·steady professional), zh-CN-YunjianNeural (Yunjian·passionate), zh-CN-YunxiaNeural (Yunxia·cartoonish cute)

Optional fields: volume (e.g., "+0%"), pitch (e.g., "+0Hz"), edgeRate (e.g., "+10%", takes precedence over rate). If edge synthesis fails (no network/not installed), it automatically falls back to SAPI offline voice without interrupting video generation.

To use your own real voice: ① Send your recorded audio files segmented by speech lines, and the script will replace them with external audio tracks (100% real voice); ② Integrate a voice-cloning TTS (CosyVoice / GPT-SoVITS / Volcano / MiniMax / Azure) and replace the synth module. The built-in engine does not include the ability to clone a recording and generate arbitrary speech.

Upload to Cloud Effect (alongside thesis)

After video generation, the output can be automatically uploaded to a specified directory in a Codeup repository on Alibaba Cloud Effect, by default placed in the same directory as the thesis (论文/). Configure publish in config.json:

"publish": {
  "enabled": true,
  "repo": "https://example-cn-beijing.devops.aliyuncs.com/codeup/bishe007.git",
  "branch": "main",
  "dir": "论文",
  "subdir": "",
  "filename": "{system}_教学视频_{date}.mp4",
  "includeDocs": false,
  "localRepo": "D:/existing_clone_path (optional)",
  "commit": "docs(演示视频): 新增《{system}》教学视频({date})"
}
  • Trigger: publish.enabled=true or command line --publish; --no-publish skips; --dry-run-publish for rehearsal only.
  • dir defaults to 论文 (same directory as thesis); can also use "dir":"论文","subdir":"系统演示视频" for a subdirectory.
  • Credentials: Reuses local git credentials (Git Credential Manager); can also configure publish.token (+ user) for temporary authentication, not stored on disk.
  • Safety: Only git adds the target files in the target directory; no force push; aborts if localRepo has unpushed commits or tracked changes (override with --force).
  • Standalone execution: python -I scripts/publish.py <working_directory> --video <output.mp4> [--dry-run].

One-Click: Just Provide the Cloud Effect Repo ID (e.g., bishe-lw)

python -I scripts/make.py 007

Automatically completes: Parse repo ID (reuse bishe-lw cloud effect config and token) → Clone to D:\Tools_Home\DeepseekHarness_Load\video\<project_id>\repo → Auto-start the system → Generate lesson script (if not provided, auto-enumerate menus) → Record/Synthesize → Upload back to Cloud Effect (defaults to 论文/ directory).

Common parameters:

ParameterEffect
--lesson lesson.jsonSpecify lesson script (higher quality; if omitted, auto-generates via menu enumeration)
--url http://127.0.0.1:8080Skip auto-start if system is already running
--voice zh-CN-YunxiNeuralTTS voice (default Xiaoxiao)
--no-publishLocal output only, no upload
--workdir-root <directory>Local root directory (default D:\Tools_Home\DeepseekHarness_Load\video)
--username/--passwordAuto-login credentials (default admin/123456)

Local directory structure: D:\Tools_Home\DeepseekHarness_Load\video\<project_id>\: repo\ (clone), config.json, lesson.json, video_demo\*.mp4, run\ (intermediate files).

Auto-start supports Python (FastAPI/Flask)+SQLite final-year projects with a frontend/dist directory; for Java/Spring or frontends that require building, use --url to specify a running address (see troubleshooting §8).

Let the Agent Write lesson.json for You (Recommended Workflow)

  1. First read the route tables / menu components / each page's vue in the system source code to list "module → page → feature point (buttons, forms, queries, modals, charts)".
  2. Write the lesson.json following the "chapter → feature point" structure, ensuring every feature point has a corresponding step; each step's narration should be "what this is + how to operate + how to read the result".
  3. First run a short segment (1–2 chapters) to verify selectors and login, then run the full set.

This produces not a "click through each tab" demo, but a "explain how each feature is used" tutorial.

Auto-Browse Mode (Legacy Compatible)

If no lesson.json is present, it falls back to the old logic: first discover a plan, manually review it, then run the entire process.

python -I scripts/run_all.py <project> --discover-only   # Only generate plan.json, manually review
python -I scripts/run_all.py <project>                    # Auto-browse when lesson.json not present
  • menuSelector: Sidebar selector. Element Plus .el-menu-item; Ant .ant-menu-item; Native aside a, nav a.
  • expandSubmenus (default true): Automatically expand collapsed submenus before discovery to avoid missing second-level menus.
  • Only clicks items on the safeButtons whitelist (query/refresh type), never delete/submit/payment.

Recording Principle & Hard Constraints (ego lite 0.6.3.17 Tested)

  • Frame capture uses page.cdp("Page.captureScreenshot", {format:"jpeg"}) for periodic polling, deduplicates by screen changes, saves as jpg, and records timestamps. Approximately 2–4 fps; static pages only output frames on change; the final video uses "pause + narration" for pacing.
  • Do NOT use Page.startScreencast + Page.screencastFrameAck: The new version of ego's Page.cdp forbids sessionId in params, but the ack requires it, causing only 1–3 frames before freezing (tested). The captureScreenshot path is stable.
  • Chapter cards/cursor/highlights/lower-third/ripples are injected as #wt-ui overlay layers (position:fixed; z-index extremely high, pointer-events:none) into document.body. Full-page navigation (goto) clears the overlay, so the script re-injects after each navigation.
  • Viewport is fixed using Emulation.setDeviceMetricsOverride to recorder.width × recorder.height to avoid inconsistent frame sizes.
  • Positioning always uses temporary data-wt markers or semantic selectors, never changes the target element's id (would break the page's own getElementById, which has been tested to cause loss of query box values).
  • Recording state (login tokens) is stored in the browser's same-origin localStorage; subsequent goto operations maintain login.

Output Artifacts

FileDescription
<outDir>/<systemName>_教学_<yyyyMMdd-HHmm>.mp4Final video: intro card + chapter cards + feature-by-feature screens (with cursor/highlights/lower-third) + narration + burned-in subtitles + outro card
run/教学讲稿.mdChapter timeline + step-by-step narration + key points + anomaly list, directly editable
run/功能点清单.mdFull feature checklist: Feature point / Page / Status (✅Normal / ❌Error) / Screenshot
run/narration.srtExternal subtitle file
run/shots/*.pngOne screenshot per feature point
run/steps.jsonlStructured stream (including chapters, feature points, operations, anomaly judgments)

Output Specifications

  • Video: H.264 / yuv420p / 30fps / AAC mono, resolution = recorder.width × recorder.height
  • Structure: Intro card → (Chapter card → feature points in that chapter) xN → Outro card
  • Naming: <systemName>_教学_<yyyyMMdd-HHmm>.mp4

Common Failures

See references/troubleshooting.md. Most frequent:

  1. Stuck or only a few frames → Using old screencast path, or frame capture interval too large; this version uses captureScreenshot polling.
  2. plan.json module count is 0 (auto-browse) → menuSelector is wrong, or menu is inside an iframe.
  3. Click error matched 2 elements → Add >> nth=0 or use a more precise selector.
  4. No audio → SAPI voice name mismatch; leave voice.name empty to default to zh-CN.
  5. Lesson script step selector not found → The step logs an anomaly and continues; check run/shots/ and steps.jsonl, then modify lesson.json and re-run.

Individual skills in this repo

This repo contains 1 individual skill — each has its own dedicated page.

Habilidades Relacionadas