Logo von Record And Replay

Record And Replay

Community
ugarchance
record-and-replay

Record the user's actions — browser (Playwright event stream + trace) or native desktop (lightweight event/window/screenshot stream) — on macOS, Windows and Linux for up to 30 minutes, then turn the demonstration into a reusable agent skill. Use when the user asks you to watch them perform a task, record a workflow, or create/refine a skill from their demonstration. Agent-agnostic — works in Claude Code, Codex, opencode, or any agent with shell access.

Übersicht

Herausgeberugarchance
Repositoryrecord-and-replay-skill
Skill-Namerecord-and-replay
Sterne
50
Forks
5
Mitgelieferte Dateien
17
LizenzMIT
Links
  • Anweisungen in Markdown

    Eine SKILL.md-Datei, die das Modell bei Bedarf lädt. So werden nur dann Token verbraucht, wenn eine Anfrage tatsächlich dazu passt.

  • Funktioniert mit jedem LLM

    KI-Skills bestehen aus reinem Markdown, nicht aus anbieterspezifischem Code. Daher funktionieren sie mit GPT, Claude, Gemini, Grok oder einem lokalen Modell.

  • Mitgelieferte Dateien: 17

    Skripte, Vorlagen und Referenzmaterial, die das Modell bei der Arbeit lesen kann. Die Dateien sind schreibgeschützt und werden niemals ausgeführt.

  • Open Source

    Von ugarchance auf GitHub veröffentlicht. Prüfen Sie vor der Installation die Quelldateien.

Installation

Installieren Sie den KI-Skill Record And Replay in TypingMind, um ihn mit jedem LLM zu nutzen, oder fügen Sie ihn einem anderen Agenten hinzu, der SKILL.md lesen kann.

1

In TypingMind installieren

TypingMind installiert einen Skill direkt aus seinem GitHub-Ordner. Dabei liest die App SKILL.md, bündelt die Ressourcendateien und speichert das Ergebnis lokal.

  1. Öffnen Sie die App und gehen Sie zu Plugins → Skills.
  2. Wählen Sie „Von GitHub installieren“.
  3. Fügen Sie die unten angegebene URL des Skill-Ordners ein und bestätigen Sie.
    https://github.com/ugarchance/record-and-replay-skill/tree/main
  4. Aktivieren Sie den Skill in jedem Chat, in dem er verfügbar sein soll.
Plugins → Skills → Skill hinzufügen → Über GitHub-URL. Fügen Sie dann die Ordner-URL ein und klicken Sie auf „Weiter“.
2

In einem anderen Agenten installieren

Jeder Agent, der das Agent-Skills-Format unterstützt, kann diesen Skill nutzen. Kopieren Sie den Ordner in das Skill-Verzeichnis des jeweiligen Agenten.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ugarchance/record-and-replay-skill.git \
  .claude/skills/record-and-replay
Starten Sie Claude Code nach dem Kopieren neu, damit der neue Skill erkannt wird.

In TypingMind verwenden

Aktivieren Sie Record And Replay in einem beliebigen Chat in TypingMind. Den Rest übernimmt das Modell. Name und Beschreibung des Skills stehen im System-Prompt. Sobald eine Anfrage passt, lädt das Modell selbstständig die vollständigen Anweisungen — Sie müssen den Skill nie manuell aufrufen, und er verbraucht erst Token, wenn er tatsächlich genutzt wird.

Das Modell lädt Record And Replay automatisch, sobald eine passende Anfrage gestellt wird.

Funktioniert mit jedem KI-Modell

KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher ist Record And Replay nicht an das Modell gebunden, für das der Skill geschrieben wurde. Installieren Sie ihn einmal in TypingMind und nutzen Sie ihn mit GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder einem selbst betriebenen lokalen Modell — alles mit Ihren eigenen API-Schlüsseln.

  • Wird nur bei Bedarf geladen

    Der System-Prompt enthält nur den Namen und die Beschreibung. Die Anweisungen werden bei der ersten passenden Anfrage geladen. Ein ungenutzter Skill verursacht daher keine Kosten.

  • Modell im laufenden Chat wechseln

    Da der Skill aus Anweisungen statt aus Code besteht, funktioniert er auch nach einem Modellwechsel — das nächste Modell liest dieselbe SKILL.md-Datei.

