Lens studio preview verify
Skill zajalist/zajal-skills/skills/lens-studio-preview-verify
Use when running, previewing, and verifying a Lens Studio project edited over MCP — applying scene edits to the running lens, screenshotting the preview, checking that TypeScript compiled, and working around log/compile timeouts. Includes the "no Save tool" reality.From its SKILL.md
npx -y skills add zajalist/zajal-skills --skill lens-studio-preview-verifyAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
4.7 KB, ~1.1k tokens by cl100k_base, as published. Nobody here has run it
Previewing & verifying Lens Studio work
You're editing blind unless you reset, screenshot, and check compiles. Here's the loop.
There is no Save tool — and edits need a reset to take effect
Ctrl+Sis GUI-only; no MCP tool saves the project. Tell the user to press it to persist scene edits. A project reload wipes unsaved scene edits, so save before anything that reloads.- MCP scene edits (new objects, property changes, new scripts) only reach the running preview after a reset. The reset tool keeps editor objects and re-runs scripts; a full reload is the one that wipes unsaved work.
Reset the preview with RunAndCollectLogsTool — with TINY params
RunAndCollectLogsTool resets the preview (re-runs onAwake/onStart, applies your edits) and then
collects logs. On a real project the log collection hangs and the tool times out — but the reset
still happened. Avoid the timeout by asking for almost nothing:
RunAndCollectLogsTool maxRuntimeMs:800 maxLines:3
A good result contains "msg": "Lens has been reset". That's your signal the edits are live. If it
still times out, the reset usually occurred anyway — proceed to screenshot.
Runtime logs are often unreadable — don't depend on print
GetLensStudioLogsTool for the preview category frequently times out too, because a single
broken import (e.g. a duplicated SpectaclesUIKit 2.lspkg) floods the log. Consequences:
- Don't rely on reading your own
print()output to confirm runtime behaviour. Verify visually (screenshot) and structurally (read the property/scene back). - For navigation/state logic you can't see in a still frame, add a
debugAutoTour/startScreenknob to the controller and screenshot each state (see sik-interactivity).
Checking that TypeScript compiled
CompileWithLogsToolalso times out when a bad import floods logs — don't lean on it. Worse, it frequently reports a timeout even though the TypeScript compile actually SUCCEEDED. A timeout error from it is not a compile failure — don't act on it.- Verify the compile from the logs, not the tool's exit. Read just the
tsccategory, tiny window:GetLensStudioLogsTool categories:["tsc"] maxLines:25 timeWindowMs:15000."TypeScript compilation succeeded!"intsc= it compiled (trust this over the tool timeout).- An empty
tscresult = no TypeScript errors either. Errors show up here as text.
- If a new script's
@inputs never appear on its component, it didn't compile — checktsc.
Screenshotting the preview
The Lens Studio window won't come to the foreground; capture it occluded. A helper script grabs the window to a PNG:
pwsh -File <skills>/lens-studio-mcp/scripts/capture-preview.ps1 -Out D:\tmp\shot.png
Then crop/zoom the region you care about (the Preview panel, usually the right third) with a tiny
System.Drawing script and Read the cropped PNG. Tips:
- Capture → read the pixels → decide next edit. Re-screenshot after every meaningful change; never assume an edit looks right.
- The preview camera reframes when scene content changes (disabling a big object, the stage auto-fitting). Re-locate your UI each time rather than trusting fixed crop coords.
- If another subsystem (e.g. a 3D stage) renders over your UI, temporarily disable it for a clean UI shot, then re-enable it. Restore what you toggled.
The verification loop, in order
- Make edits (component-by-component for vectors).
- Read back anything whose echo was
{}(vectors, references) to confirm it took. RunAndCollectLogsTool maxRuntimeMs:800→ expect "Lens has been reset".GetLensStudioLogsTool categories:["tsc"]→ expect empty (compiled).- capture-preview → crop →
Read→ judge → iterate. - When it looks right, remind the user to Ctrl+S.
Environment notes
- LS 5.x projects are
.esproj. For LS 5.15.4 use SIK ≤ 0.17.3 / UI Kit ≤ 0.1.6. - Package installs frequently duplicate folders (
... 2.lspkg); a duplicate with a broken import is the usual cause of the log/compile floods above. Removing the stray duplicate restores normal logs. GenerateFast3DAssets/GenerateTexture/GenerateFaceMaskTextureoften time out — don't put them on the critical path.- The MCP port changes each LS restart; re-point the server when every call suddenly fails.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.
Gives 0 of the 12 instructions most quality gates skills give in ~1.1k tokens
Counted across 1,195 of the 2,094 authors here whose files we hold, read 2026-08-07
- Read the output and check the exit codein 54 of 1195, across 14 files
- Verify requirements using a line-by-line checklistin 53 of 1195, across 12 files
- Identify the verification command proving the claimin 51 of 1195, across 12 files
- Run the full verification commandin 50 of 1195, across 11 files
- Verify output confirms the claimin 49 of 1195, across 12 files
- Check version control diff after agent delegationin 46 of 1195, across 6 files
- State claim with evidencein 44 of 1195, across 4 files
- Run the test suitein 33 of 1195, across 26 files
- Keep state in memory by defaultin 27 of 1195, across 6 files
- Make prototype runnable with one commandin 26 of 1195, across 5 files
- Produce a verification reportin 25 of 1195, across 14 files
- Detect the package manager from lockfilesin 24 of 1195, across 5 files
Said here and by no other author read
- reset the preview after making scene edits
- use tiny parameters for log collection
- verify runtime behavior visually via screenshot
- verify typescript compilation from tsc logs
- read back edits that echo empty
- crop preview screenshots for inspection
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.