evolve
CommandEvolve skill files by integrating validated lessons from real usage
Launch interactive preview for document editing
> /plugin marketplace add jamditis/claude-skills-journalism
description: Launch interactive preview for document editing
argument-hint: [file-path]
allowed-tools: Read, Edit(./**/*.html), Glob, AskUserQuestion, Bash(python3 ${CLAUDE_PLUGIN_ROOT}/scripts/playground.py *), Bash(python ${CLAUDE_PLUGIN_ROOT}/scripts/playground.py *), mcp__plugin_playwright_playwright__*Launch an interactive preview session for iterating on a document design.
1. Read the document-design skill for guidance 2. Resolve the HTML file path (see "File path" below) 3. Copy the playground wrapper and controls next to the file 4. Start a local HTTP server to serve the file 5. Open the wrapper in the Playwright browser
Every shell step runs through one plugin script. This command pre-approves only that script, so use the exact form below. If `python3` is not found (common on Windows), use `python` in its place.
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/playground.py <setup|serve|clean> ...**Step 1: Set up the playground wrapper**
The playground uses an iframe-based architecture: the document lives in an iframe, and the control panel sits alongside it as a sidebar. This keeps the document HTML clean for PDF export while providing interactive design controls.
Detect which template is being previewed (see "Template detection" below), then copy the control files and wrapper next to the HTML file:
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/playground.py setup <html-file> --template <template-name>This creates `playground-controls/` and `playground-wrapper.html` in the same directory as the HTML file and prints the wrapper path to open.
If the command prints that the control panel is missing, tell the user to run this command and restart Claude Code, then STOP:
claude plugin update pdf-playground@claude-skills-journalism
**Step 2: Start local server**
The Playwright browser cannot open `file://` URLs. Start a local HTTP server instead, with `run_in_background: true`:
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/playground.py serve <directory-containing-html>The script picks the first free port from 8787 upward, binds to `127.0.0.1` only, and prints `Serving http://localhost:<port>/`. Read the port from that line.
**Step 3: Open the wrapper**
Navigate to the wrapper page with the document and template as URL parameters:
http://localhost:<port>/playground-wrapper.html?doc=<filename>.html&template=<template-name>
The `template` parameter defaults to `proposal` if omitted.
The wrapper page will:
Take an initial screenshot to show current state.
Tell the user: > The interactive control panel is now loaded on the right side of the preview. You can: > - Adjust colors, fonts, spacing, and layout live > - Toggle sections on and off > - Try different presets for quick theme changes > - Click "Copy changes" to get a prompt you can paste back here > - I'll apply the changes to the HTML source file
**Step 4: Gather feedback**
**Step 5: Implement changes**
**Step 6: Iterate**
**Step 7: Clean up**
When the user is done: 1. Close the browser: `browser_close` 2. Stop the HTTP server (the background process from step 2) 3. Optionally remove the temporary playground files:
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/playground.py clean <html-file>The file to preview is: $ARGUMENTS
If no file path provided: 1. Look for HTML files in current directory 2. If found, list them and ask which to preview 3. If none found, ask for the file path
To determine which template map to use, check the HTML file for clues:
Currently available template maps:
A collection of Agent Skills for journalists, researchers, academics, media professionals, and communications practitioners. The same repository serves Claude Code and Codex while keeping Claude-only commands, agents, and hooks clearly labeled.
Evolve skill files by integrating validated lessons from real usage
Initialize .autocontext/ in the current project for knowledge persistence
Initialize the current project with Scientific Writer - a deep research and writing tool that combines AI-driven research with…