Skill-Anweisungen

Dies ist der Inhalt von SKILL.md, den das Modell lädt. Lesen Sie ihn vor der Installation — ein Skill besteht aus Anweisungen, denen Ihr Modell folgt.

Record & Replay (browser + desktop)

Record & Replay lets an agent learn a user-demonstrated workflow and turn it into a reusable skill. Two modes:

  • Browser mode (default, richest evidence): a headed Playwright browser (system Google Chrome if available) records every user action into events.jsonl with multiple selector candidates, plus Playwright trace chunks (trace-NNN.zip). Works on macOS, Windows and Linux.
  • Desktop mode (native apps): a lightweight single-process recorder (pynput) captures global mouse/keyboard events, active-window changes and click-moment screenshots into desktop-events.jsonl + screens/ — Codex-parity (Codex records an event/context stream too, not video), ~1-3% CPU. Works on macOS, Windows and Linux (X11). See "Desktop recording" below.

Pick browser mode whenever the workflow is browser-only — its semantic selectors produce far better skills than desktop coordinates.

Setup (once)

bash
cd ~/.agents/skills/record-and-replay
node setup.mjs      # npm install + (Chromium only if Chrome is missing) + self-tests
node install.mjs    # link into agent skill dirs (symlink on macOS/Linux, junction on Windows)

Installs the playwright npm package. Browsers are NOT downloaded when Google Chrome is installed (the recorder uses channel: 'chrome'); otherwise the script downloads Chromium. Both scripts are cross-platform (Node).

