clarity-preview
Skill0 starsChanged 3 months agoMITView on GitHub
Start, stop, or check the ClarityKit preview server for the CURRENT project (serves the project's diagram/prototype site over http://localhost, survives reboots of the conversation). INVOKE ONLY WHEN THE USER EXPLICITLY ASKS to start/stop/restart the preview server (e.g. "start the preview server", "open the preview"). Never start a server on your own initiative.
In this repository8 other files it gives its agents.
- clarify-acceptanceSkill
- clarify-architectureSkill
- clarify-behaviorSkill
- clarify-dataSkill
- clarify-directionSkill
- clarify-requirementsSkill
- clarify-uiSkill
- clarity-flowSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 1 is distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 26
After a machine reboot, just start again.
- Very specific: line 33
If
clarityis not found: run export PATH="$HOME/.local/bin:$PATH" and retry ONCE. - Very specific: line 34
If it is still missing, STOP and tell the user the ClarityKit CLI is not installed/on PATH (see README Install).
- Distinctive: line 38
Only serve the current project: Run the commands from inside the project the user is working in — the derivation does the rest.
- Very specific: line 40
Verify before reporting: Only tell the user the URL after the tool confirms HTTP 200 — clarity server start does this itself.
- Very specific: line 43
If the user says "the preview is gone / can't open", run status first, then start.
≈ “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
clarity-preview — preview server lifecycle (manual only)
One server per project. The server is detached (survives conversation/process-group
termination), registered, and verified. All mechanics live in the clarity server command —
never hand-roll nohup/setsid commands.
The server takes no directory argument. Its root is derived, not chosen: it always serves
<projectRoot>/docs/clarity where the project root is the nearest ancestor containing
.git (fallback: the current directory). You cannot point it at the wrong directory because
you never pass one. Just make sure you run it from somewhere inside the user's project.
Commands
clarity server start # build site, start detached, verify HTTP 200, print URL
clarity server status # list all registered servers with liveness
clarity server stop # stop this project's server, free the port- start is idempotent: already-running → rebuilds the site and re-reports the URL.
After a machine reboot, just
startagain. - Port allocation is deterministic per project root (hash-based, 8400–8799, collision-probed) so different projects never collide.
- The registry lives at
~/.claritykit/servers.json— one entry per project staging dir.
Rules
- If
clarityis not found: runexport PATH="$HOME/.local/bin:$PATH"and retry ONCE. If it is still missing, STOP and tell the user the ClarityKit CLI is not installed/on PATH (see README Install). Never improvise alternatives — no nohup, no setsid, no hand-rollednode server.mjs serve, no relative tool paths. A missing CLI is an install problem for the user to fix, not a problem to work around. - Only serve the current project. Run the commands from inside the project the user is working in — the derivation does the rest.
- Verify before reporting. Only tell the user the URL after the tool confirms HTTP 200 —
clarity server startdoes this itself; if it reports failure, read the printed log path and debug from there. - If the user says "the preview is gone / can't open", run
statusfirst, thenstart. - Artifact updates (
clarity publishruns by other skills) are picked up live — no restart needed; the user just refreshes the browser.
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.

