Communitygithub.com

77777R7/screenstudio-demo-optimizer

Codex skill and helper scripts for safely optimizing Screen Studio demo recordings

What is screenstudio-demo-optimizer?

screenstudio-demo-optimizer is a Codex agent skill that codex skill and helper scripts for safely optimizing Screen Studio demo recordings.

Works with~Claude CodeCodex CLI~Cursor
npx skills add 77777R7/screenstudio-demo-optimizer

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

Screen Studio Demo Optimizer

Use this skill to turn a user's editing intent into safe, reversible Screen Studio timeline edits.

The skill is not a fixed editing style. Always let the user's desired outcome control the plan: target duration, pacing, logic preservation, speed limits, zoom behavior, and output format.

Core Workflow

  1. Clarify or infer the editing contract:
    • Target duration: exact, approximate, or unconstrained.
    • Style: social demo, tutorial, investor demo, internal walkthrough, calm review, fast teaser, or custom.
    • Priority: preserve every logical step, allow trimming waiting, allow deleting repetition, preserve audio, preserve zooms, reduce motion.
    • Output: plan only, edit copy, or export.
  2. Prepare a safe copy before modifying anything.
    • Use scripts/prepare_edit_copy.mjs.
    • Never modify the original .screenstudio project unless the user explicitly asks.
  3. Analyze the project.
    • Use scripts/analyze_timeline.mjs.
    • Read slices, speeds, playback ranges, zoom ranges, and sub-second zoom risks.
  4. Create an editable plan.
    • Use scripts/plan_compression.mjs when a target duration is provided.
    • Explain the plan in human terms before applying it.
  5. Ask for confirmation before mutating the edit copy.
  6. Apply confirmed changes.
    • Use scripts/apply_speed_plan.mjs.
    • Use scripts/normalize_project_json.mjs after external or CLI saves.
  7. Review zoom comfort.
    • Use scripts/optimize_zoom_track.mjs --review.
    • Apply zoom changes only after confirmation.
  8. Verify.
    • Use scripts/verify_project.mjs.
    • If Screen Studio is available, optionally use scripts/screenstudio_cdp_open_project.mjs and screenstudio --port <port> status.

Preference Contract

If the user gives enough intent, proceed with reasonable defaults. If the target is ambiguous, ask one concise question.

Default contract when the user only says "make it better":

{
  "targetSeconds": null,
  "style": "balanced-demo",
  "preserveLogic": true,
  "allowDelete": false,
  "maxReadingSpeed": 1.6,
  "maxActionSpeed": 3,
  "maxWaitSpeed": 10,
  "zoomPolicy": "reduce-jumpy-zooms"
}

Common presets:

  • social-demo: short, crisp, high wait-speed, reduce jumpy zooms.
  • tutorial: slower, preserve steps, avoid aggressive zoom changes.
  • investor-demo: concise, preserve narrative moments, emphasize outcomes.
  • agent-workflow: speed up waiting/loading heavily, preserve key decisions and final result.
  • review-only: analyze and recommend, do not modify.

Read references/compression-rules.md for pacing heuristics and references/zoom-comfort-rules.md before editing zooms.

Script Quick Start

Prepare safe files:

node scripts/prepare_edit_copy.mjs "/path/to/demo.screenstudio"

Analyze:

node scripts/analyze_timeline.mjs "/path/to/demo.agent-edit-copy.screenstudio"

Plan a 90 second cut:

node scripts/plan_compression.mjs "/path/to/demo.agent-edit-copy.screenstudio" --target-seconds 90 --preset social-demo > /tmp/plan.json

Apply a confirmed plan:

node scripts/apply_speed_plan.mjs "/path/to/demo.agent-edit-copy.screenstudio" /tmp/plan.json
node scripts/verify_project.mjs "/path/to/demo.agent-edit-copy.screenstudio"

Review zoom comfort:

node scripts/optimize_zoom_track.mjs "/path/to/demo.agent-edit-copy.screenstudio" --review

Open in Screen Studio CDP mode when Screen Studio is installed:

node scripts/screenstudio_cdp_open_project.mjs "/path/to/demo.agent-edit-copy.screenstudio"

Safety Rules

  • Default to plan-first for non-trivial edits.
  • Do not overwrite the original project by default.
  • Do not delete slices unless the user allowed deletion.
  • Treat audio-heavy or narration-heavy recordings as speed-sensitive.
  • Normalize project.json after saves because some Screen Studio/CLI flows can wrap project data as nested JSON strings.
  • Verify final duration from the project file and, when possible, Screen Studio runtime.
  • Report exact changed slices and zooms.

Read references/safety-and-backups.md before doing destructive or irreversible actions.

Known Limitations

  • Screen Studio internals can change across versions. If CDP open fails, fall back to project-file analysis and tell the user.
  • Visual quality cannot be fully judged from timeline data alone. Use frame extraction or Screen Studio preview when available.
  • The bundled scripts are conservative primitives. The agent should still explain subjective tradeoffs and ask for confirmation.

Related Skills