From lens-studio-core
Analyzes Lens Studio logs for TypeScript compiler errors, preview runtime output, and debugging using thread categories and grep patterns.
How this skill is triggered — by the user, by Claude, or both
Slash command
/lens-studio-core:logs-skillThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Both `RecompileTypescriptTool` and `RunAndCollectLogsTool` return a `logFile` path in their response.
Both RecompileTypescriptTool and RunAndCollectLogsTool return a logFile path in their response.
If the path is not available from a recent tool call, use ExecuteEditorCode to obtain it:
const FS = await import("LensStudio:FileSystem");
return FS.getLogFile().toString();
This returns the full path to the active log file (e.g. ~/Library/Preferences/Snap/Lens Studio Internal/logs/LensStudioLog-<timestamp>.txt).
Once obtained, use your built-in Read and Grep tools to read logs directly from the filesystem.
Each line follows this structure:
<LEVEL> <HH:MM:SS.mmm> <source_file>:<line> (<@thread>) <function>] <message>
D=debug, I=info, W=warning, E=error, F=fatal@. Identifies the subsystem that produced the log.<function>] segment ends with a closing bracket before the message.Example:
E 14:32:01.456 TypeScriptCompiler.cpp:285 (@Es::TypeScript) compileProject] TS2304: Cannot find name 'foo'.
I 14:32:05.789 PreviewWorker.cpp:142 (@Es::Preview::PreviewWorker) onScriptLog] Hello from script!
| Category | Thread pattern | What it contains |
|---|---|---|
| TypeScript compiler | @Es::TypeScript | Compilation start, success, failure, TS errors |
| Preview runtime | @Es::Preview::PreviewWorker | Script print() output, runtime errors, lifecycle |
| Device push | @Es::ToDevice | Device deployment logs |
| Main / other | everything else | UI, asset management, general engine |
RecompileTypescriptTool — it triggers recompilation and waits for success/failure.{ status: "succeeded", logFile: "..." }. No further action needed.{ status: "failed", errors: [...], logFile: "..." }.
errors array first — it contains the compiler error messages directly.logFile path:# Find TypeScript compiler errors (level E, TypeScript thread)
Grep the log file for: ^E .* @Es::TypeScript
# Or for specific TS error codes:
Grep the log file for: TS\d{4}:
.ts files, then call RecompileTypescriptTool again.RunAndCollectLogsTool — it refreshes all preview panels and waits for the lens reset signal.status: "success" | "timeout" | "no_preview"logFile: Absolute path to the active log filebyteOffset: Byte position in the log file before the refresh was triggeredsleep 0.5 to let script initialization complete (onAwake errors happen ~100ms after reset).logFile starting from byteOffset to see only entries produced by the refresh:
grep '@Es::Preview::PreviewWorker.*onScriptLog\]' logFilegrep '^E .* @Es::Preview::PreviewWorker' logFilebyteOffset anyway.| Scenario | Pattern |
|---|---|
| Compilation succeeded | TypeScript compilation succeeded! |
| Compilation started | Starting TypeScript compilation |
| Compilation failed | TypeScript compilation failed! |
| TS compiler errors (level E) | ^E .* @Es::TypeScript |
| Specific TS error code | TS\d{4}: |
| Preview reset marker | Lens has been reset |
| All preview runtime logs | @Es::Preview::PreviewWorker |
| Script print() output | @Es::Preview::PreviewWorker.*onScriptLog\] |
| Preview runtime errors | ^E .* @Es::Preview::PreviewWorker |
| Device push logs | @Es::ToDevice |
Read with a large offset (e.g. total lines - 200) to see only the most recent entries. Logs accumulate over the session; old entries are rarely relevant.TypeScript compilation succeeded! or Lens has been reset) to find the exact region of interest, then read a window around that line.^E .* @Es::Preview::PreviewWorker for preview errors only.npx claudepluginhub snapchat/lens-studio-plugins --plugin lens-studio-coreSearches and analyzes logifai-captured development logs in NDJSON format using Read, Grep, Glob, Bash. Debugs errors, runtime issues, reviews activity via keywords, timestamps, stack traces, logifai:// URIs.
Guides on using walkerOS logger patterns in sources/destinations: when to log, DRY principles, migration from console.log, and available methods (error, warn, info, debug, json, scope).
Browse and read recent Claude Code session logs and artifacts from a project-specific directory. Supports listing, filtering by prefix, and reading full log files.