spectacles-conventions

Standardize Spectacles TypeScript coding conventions with component patterns and logging.

Updated Jun 24, 2026
One-click install
npx skills add https://github.com/specs-devs/agentic-tools --skill spectacles-conventions
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: spectacles-conventions
Source: https://github.com/specs-devs/agentic-tools/tree/main/skills/spectacles-conventions
Command: npx skills add https://github.com/specs-devs/agentic-tools --skill spectacles-conventions

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Spectacles TypeScript coding conventions, Lens Studio component patterns, decorators, logging, and project structure. Load automatically when writing or reviewing TypeScript for Lens Studio / Spectacles.

Core Features & Use Cases

  • Establishes a consistent component pattern: using @component, extending BaseScriptComponent, and documenting inputs with @input and @hint.
  • Ensures reliable runtime behavior: includes a standard Logger setup in onAwake and optional lifecycle logging.
  • Improves project structure: provides guidelines for file organization, naming, and imports to streamline collaboration.

Quick Start

Open a TypeScript file and apply the prescribed conventions by decorating with @component, extending BaseScriptComponent, and adding inputs with @input and @hint, plus a Logger in onAwake.

Frequently Asked Questions about spectacles-conventions

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

FAQPage Schema
How do I structure TypeScript components for Lens Studio / Spectacles?▼

Lens Studio / Spectacles TypeScript components require decorating classes with @component, extending BaseScriptComponent, and declaring inputs using @input and @hint decorators to ensure consistent component patterns and readability.

What is the standard logging workflow for Spectacles TypeScript projects?▼

The standard logging workflow involves instantiating a centralized Logger within the onAwake lifecycle method of your BaseScriptComponent, ensuring reliable runtime behavior and structured debugging across Spectacles projects.

Does Lens Studio TypeScript require specific decorators for script inputs?▼

Lens Studio TypeScript requires the @input decorator to declare component inputs and the @hint decorator to document them, ensuring inputs are properly exposed and structured within the component pattern.

How do I enforce coding conventions across multiple Spectacles projects?▼

You enforce coding conventions across Spectacles projects by standardizing file organization, naming, imports, and applying uniform component patterns with @component decorators and BaseScriptComponent inheritance for maintainability.

Can I extend BaseScriptComponent without using the @component decorator in Lens Studio?▼

Lens Studio conventions require using the @component decorator alongside extending BaseScriptComponent to establish a consistent component pattern, ensuring the script is properly registered and recognized within the framework.

Why does my Spectacles TypeScript component lack structured logging?▼

Spectacles TypeScript components lack structured logging when a centralized Logger is not initialized in the onAwake method, which is the required convention for ensuring reliable runtime behavior and consistent debugging output.