preview-control
Skill2 starsChanged 4 months agoMITView on GitHub
Use when the user wants to start, stop, or check the Synergy preview server. Triggers on "start preview", "stop the preview", "is the preview running", "/synergy-preview-start", "/synergy-preview-stop", "/synergy-preview-status".
In this repository9 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- address-feedbackSkill
- continueSkill
- create-specSkill
- executeSkill
- handoffSkill
- reviewSkill
- spec-authoringSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 24
If the file doesn't exist, the plugin archive is incomplete.
- Very specific: line 42
After creating a spec with create-spec, the preview is auto-started.
- Distinctive: line 43
Stop the preview when the user is done iterating, or if it's misbehaving.
- Distinctive: line 44
Check status before assuming the URL is reachable.
- Distinctive: line 49
Default preferred-port conflict → the CLI selects another port and reports its verified origin.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
preview-control
Manage the Synergy preview server lifecycle. The server prefers port 4321, can select another loopback port, and serves the MDX session previews with hot reload.
Lifecycle
- Runtime authority:
.synergy/preview.runtime.jsonis published only after project-identity health verification. Use the CLI instead of reading it directly. - Port:
4321is the preferred port. Default startup selects another available loopback port when necessary; an explicit--portis strict. - Log file:
.synergy/preview.log(gitignored). Tail it when diagnosing failures.
CLI invocation
The plugin's CLI lives at $CLAUDE_PLUGIN_ROOT/packages/cli/dist/cli.js. Always invoke it via:
node "$CLAUDE_PLUGIN_ROOT/packages/cli/dist/cli.js" preview <action>If the file doesn't exist, the plugin archive is incomplete. /synergy-setup installs dependencies but does not build or repair runtime artifacts.
Commands
| User intent | Run |
| Start the preview | node "$CLAUDE_PLUGIN_ROOT/packages/cli/dist/cli.js" preview start |
| Stop the preview | node "$CLAUDE_PLUGIN_ROOT/packages/cli/dist/cli.js" preview stop |
| Check status | node "$CLAUDE_PLUGIN_ROOT/packages/cli/dist/cli.js" preview status --json |
start is idempotent — if a server is already running, it tells you and exits without spawning a second one.
stop uses the authenticated runtime shutdown endpoint and removes only matching runtime metadata. It never kills an unverified process.
status --json returns running plus the verified origin; treat that origin as the only URL authority.
When to invoke
- After creating a spec with
create-spec, the preview is auto-started. You usually don't need to start it again. - Stop the preview when the user is done iterating, or if it's misbehaving.
- Check status before assuming the URL is reachable.
Failure modes
- Missing dependency errors → run
/synergy-setupto perform the frozen dependency install. - Default preferred-port conflict → the CLI selects another port and reports its verified origin.
- Explicit
--portconflict → choose another explicit port or omit--port; never kill the occupying process automatically. - Stale or unhealthy runtime metadata → the CLI leaves unrelated processes untouched; retry
startand usepreview status --jsonto discover the new origin.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

