From pdf-playground
Launches interactive preview for HTML document editing: starts local HTTP server, sets up control panel, opens wrapper in Playwright browser.
How this command is triggered — by the user, by Claude, or both
Slash command
/pdf-playground:preview file-pathThis command is limited to the following tools:
The summary Claude sees in its command listing — used to decide when to auto-load this command
Launch an interactive preview session for iterating on a document design. ## Setup 1. Read the document-design skill for guidance 2. Resolve the HTML file path (see "File path" below) 3. Start a local HTTP server to serve the file 4. Set up the playground wrapper and controls 5. Open the wrapper in the Playwright browser ## Pre-flight check Before proceeding, verify the control panel files exist: 1. Check if the controls directory exists: 2. If MISSING, tell the user: > Your PDF Playground plugin is outdated and missing the interactive control panel. > Run this command to upd...
Launch an interactive preview session for iterating on a document design.
Before proceeding, verify the control panel files exist:
ls "${CLAUDE_PLUGIN_ROOT}/controls/control-panel.js" 2>/dev/null && echo "OK" || echo "MISSING"
Then STOP — do not continue with the preview workflow.Your PDF Playground plugin is outdated and missing the interactive control panel. Run this command to update, then restart Claude Code:
claude plugin update pdf-playground@claude-skills-journalism
Step 1: Start local server
The Playwright browser cannot open file:// URLs. Start a local HTTP server instead:
python -c "import socket; s=socket.socket(); s.settimeout(1); result=s.connect_ex(('127.0.0.1',8787)); s.close(); print('free' if result!=0 else 'busy')"
cd <directory-containing-html> && python -m http.server <port>
Run this with run_in_background: trueStep 2: 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.
playground-controls/ directory in the same directory as the HTML filemkdir -p <html-dir>/playground-controls/template-maps
cp ${CLAUDE_PLUGIN_ROOT}/controls/control-panel.css <html-dir>/playground-controls/
cp ${CLAUDE_PLUGIN_ROOT}/controls/control-panel.js <html-dir>/playground-controls/
cp ${CLAUDE_PLUGIN_ROOT}/controls/prompt-generator.js <html-dir>/playground-controls/
cp ${CLAUDE_PLUGIN_ROOT}/controls/template-maps/<template-name>.js <html-dir>/playground-controls/template-maps/
cp ${CLAUDE_PLUGIN_ROOT}/controls/playground-wrapper.html <html-dir>/
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
browser_navigate to the same wrapper URLStep 6: Iterate
Step 7: Clean up
When the user is done:
browser_closerm -rf <html-dir>/playground-controls <html-dir>/playground-wrapper.html
The file to preview is: $ARGUMENTS
If no file path provided:
To determine which template map to use, check the HTML file for clues:
.cover-title, .stat-grid for proposal)Currently available template maps:
proposal.js — Funding proposals, grant applicationsbrowser_navigate — Open the wrapper page via HTTP URLbrowser_snapshot — Get accessibility treebrowser_take_screenshot — Capture visual statebrowser_close — End preview sessionhttp://localhost:<port>/) — never file://display: flex and clamp() so it scales with the browser windownpx claudepluginhub jamditis/claude-skills-journalism --plugin pdf-playground/ui-designGenerates responsive HTML UI mockups with parallel design variants, conversational iteration, and tech-specific implementations like vanilla HTML or shadcn-ui.
/designDesigns UI pages, components, apps, dashboards, and presentations by orchestrating a multi-step workflow with framework resolution and project memory integration.
/design-htmlCreates or edits an HTML design system via guided wizard, defining visual tokens and component catalog from brand philosophy.
/preview-designsGenerates 3 distinct self-contained HTML/CSS design previews with animations for a website theme, from site description or regenerates from existing spec.
/mockupGenerates UI mockups as standalone HTML files per screen with inline CSS, minimal JS interactivity, responsive layouts, and design annotations for rapid prototyping.
/designFull design pipeline: Identity → Research → System → Generate → Motion → Audit → Review. Generates production-ready HTML/CSS via Gemini Design MCP with OKLCH tokens, approved typography, and Playwright-driven inspiration.