preview-inspection

Inspect live Lens Studio preview scenes via GraphQL queries and orthographic captures.

16|2|Updated Apr 13, 2026
One-click install
npx skills add https://github.com/lens-studio-devs/ls-extensions --skill preview-inspection-lens-studio-devs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: preview-inspection
Source: https://github.com/lens-studio-devs/ls-extensions/tree/main/plugins/ls-clad/skills/preview-inspection
Command: npx skills add https://github.com/lens-studio-devs/ls-extensions --skill preview-inspection-lens-studio-devs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Verifying that a Lens actually behaves correctly at runtime is hard: editor-side configuration tells you nothing about resolved object references, runtime-spawned components, or post-interaction state. This Skill lets you query the live Lens Studio preview scene and capture renders of it, so you can confirm what the Lens really does when it runs. ## Core Features & Use Cases - Runtime scene querying: Use QueryRuntimeSceneTool with GraphQL to walk the scene hierarchy, filter objects by component, name, property value, or spatial proximity, and read transforms, bounds, and component properties. - Orthographic scene capture: Use CaptureRuntimeViewTool to render the runtime scene from any angle, auto-frame specific objects by uniqueId, and isolate targets from occluders. - Multi-preview routing: Route queries and captures to specific preview panels by name for multiplayer or side-by-side Lens testing. - Use Case: After wiring a PinchButton in a Specs Lens, run the preview and query { sceneObjects(filter: {hasComponents: ["Interactable"]}) { matches { summary } } } to confirm the Interactable spawned at runtime, then capture an isolated front view of the button to verify its visual state. ## Quick Start Ask the agent to list the top-level objects in the running Lens Studio preview and show a render of the current scene.

Frequently Asked Questions about preview-inspection

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I query the live Lens Studio preview scene?

Use QueryRuntimeSceneTool with a GraphQL string. Start with { sceneRoots { summary descendantsTree(maxDepth: 2) } } for an overview, then drill into objects with sceneObject(uniqueId) or filter with sceneObjects(filter: {...}).

How do I find objects by component type in a Lens scene?

Use the hasComponents filter, e.g. { sceneObjects(filter: {hasComponents: ["Interactable"]}) { matches { summary } } }. SIK script-based behaviors like PinchButton are matched by their script asset name, and arrays AND multiple components.

Does preview inspection work for Snapchat Lenses or only Specs?

Both QueryRuntimeSceneTool and CaptureRuntimeViewTool work on any Lens Studio preview, including Specs and Snapchat Lenses, with no SIK dependency. The Lens must include the AiPreviewAgentInspect.lspkg package with AgentInspectScript on a SceneObject.

Why does my scene query return an empty matches list?

Empty results can come from a filter culling all objects or an operator/type mismatch, which silently returns false. Project totalScanned and filterBreakdown to see which filter stage culled results, and use EXISTS to confirm a property is present.

Why do I get NO_PREVIEW or TIMEOUT errors when querying the preview?

These errors mean the bridge to the preview failed. Ensure a preview panel is open in Lens Studio and the Lens includes the AgentInspectScript component from AiPreviewAgentInspect.lspkg, then retry the query.

Can I reuse uniqueIds after resetting the Lens Studio preview?

No. UIDs change across preview resets, so never cache or guess them. Always rediscover objects first with sceneRoots or a filtered sceneObjects query before reading state or capturing views.