agentleFS
sanzhardanybayevsanzhardanybayev/synergy/skills/preview-control/SKILL.md

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".

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
  1. Very specific:

    If the file doesn't exist, the plugin archive is incomplete.

    line 24
  2. Very specific:

    After creating a spec with create-spec, the preview is auto-started.

    line 42
  3. Distinctive:

    Stop the preview when the user is done iterating, or if it's misbehaving.

    line 43
  4. Distinctive:

    Check status before assuming the URL is reachable.

    line 44
  5. Distinctive:

    Default preferred-port conflict → the CLI selects another port and reports its verified origin.

    line 49

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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.json is published only after project-identity health verification. Use the CLI instead of reading it directly.
  • Port: 4321 is the preferred port. Default startup selects another available loopback port when necessary; an explicit --port is 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 intentRun
Start the previewnode "$CLAUDE_PLUGIN_ROOT/packages/cli/dist/cli.js" preview start
Stop the previewnode "$CLAUDE_PLUGIN_ROOT/packages/cli/dist/cli.js" preview stop
Check statusnode "$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-setup to perform the frozen dependency install.
  • Default preferred-port conflict → the CLI selects another port and reports its verified origin.
  • Explicit --port conflict → 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 start and use preview status --json to discover the new origin.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.