screenci 0.0.17 → 0.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,16 +1,28 @@
1
1
  ---
2
2
  name: screenci
3
- description: Record ScreenCI videos in an already-initialized project by editing `.video.ts` files and running the Screenci workflow.
3
+ description: Create, show, and guide with ScreenCI videos in an already-initialized project by editing `.video.ts` files and running the Screenci workflow.
4
4
  allowed-tools:
5
5
  - Bash(screenci:*)
6
6
  - Bash(npx:*)
7
7
  - Bash(npm:*)
8
8
  ---
9
9
 
10
- # ScreenCI
10
+ # ScreenCI Video and Guide Skill
11
11
 
12
12
  Use this skill when the task is about ScreenCI video recording workflows in an existing project, or updating `.video.ts` files and `screenci.config.ts`.
13
13
 
14
+ Trigger this skill when the user asks to:
15
+
16
+ - create a video
17
+ - show a flow as a video
18
+ - create a guide/demo video
19
+
20
+ Routing rules:
21
+
22
+ - If the user provides a URL, always use the `playwright-cli` skill first to inspect the real page flow and selectors before editing the ScreenCI script.
23
+ - If the user provides source code for the target page/component, that usually means browser exploration is not required first.
24
+ - If the request is only about application/source-code changes (not recording or `.video.ts` updates), do not use this skill.
25
+
14
26
  ## Quick Start
15
27
 
16
28
  Assume the project is already initialized. Add or edit video scripts in `videos/`.
@@ -19,7 +31,7 @@ If you are creating new videos, remove the starter `videos/example.video.ts` fil
19
31
 
20
32
  ```bash
21
33
  # iterate locally without recording
22
- npx screenci dev
34
+ npx screenci test --ui
23
35
 
24
36
  # verify repeatedly until green
25
37
  npx screenci test
@@ -42,13 +54,14 @@ ScreenCI uses Playwright-style `.video.ts` files and adds recording-specific hel
42
54
  **Every video MUST follow these conventions:**
43
55
 
44
56
  1. **Narration on every video (required, no exceptions)** — always define `createNarration({ ... })` and add narration to every `.video.ts` file. Videos without narration are not acceptable.
45
- 2. **Hide initial setup** — wrap authentication, navigation to the starting page, loading spinners, and any other non-demo boilerplate in `hide()` so they are cut from the final recording.
57
+ 2. **Hide initial setup** — the initial page load should almost always be wrapped in `hide()`. Keep authentication, navigation to the starting page, loading spinners, cookie banner dismissal, and any other non-demo boilerplate inside that hidden block so they are cut from the final recording.
46
58
  3. **Use autoZoom sparingly on large page areas** — add `autoZoom()` only for larger sections that benefit from camera guidance (e.g. a full form, a full dialog, or a broad list area). Keep usage sparse, and make sure each `autoZoom()` block includes multiple related interactions (typing, selecting, toggling, confirming, etc.), not just a single click.
59
+ 4. **End autoZoom before page changes** — it is better to let an `autoZoom()` block finish before a navigation/page change. Staying zoomed during navigation is confusing. Start a new `autoZoom()` block on the next page/section when needed.
47
60
 
48
61
  ## Command Notes
49
62
 
50
- - `screenci record` runs the recording flow. By default it uses Podman or Docker unless `--no-container` is used.
51
- - `screenci dev` runs Playwright in UI mode for fast iteration without screen capture.
63
+ - `screenci record` runs the recording flow in Podman or Docker.
64
+ - `screenci test --ui` runs Playwright in UI mode for fast iteration without screen capture.
52
65
  - `screenci retry` uploads the latest `.screenci` output when API configuration is available.
53
66
 
54
67
  ## Recording Workflow
@@ -57,7 +70,7 @@ ScreenCI uses Playwright-style `.video.ts` files and adds recording-specific hel
57
70
  2. Add or edit `.video.ts` files in `videos/`.
58
71
  Remove `videos/example.video.ts` if you are creating new videos and do not need the starter video.
59
72
  For narration, define `const narration = createNarration({ ... })` near the top of the file and trigger lines with `await narration.someKey` inside the test body.
60
- 3. Run `npx screenci dev` to validate selectors and flow.
73
+ 3. Run `npx screenci test --ui` to validate selectors and flow.
61
74
  4. Run `npx screenci test` until it passes.
62
75
  5. Run `npx screenci record` to produce `.screenci/<video-name>/recording.mp4` and `data.json`.
63
76
 
@@ -9,7 +9,6 @@ If you are creating new videos, remove the starter `videos/example.video.ts` fil
9
9
 
10
10
  ```bash
11
11
  npx screenci record
12
- npx screenci record --no-container
13
12
  npx screenci record -c screenci.config.ts
14
13
  ```
15
14
 
@@ -23,7 +22,6 @@ npx screenci record -c screenci.config.ts
23
22
  ## Runtime Behavior
24
23
 
25
24
  - By default, recording runs in Podman or Docker.
26
- - `--no-container` runs directly on the host.
27
25
  - Playwright arguments can be passed through after the command.
28
26
  - When API configuration and `SCREENCI_SECRET` are available, uploads may run after recording.
29
27
 
@@ -31,7 +29,7 @@ npx screenci record -c screenci.config.ts
31
29
 
32
30
  ```bash
33
31
  # first verify the flow
34
- npx screenci dev
32
+ npx screenci test --ui
35
33
 
36
34
  # then record
37
35
  npx screenci record
@@ -48,7 +46,7 @@ npx screenci record # capture the final recording
48
46
 
49
47
  ## Required Conventions
50
48
 
51
- These are not optional — every `.video.ts` file must follow all three:
49
+ These are not optional — every `.video.ts` file must follow all four:
52
50
 
53
51
  ### 1. Narration on every video (required, no exceptions)
54
52
 
@@ -56,12 +54,16 @@ Always add `createNarration({ ... })` to every video file. Videos without narrat
56
54
 
57
55
  ### 2. Hide initial setup
58
56
 
59
- Always wrap initial setup in `hide()`: login flows, navigation to the starting page, loading states, cookie banners, and any other boilerplate that is not part of the feature being demonstrated. If it is not the point of the video, hide it.
57
+ Always wrap initial setup in `hide()`, especially the initial page load: login flows, navigation to the starting page, loading states, cookie banners, and any other boilerplate that is not part of the feature being demonstrated. It is also a good place to click away cookie banners so they never appear in the final video. If it is not the point of the video, hide it.
60
58
 
61
59
  ### 3. Use autoZoom sparingly on large page areas
62
60
 
63
61
  Add `autoZoom()` only for larger sections that benefit from camera guidance — for example a full form, full dialog, or broad list area. Use `autoZoom()` sparingly, and ensure each block includes multiple related interactions (typing, selecting, toggling, confirming, etc.), not just a single click.
64
62
 
63
+ ### 4. End autoZoom before page changes
64
+
65
+ Let each `autoZoom()` block complete before navigation/page changes. Staying zoomed during a route transition is confusing for viewers. After the new page is ready, start a new `autoZoom()` block for that page section if needed.
66
+
65
67
  ## Constraints
66
68
 
67
69
  - ScreenCI enforces single-worker recording behavior.