--- name: web-components-architecture description: Build web components using Custom Elements v1 API with Declarative Shadow DOM, attribute-driven state, handleEvent pattern, and zero DOM selection. Use when creating custom elements, extending built-in HTML elements, or implementing component-based architecture. NO querySelector, NO innerHTML, NO external libraries - pure web platform APIs only. allowed-tools: Read, Write, Edit, Grep, Glob, Bash --- # Web Components Architecture ## Core Principles This skill enforces a strict architectural pattern for web components: 1. **Zero DOM Selection**: NEVER use `querySelector`, `querySelectorAll`, or `getElementById` 2. **Attribute-Driven State**: All state flows through HTML attributes 3. **Event Delegation on `this`**: Use `this.addEventListener` and the `handleEvent` pattern 4. **No External Dependencies**: Use only standard Web Platform APIs 5. **Declarative Shadow DOM**: Use `