Recording Workflow

  1. Start the recorder detached in the background only when the user is ready to begin. Always pass --name <slug> so the output directory is known up front:

    bash
    cd ~/.agents/skills/record-and-replay
    # macOS / Linux:
    nohup node scripts/recorder.mjs --minutes 30 --name <slug> [--url <startUrl>] \
      > ~/.agents/recordings/recorder.log 2>&1 &
    # Windows (PowerShell):
    Start-Process node -WindowStyle Hidden -ArgumentList "scripts/recorder.mjs","--minutes","30","--name","<slug>"

    Agents with a native background-run facility (e.g. Claude Code's Bash run_in_background) may use it instead. Outputs go to ~/.agents/recordings/<slug>/.

  2. Verify startup once (~2-3 seconds after launching — a single check, not a polling loop): confirm ~/.agents/recordings/<slug>/session.json exists with "status": "recording" (the recorder also prints a {"status":"recording",...} line to the log on success). If the check fails, read the log: recording_already_active (exit 2) means another recording holds the lock; launch_failed or a missing-module error means setup is needed. Report the actual problem instead of telling the user recording has begun.

  3. After the startup check, do not sleep, poll, or wait in a loop. End your turn: tell the user recording has begun, what the time limit is, and that a small floating control window (bottom-right, like Codex's recording controls) has a timer plus Pause/Resume, Stop and Discard (tap twice to confirm) buttons. Nothing is captured while paused — events and trace both stop. If they close the control window by accident it reopens itself; closing the main browser window also ends the session (avoid quitting the browser entirely with Cmd+Q, which can lose the last minute of trace). Pass --badge at start to use an in-page badge instead of the control window (fallback for exotic environments).

  4. Pause/resume (user asks you to pause, or you need to skip a sensitive stretch): touch ~/.agents/recordings/<slug>/PAUSE pauses within 2 seconds; delete the file to resume. The control-window buttons and the PAUSE file stay in sync; session.json carries the current paused state. Paused intervals appear as paused/resumed markers in events.jsonl and are absent from the trace.

  5. When the user says they are done:

    • If the process is still running, stop it gracefully: touch ~/.agents/recordings/<slug>/STOP (the recorder notices within 2 seconds and finalizes).
    • Read session.json — status: "recording" means still live; "completed" means outputs are final; "discarded" means the user pressed Discard — the evidence files were deleted, acknowledge and NEVER create a skill from it. endReason is one of user_stopped, user_discarded, browser_closed, stop_file, time_limit, signal, event_limit.
    • Inspect the captured events before responding: run node scripts/summarize.mjs <outDir> for a compact timeline, then read events.jsonl directly for steps that need detail.
  6. Cancellation is defined by content, not endReason: if the recording contains few or no kind: "dom" events — whatever the endReason — treat it as cancelled. Acknowledge, do not create or update a skill.

  7. If the recording contains enough information to identify a reusable workflow, create or refine a skill for it by default — even if the user did not explicitly ask. Do not stop after producing only a summary or a replay plan.

  8. If the recording is too thin or ambiguous to identify the workflow, do not guess. Explain what is unclear and ask the user for the missing pieces.

Concurrent recording

Only one recording can be active at a time (lock file ~/.agents/recordings/.lock). If the recorder exits with recording_already_active, do not force-start another; tell the user a recording is already in progress and ask whether to use it or stop it first. Restarting with the same --name is safe: the previous events.jsonl is preserved as a timestamped .bak, not appended to.

Interpreting Events

events.jsonl is the primary evidence; session.json gives timing/paths only; the trace-NNN.zip chunks are the DOM-level ground truth (npx playwright show-trace <outDir>/trace-*.zip; session.json's traceChunks lists them in order). Trace defaults to light mode — full DOM snapshots per action but no continuous screenshots (keeps CPU low). Start with --trace full when the user wants pixel-perfect visual evidence, or --trace off for the absolute minimum footprint.

Each line is one event: {seq, t (ms since start), kind, type, url, ...}.

  • kind: "page" — navigations, downloads, dialogs, tab opens/closes. Navigations segment the workflow into stages.
  • kind: "dom" — user actions. target.selectors carries multiple selector candidates: testId, role ({role, name}), id, nameAttr, text, css. Prefer them in that order when generating replay code; css is the last resort.
  • type: "input" events are debounced — one event per field with the final value (flushed on blur, Enter, change, and form submit). Password/credit-card/OTP-like fields (English and Turkish names: password, parola, şifre, kart, kimlik…) arrive pre-masked (***MASKED***, masked: true).
  • selection and copy events reveal what content the user was working with — often the best clue when the user refers to "this" or "the thing I selected". Secret-looking selections (OTPs, API keys, tokens) are masked. paste events carry only length/word-count, never content.
  • Sensitive data: masking is heuristic, not a guarantee — and it applies only to events.jsonl. The trace chunks are NOT masked: DOM snapshots contain raw input values (including values masked in the JSONL) and screenshots capture everything visible on screen (revealed tokens, 2FA codes, balances). Treat the entire ~/.agents/recordings/<name>/ directory as sensitive: inspect it locally only, never upload or commit it, and never quote literal secrets from it in summaries or generated skills — use placeholders or generic descriptions.

Creating Skills from a Recording

Before creating or refining a skill, read and follow the skill-creator skill if it is available in your environment. Create an actual discoverable skill (a SKILL.md folder), not just a Markdown runbook — and complete validation before reporting done.

  • Treat the recording as evidence of the user's intended outcome, not a script to replay pixel by pixel. If a connector/API/CLI/MCP tool can achieve the same outcome semantically (create a calendar event, open a PR, post a message), prefer it over UI automation.
  • When UI replay is genuinely needed, generate a Playwright script from scripts/replay-template.mjs: semantic locators (getByTestId > getByRole > getByLabel > getByText), a verification step after each critical action, secrets from env vars. Never use raw coordinates unless the event stream offers no better target.
  • The recorder's persistent profile (~/.agents/recordings/.browser-profile) keeps logins across sessions, so generated skills usually need no login steps. Security: that directory holds live authenticated session material (cookies/localStorage; Playwright launches Chrome with a mock keychain, so treat it as plaintext credentials). Never commit, share, or back it up unencrypted — and remember that any replay skill reusing it runs with the user's logins. For recordings on untrusted or high-sensitivity sites, prefer a disposable profile (--out plus a temp profile) or clear the profile afterwards.
  • Save new skills to ~/.agents/skills/<skill-name>/ and symlink them into the agent skill directories (see install.sh for the pattern) so every agent on this machine can use them.
  • Parametrize what varies (dates, amounts, names) and hard-code what does not. State the workflow's purpose and verification criteria in the generated SKILL.md.

Desktop recording (macOS, Windows, Linux/X11)

Setup: node setup.mjs (creates the minimal .venv-desktop Python env — pynput+mss+pillow, ~50 MB; requires uv).

Permissions (macOS): the recorder preflights them and reports machine-readable state, so never guess. start prints permissions: {inputMonitoring, screenRecording, grantTo} plus a warning when something is missing, and automatically pops the system dialog and opens the right Settings pane (--no-permission-prompt disables that; node scripts/desktop-record.mjs permissions runs it on demand). grantTo names the app the user must grant — a TCC grant binds to the .app bundle hosting the agent, not to Python, and that app must be restarted afterwards. Relay grantTo verbatim; telling the user "grant it to your terminal" is usually wrong.

The engine is a single-process recorder (~0-3% CPU): input event stream + active-window/title changes + a half-resolution JPEG at each click (max 1/700ms) → desktop-events.jsonl + screens/. On macOS each click also carries the accessibility description of the element under the cursor (kind: "target" line, joined to the click by forSeq) — a semantic target such as AXButton "Save" instead of a bare coordinate. Screenshots and AX queries run on a worker thread, never in the input callback (blocking there can get the macOS event tap silently disabled mid-recording).

This is Codex-parity: Codex's Record & Replay also records an event/context stream, not video — do not try to add continuous video/screen capture; it can overwhelm the machine.

Workflow mirrors browser mode (all commands cross-platform):

  1. Start (background is handled by the script): node scripts/desktop-record.mjs start <slug> [minutes] — outputs to ~/.agents/recordings/<slug>/. It returns only once capture is actually live, printing {"status":"recording",...}; on recording_already_active or start_failed, report the real problem. If the output carries a warning, capture is running but will produce nothing useful — relay the warning (with grantTo) before telling the user to start working.
  2. Verify once ~10s in: node scripts/desktop-record.mjs status <slug> — if the user is active but actionEvents stays 0, permissions are missing; report warning/grantTo. Then end your turn as in browser mode (no polling).
  3. Pause/resume: node scripts/desktop-record.mjs pause <slug> / resume <slug>. Pause closes the current segment and stops all capture; resume opens a new segment. status reports paused: true.
  4. Stop: node scripts/desktop-record.mjs stop <slug> — signal-free on every platform: the recorder watches a STOP file and finalizes gracefully (also auto-stops at the time limit; works from paused state too). cleanStop: false in the output means the fallback kill was needed.
  5. Inspect: python3 scripts/desktop-summarize.py <outDir> (Windows: python) → markdown timeline (window-titled sections, coalesced typing, clicks with their semantic target and screenshot ref; segments merged in order with pause markers). Read a few JPEGs from screens/ around the key moments for visual context.
  6. Then follow the same rules as browser mode: cancellation by content, create a skill by default, ask when ambiguous.

Desktop-specific caveats:

  • NO masking: every keystroke and screenshot is raw. Treat desktop-events.jsonl and screens/ as fully sensitive; never quote literal secrets — use placeholders.
  • Desktop events are still weaker than browser selectors. Prefer the captured AX target (role + title/description/value) over coordinates; when generating a replay skill, map actions to the shared computer-use skill's semantic tools (accessibility-tree find + click/type via cua-driver). Use the recording as intent evidence, and fall back to coordinates only when no target was captured.
  • One desktop recording at a time (~/.agents/recordings/.desktop-lock); browser and desktop recordings may run together only if the workflow genuinely spans both.
  • Restarting with the same slug archives the previous run's segments and screens/ as .bak — old evidence never leaks into the new timeline.

Files

FilePurpose
scripts/recorder.mjsBrowser recorder. --self-test runs a headless end-to-end check (throwaway profile).
scripts/summarize.mjsevents.jsonl → compact markdown timeline (--full for everything).
scripts/replay-template.mjsSkeleton for generated browser replay scripts.
scripts/desktop-record.mjsDesktop recorder driver: start/pause/resume/stop/status <slug>, permissions — cross-platform.
scripts/desktop-lite-recorder.pyDesktop engine: event/window/click-screenshot/AX-target stream (~0-3% CPU).
scripts/desktop-permissions.pymacOS permission preflight; --request opens the system dialog + Settings pane.
scripts/desktop-selftest.pyDesktop engine end-to-end self-test (fakes pynput, so it needs no permissions).
scripts/desktop-summarize.pydesktop-events.jsonl → markdown timeline (segments merged, AX targets joined).
bench/browser-overhead.mjs, bench/desktop-capture.pyPerformance harnesses for both recorders.
setup.mjs / install.mjsCross-platform setup / link into agent skill dirs (.sh wrappers exist for POSIX).

Mitgelieferte Dateien

Das Modell liest diese Dateien bei Bedarf, während der Skill geladen ist. Sie werden als lesbare Dateien bereitgestellt und niemals ausgeführt.

Häufig gestellte Fragen

Was macht der KI-Skill Record And Replay?

Record the user's actions — browser (Playwright event stream + trace) or native desktop (lightweight event/window/screenshot stream) — on macOS, Windows and Linux for up to 30 minutes, then turn the demonstration into a reusable agent skill. Use when the user asks you to watch them perform a task, record a workflow, or create/refine a skill from their demonstration. Agent-agnostic — works in Claude Code, Codex, opencode, or any agent with shell access.

Warum Record And Replay in TypingMind nutzen?

Weil Sie den Skill einmal installieren und mit jedem Modell verwenden können. Record And Replay besteht aus reinem Markdown statt aus anbieterspezifischem Code. So funktioniert derselbe Skill mit GPT-5, Claude, Gemini, Grok oder einem lokalen Modell – und Sie können das Modell mitten im Chat wechseln, ohne dass der Skill seine Funktion verliert. TypingMind verwendet Ihre eigenen API-Schlüssel. Sie bezahlen die Anbieter daher direkt statt über ein Abonnement pro Nutzerplatz, und Ihre Skills und Chats bleiben in Ihrem eigenen Speicher.

Wie installiere ich Record And Replay in TypingMind?

Öffnen Sie in TypingMind Plugins → Skills → Von GitHub installieren und fügen Sie https://github.com/ugarchance/record-and-replay-skill/tree/main ein. TypingMind liest die Datei SKILL.md, bündelt die zugehörigen Dateien und installiert alles als Skill, den Sie für jeden Chat einzeln aktivieren können.

Welche KI-Modelle können Record And Replay nutzen?

Jedes Modell, das Sie mit TypingMind verbinden. KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher können GPT, Claude, Gemini, Grok und lokale Modelle diesen Skill laden, wenn eine Anfrage dazu passt.

Wie viele KI-Modelle kann ich mit Record And Replay verwenden?

So viele Sie möchten. In TypingMind können Sie Record And Replay mit jedem Modell verwenden, das Skills unterstützt, etwa mit GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama. Dabei nutzen Sie Ihre eigenen API-Schlüssel.

Ist der KI-Skill Record And Replay kostenlos?

Ja. Der Skill wird von ugarchance auf GitHub unter der Lizenz MIT veröffentlicht. Sie bezahlen nur Ihren eigenen KI-Anbieter für die verwendeten Token.

Was sind KI-Skills?

Ein KI-Skill ist ein wiederverwendbares Anweisungspaket, das einem KI-Modell vermittelt, wie es eine bestimmte Aufgabe erledigt. Es folgt dem offenen Format Agent Skills: Die Datei SKILL.md enthält den Namen und die Beschreibung des Skills. Hinzu kommen bei Bedarf Skripte, Vorlagen oder Referenzdateien für das Modell. Das Modell liest die Anweisungen nur, wenn Ihre Anfrage zum Skill passt. Ein installierter Skill verursacht daher erst Kosten, wenn er verwendet wird.

Wie unterscheiden sich KI-Skills von Plugins oder MCP-Servern?

Ein Plugin oder MCP-Server stellt einem Modell neue aufrufbare Tools bereit – Code, der auf einem System ausgeführt wird und ein Ergebnis zurückgibt. Ein KI-Skill vermittelt dem Modell stattdessen Wissen und Vorgehensweisen: wie es eine Aufgabe angeht, welche Schritte es befolgt und wie eine gute Ausgabe aussieht. Skills bestehen aus reinem Markdown und kommen daher ohne Server, API-Schlüssel und Laufzeitumgebung aus. Sie funktionieren mit jedem Modell.

Alle anzeigen

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