lens-log-analysis

Interpret Lens Studio log output from RunAndCollectLogsTool to diagnose runtime errors and crashes.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Lens Studio log files routinely exceed 256 KB and cannot be read directly, making it hard to tell whether a Lens actually ran, crashed at runtime, or failed silently after a successful TypeScript recompile. ## Core Features & Use Cases - Inline log interpretation: Reads the errors, prints, tail, and firstActivityAtMs fields returned by RunAndCollectLogsTool instead of slicing the raw log file. - Failure diagnosis: Maps common patterns like TypeError, Cannot find asset, unwired @input, and reset loops to concrete fixes. - Empty-result triage: Distinguishes a Lens that never started from one that ran cleanly or failed at compile time. - Use Case: After RecompileTypeScriptTool reports success, you run the Lens and check errors plus firstActivityAtMs to confirm it actually executed, then locate a JS stack trace in tail to find the crashing line. ## Quick Start Analyze the logs from my Lens Studio preview run and tell me why the Lens is crashing on startup.

Frequently Asked Questions about lens-log-analysis

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

FAQPage Schema
How do I read Lens Studio logs after running a Lens?

Use RunAndCollectLogsTool and read its inline result fields: errors for E/W/F lines, prints for script output, and tail for chronological debug context. Never Read the log file directly since logs routinely exceed 256 KB.

Why does RecompileTypeScriptTool succeed but my Lens still crashes?

A successful recompile only means TypeScript compiled; runtime failures like missing assets, unwired @input declarations, or exceptions still occur. Always follow with RunAndCollectLogsTool and check errors plus firstActivityAtMs.

Where are JavaScript stack traces in Lens Studio logs?

Stack traces appear in the tail field, not errors. Look for a Stack trace: line followed by @file:line:col frames; the first frame pointing into your Assets directory is the user-script source location.

What does it mean when errors and prints are both empty?

If firstActivityAtMs is null, the Lens never started, usually because the script is not attached to a SceneObject or crashed during module initialization. If it is set, the script ran without printing or erroring.

How do I handle capped or truncated Lens Studio log output?

Check the errorsCapped, printsCapped, truncated, and rotated flags to see which limit was hit. For content beyond the inline caps, slice the file with awk starting from the returned byteOffset rather than using Read.