Skip to content
Back to search

agent-screenplay

Beautiful screen recordings, made by your favorite AI agent.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/gmpetrov/agent-screenplay with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/gmpetrov/agent-screenplay'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/gmpetrov--agent-screenplay/badge.svg)](/listings/gmpetrov--agent-screenplay)

HTML

<a href="/listings/gmpetrov--agent-screenplay"><img src="/api/listings/gmpetrov--agent-screenplay/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

npx agent-screenplay init

The npm package is `agent-screenplay`; installed globally (`npm i -g agent-screenplay`), its command is `screenplay`.

`init` downloads Chromium (once), adds the Screenplay MCP server to the agents it finds (Claude Code, Codex, Cursor), and installs the guide that teaches them to make good videos. Restart your agent after it.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 186 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. # Screenplay
  2. https://github.com/user-attachments/assets/dd9898da-4900-4a91-8620-57a860c46093
  3. [![npm](https://img.shields.io/npm/v/agent-screenplay)](https://www.npmjs.com/package/agent-screenplay) [![MIT license](https://img.shields.io/badge/license-MIT-blue)](LICENSE) [![MCP Registry](https://img.shields.io/badge/MCP_Registry-io.github.gmpetrov%2Fagent--screenplay-purple)](https://registry.modelcontextprotocol.io/v0/servers?search=io.github.gmpetrov/agent-screenplay) [![Made with Brigade](https://img.shields.io/badge/made_with-Brigade-855ef6?logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAiIGhlaWdodD0iMTAwIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJnIiB4MT0iMCIgeTE9IjAiIHgyPSIxIiB5Mj0iMSI+PHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjYTU4YWY5Ii8+PHN0b3Agb2Zmc2V0PSIuNTUiIHN0b3AtY29sb3I9IiM4NTVlZjYiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiM2YzQzZTYiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLjAgMC4wKSBzY2FsZSgxLjApIj48cGF0aCBmaWxsPSJ1cmwoI2cpIiBkPSJNNTYgMEE0NCA1NiAwIDAgMSAxMDAgNTZBNDAgNDQgMCAwIDEgNjAgMTAwQTYwIDU0IDAgMCAxIDAgNDZBNTYgNDYgMCAwIDEgNTYgMFoiLz48ZyBmaWxsPSJub25lIiBzdHJva2U9IiMxOTBkMmIiIHN0cm9rZS13aWR0aD0iNiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIj48cGF0aCBkPSJNMzQuNSA0NFE0MC41IDI4IDQ2LjUgNDQiLz48cGF0aCBkPSJNNTMuNSA0NFE1OS41IDI4IDY1LjUgNDQiLz48L2c+PC9nPjwvc3ZnPg==)](https://www.brigade.lol/?utm_source=github&utm_medium=readme&utm_campaign=agent-screenplay)
  4. **Create beautiful screen recordings with one prompt.** Any website, yours or someone else's, or any desktop app. Works with Claude Code, Codex, Cursor and any MCP client.
  5. Ask your agent: *"Make a video that shows how human handoff works"*. The agent explores the site or app and writes a short **scenario**; Screenplay plays it in a browser (or a desktop app), films it, and edits the video like Screen Studio would: smooth cursor, automatic zooms that follow the action, click effects, callouts, spotlight, captions, title cards, and an optional voice-over.
  6. ![Storyboard of an example video](docs/handoff-storyboard.png)
  7. Screenplay contains no AI and needs no model key: your agent does the thinking, Screenplay does the filming and editing.
  8. ## Install
  9. ```bash
  10. npx agent-screenplay init
  11. ```
  12. The npm package is `agent-screenplay`; installed globally (`npm i -g agent-screenplay`), its command is `screenplay`.
  13. `init` downloads Chromium (once), adds the Screenplay MCP server to the agents it finds (Claude Code, Codex, Cursor), and installs the guide that teaches them to make good videos. Restart your agent after it.
  14. ## Use it
  15. In **Claude Code**, type `/screenplay` and say what you want:
  16. ```
  17. /screenplay Make a 30-second walkthrough of https://askli.co
  18. /screenplay Film how to invite a teammate in our app, with a French voice-over
  19. ```
  20. In **Codex, Cursor** or any agent with the MCP server, just ask: *"Make a screen recording of …"*. The agent explores the site, asks whether you want a voice-over, writes the scenario, films it, checks the storyboard and gives you the MP4. To change the look afterwards: `npx agent-screenplay style <scenario.json>`.
  21. Without MCP, any agent that can run commands can use the CLI directly:
  22. ```bash
  23. npx agent-screenplay guide # how to write a good scenario
  24. npx agent-screenplay check demo.json # plays the steps fast, without filming
  25. npx agent-screenplay record demo.json # films and edits → demo.mp4 + demo.storyboard.png
  26. npx agent-screenplay render demo.json # re-edits the last take (style, zoom, text, voice) without filming
  27. ```
  28. Requirements: Node 20+. ffmpeg and the drawing library ship with the package.
  29. ## A scenario
  30. ```json
  31. {
  32. "url": "https://app.example.com/inbox",
  33. "style": { "background": "dawn" },
  34. "steps": [
  35. { "title": "Human handoff, in one click", "subtitle": "New in 2.4" },
  36. { "click": "text=Camille Laurent", "say": "When the AI agent gets stuck, the conversation lands in your inbox." },
  37. { "callout": "role=button[name='Take over']", "text": "Take over from the AI agent" },
  38. { "click": "role=button[name='Take over']", "say": "One click, and the conversation is yours." },
  39. { "type": "Hi Camille, I'm on it.", "into": "placeholder=Write a reply…" },
  40. { "click": "role=button[name='Send']" },
  41. { "highlight": "text=Assigned to you", "text": "Your teammates see it's yours" },
  42. { "end": "Available today on every plan" }
  43. ]
  44. }
  45. ```
  46. - **Targets** name elements the way people see them: `text=…`, `role=button[name='…']`, `label=…`, `placeholder=…`, `testid=…`, `css=…` (web only), `at=x,y` (desktop apps without accessible elements only).
  47. - **Actions**: `goto`, `click`, `type`, `press`, `hover`, `scroll`, `select`, `wait`, `pause`.
  48. - **Direction**: `title` and `end` cards, `callout` (a bubble pointing at an element), `highlight` (spotlight), `zoomTo`, and on any step `say` (caption and voice), `zoom`, `hold`.
  49. - **Style**: background preset (soft light gradients: `dawn`, `iris`, `citrus`, `apricot`, `coral`, `blaze`, `cloud`, `glacier`, `tide`, `meadow`), your own gradient, a color or an image; padding, corner radius, shadow, the cursor (`arrow` by default, a rounded arrow in the accent color; `macos`, `dot`) and its click effect (`ripple` by default; `rays`, `confetti`, `sparkle`), maximum zoom, browser frame, accent color. See [Style](#style).
  50. - **Output**: 1920×1080 at 30 fps by default; any size up to 4K, 24 to 60 fps, optional GIF.
  51. The full format is the JSON schema in [`schema/scenario.schema.json`](schema/scenario.schema.json) (`npx agent-screenplay schema`), and the agent guide in [`skills/screenplay/SKILL.md`](skills/screenplay/SKILL.md). Examples are in [`examples/`](examples).
  52. `check` and `record` really perform the steps (a "Send" click sends): point scenarios at a demo account or a staging environment.
  53. ## Style
  54. Set the look by eye: `npx agent-screenplay style demo.json` opens an editor in your browser, on a frame of the last recording. Pick a gradient (or make your own), a color or an image (drop it on the page), set the padding, corners and shadow, then save to **this video** or to **all videos**, and render without filming again.
  55. ![The style editor](docs/style-editor.png)
  56. "All videos" writes `screenplay.config.json`, which applies to every scenario in its folder and below; a scenario's own `style` wins, setting by setting. The same settings by hand:
  57. ```json
  58. {
  59. "style": {
  60. "background": { "gradient": ["#0ea5e9", "#6366f1"], "angle": 135 },
  61. "padding": 96,
  62. "radius": 20,
  63. "shadow": true
  64. }
  65. }
  66. ```
  67. Title and end cards (`title` and `end` steps) are **off by default**: turn them on with `"cards": true`, or with the switch in the editor.
  68. `background` is a preset name (`dawn` by default; earlier presets such as `aurora` or `ocean` still work), a color (`"#0f172a"`), an image path (relative to the file that sets it), or `{ "gradient": [2 to 4 colors], "angle": degrees }`.
  69. ## Signing in
  70. - `npx agent-screenplay login https://app.example.com` opens a browser window: sign in, then **close the window**. The session is saved to `.screenplay/auth.json` (while you go, and when the window closes; Enter in the terminal works too). Use it with `"auth": { "storageState": ".screenplay/auth.json" }`. Keep that file out of git.
  71. - **Bot checks** (Cloudflare's "Just a moment…"): Screenplay's browser presents itself as an ordinary Chrome, so the checks that need no person pass by themselves. When a site asks a person to prove they are human, `check` says so: run `login` on that site, pass the check in the window, close it, and set `auth.storageState`. Some sites ask again on every visit; those cannot be filmed automatically.
  72. - Agents without a screen can sign in with steps: `{ "type": "${EMAIL}", "into": "label=Email" }`, `{ "type": "${PASSWORD}", "into": "label=Password", "secret": true }`. `${VAR}` is read from the environment; `secret` masks the text in captions and logs.
  73. ## Voice-over
  74. Off by default. Turn it on per scenario:
  75. ```json
  76. "voice": { "enabled": true, "language": "fr" }
  77. ```
  78. Each step's `say` is spoken, and the video waits for each sentence to finish, so the voice sets the pace. Three ways to get the voice:
  79. - **[Cartesia](https://cartesia.ai)**: set `CARTESIA_API_KEY`.
  80. - **[ElevenLabs](https://elevenlabs.io)**: set `ELEVENLABS_API_KEY`. When both keys are set, Cartesia is used unless `"provider": "elevenlabs"`.
  81. - **Your own audio files**, with no key: give a step `"audio": "voice/02.mp3"` (MP3, WAV, M4A…), for instance lines you generated in ElevenLabs' or Cartesia's web app, or with a local TTS model (Piper, Kokoro…) that your agent runs for you. The agent can write the narration for you, one line per step, ready to paste there. Adding audio needs no new filming: `render`.
  82. Narration is cached: re-rendering with unchanged text costs nothing. `voice.id` picks another voice, `voice.speed` its pace. Without voice, `say` still shows as a caption.
  83. ## Desktop apps
  84. Use `"app": "<name>"` instead of `"url"`. The steps are played through the operating system's accessibility APIs by [agent-desktop](https://github.com/vercel-labs/agent-desktop) (installed with Screenplay), and the window is filmed with ffmpeg without the system cursor; the editing is the same as for websites.
  85. | | Needs |
  86. |---|---|
  87. | macOS | Allow your terminal or agent app in System Settings → Privacy & Security → **Screen Recording** and **Accessibility** |
  88. | Windows | Nothing |
  89. | Linux | An **X11** session with the AT-SPI accessibility bus (standard on GNOME). Wayland is not supported: it blocks screen capture and synthetic input by design |
  90. Desktop recordings need a real screen: they cannot run in a headless container. Websites can.
  91. While Screenplay drives the computer, a pill at the top of the screen says so ("Screenplay is recording", or "rehearsing" during a check), with a **Stop** button that ends the run at once. The pill is left out of the capture, so it is never in the video. macOS and Windows; `SCREENPLAY_INDICATOR=0` turns it off.
  92. ### The whole screen
  93. `"screen": true` films the whole main screen instead of one window, for videos that go from one app to another or use the menu bar. `{ "open": "<app>" }` launches an app or brings it to the front, a step's `"app"` acts in another app, and `"surface": "menubar"` (or `menu`, `sheet`, `popover`, `alert`) finds elements outside the app's window. Everything on screen is filmed, desktop icons and notifications included: tidy the screen first; on macOS `"hideOthers": true` hides the other apps.
  94. ## How it works
  95. ```
  96. scenario.json ──▶ play + film ──────────────────▶ take (frames + timeline of actions)
  97. web: Playwright, headless Chromium │
  98. desktop: agent-desktop + ffmpeg ▼
  99. edit: time remap (long waits sped up),
  100. camera (spring zooms), cursor path,
  101. overlays, captions, voice track
  102. │
  103. ▼
  104. draw each frame (Skia) → ffmpeg → MP4
  105. ```
  106. Screenplay knows exactly where and when each click happens, and the box of every element it acts on, so zooms are framed on the element instead of guessed from mouse movement. The cursor is drawn during editing, along a smooth human-like path.
  107. ## Development
  108. ```bash
  109. npm install
  110. npm run build
  111. npm test # unit tests
  112. npm run test:e2e # records a real scenario in headless Chromium and talks to the MCP server
  113. ```
  114. ### Releasing
  115. ```bash
  116. npm version patch --no-git-tag-version # or minor / major; also updates src/version.ts
  117. ```
  118. Merge that change, then tag the commit on main:
  119. ```bash
  120. git tag v0.1.4 origin/main && git push origin v0.1.4
  121. ```
  122. The tag starts `.github/workflows/release.yml`. It checks that the tag matches the version and is on main, runs the tests, publishes to npm (with provenance) and creates the GitHub release with notes from the merged pull requests. A version like `0.2.0-beta.1` goes to npm's `next` tag. Creating a release in GitHub's UI with a new tag works too.
  123. `examples/demo-app` is a small web app for trying scenarios; `examples/desktop-app/notes.py` is a GTK app for desktop recording on Linux.
  124. ## Made with Brigade
  125. Screenplay is built by AI teammates on [Brigade](https://www.brigade.lol/?utm_source=github&utm_medium=readme&utm_campaign=agent-screenplay): teammates that write your code, answer your customers and run your marketing, on the Claude or ChatGPT plan you already pay for.
  126. ## License
  127. MIT. Bundled: [Inter](https://rsms.me/inter/) (SIL Open Font License), ffmpeg through `ffmpeg-static` (GPL), agent-desktop (Apache-2.0).

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.