ha-validate-dashboards
Provides 3-tier validation approach for Home Assistant dashboards including pre-publish validation (entity checks, config structure), post-publish verification (log analysis), and visual validation (browser console, rendering). Use when validating HA dashboards, checking dashboard configs, verifying entity IDs, debugging rendering issues, or before deploying dashboard changes. Triggers on "validate dashboard", "check HA config", "dashboard errors", "entity not found", or "test dashboard". Works with Home Assistant WebSocket/REST APIs, Chrome extension MCP tools, Python dashboard builders, and YAML dashboard configurations.
What this skill does
# Home Assistant Dashboard Validation
Validates Home Assistant dashboard and configuration changes using a comprehensive 3-tier validation approach to catch errors before they impact users.
## Quick Start
Run a complete validation before deploying a dashboard:
```bash
# 1. Validate config structure and entities (pre-publish)
python3 << 'EOF'
import json
with open('climate_dashboard.json') as f:
config = json.load(f)
from validation_helpers import validate_dashboard_config, verify_entities_exist, extract_all_entity_ids
is_valid, errors = validate_dashboard_config(config)
if not is_valid:
print("Config errors:", errors)
exit(1)
entities = extract_all_entity_ids(config)
existence = verify_entities_exist(entities)
missing = [e for e, exists in existence.items() if not exists]
if missing:
print("Missing entities:", missing)
exit(1)
print("✅ Pre-publish validation passed")
EOF
# 2. Publish dashboard
./run.sh dashboard_builder.py
# 3. Check HA logs (post-publish)
curl -s "http://192.168.68.123:8123/api/error_log" \
-H "Authorization: Bearer $HA_LONG_LIVED_TOKEN" | \
grep -i "lovelace" | tail -5
# 4. Visual validation (browser)
mcp-cli call claude-in-chrome/navigate '{"url": "http://192.168.68.123:8123/climate-dashboard"}'
sleep 2
mcp-cli call claude-in-chrome/read_console_messages '{}'
```
## Table of Contents
1. When to Use This Skill
2. The 3-Tier Validation Approach
3. Validation Workflows
4. Common Failure Modes
5. Supporting Files
6. Integration with Project
7. Requirements
8. Red Flags to Avoid
## When to Use This Skill
**Explicit Triggers:**
- "validate my dashboard"
- "check HA dashboard config"
- "verify dashboard entities"
- "validate before publish"
**Implicit Triggers:**
- Before deploying dashboard changes
- After modifying dashboard builder scripts
- Before committing dashboard code changes
**Debugging Triggers:**
- Dashboard shows "Entity not available"
- Cards fail to render or show error states
- Console shows JavaScript errors
- HACS card doesn't appear after installation
## Usage
Use this skill to validate Home Assistant dashboards before deployment. Run the Quick Start workflow for a complete validation, or use individual tiers (pre-publish, post-publish, visual) for specific validation needs. Always run pre-publish validation first to catch config errors before they reach production.
## The 3-Tier Validation Approach
### Tier 1: Pre-Publish Validation (API-Based)
Validate configuration and entities BEFORE publishing to Home Assistant.
**Config Structure Validation:**
```python
def validate_dashboard_config(config: dict) -> tuple[bool, list[str]]:
"""Validate dashboard configuration structure."""
errors = []
if "views" not in config:
errors.append("Missing required 'views' key")
return False, errors
if not isinstance(config["views"], list):
errors.append("'views' must be a list")
return False, errors
for idx, view in enumerate(config["views"]):
if "title" not in view:
errors.append(f"View {idx}: Missing required 'title'")
if "cards" in view and not isinstance(view["cards"], list):
errors.append(f"View {idx}: 'cards' must be a list")
return len(errors) == 0, errors
```
**Entity Existence Check:**
```python
def verify_entities_exist(entity_ids: list[str]) -> dict[str, bool]:
"""Check if entities exist via REST API."""
url = "http://192.168.68.123:8123/api/states"
headers = {"Authorization": f"Bearer {os.environ['HA_LONG_LIVED_TOKEN']}"}
response = requests.get(url, headers=headers, timeout=10)
existing_entities = {state["entity_id"] for state in response.json()}
return {
entity_id: entity_id in existing_entities
for entity_id in entity_ids
}
```
**Extract All Entity IDs:**
```python
def extract_all_entity_ids(config: dict) -> list[str]:
"""Recursively extract all entity IDs from dashboard config."""
entity_ids = []
def extract_from_dict(d):
if isinstance(d, dict):
if "entity" in d and isinstance(d["entity"], str):
entity_ids.append(d["entity"])
if "entities" in d and isinstance(d["entities"], list):
for item in d["entities"]:
if isinstance(item, str):
entity_ids.append(item)
elif isinstance(item, dict) and "entity" in item:
entity_ids.append(item["entity"])
for value in d.values():
if isinstance(value, (dict, list)):
extract_from_dict(value)
elif isinstance(d, list):
for item in d:
extract_from_dict(item)
extract_from_dict(config)
return list(set(entity_ids))
```
**Why Pre-Publish Validation Matters:**
- Catches config errors before they reach HA
- Prevents "Entity not available" errors in production
- Verifies HACS cards are installed
- Fast feedback loop (API calls only)
### Tier 2: Post-Publish Verification (Log Analysis)
Monitor Home Assistant logs for errors after publishing dashboard changes.
**Log Comparison Workflow:**
```bash
# 1. Capture baseline errors before change
curl -s "http://192.168.68.123:8123/api/error_log" \
-H "Authorization: Bearer $HA_LONG_LIVED_TOKEN" > pre-change-errors.log
# 2. Make dashboard changes via WebSocket/API
# 3. Wait for errors to propagate
sleep 5
# 4. Capture post-change errors
curl -s "http://192.168.68.123:8123/api/error_log" \
-H "Authorization: Bearer $HA_LONG_LIVED_TOKEN" > post-change-errors.log
# 5. Compare for new errors
diff pre-change-errors.log post-change-errors.log
```
**Key Error Patterns:**
| Error Pattern | Meaning | Fix |
|---------------|---------|-----|
| `Custom element doesn't exist: custom:*-card` | HACS card not installed/loaded | Install via HACS, clear cache |
| `Entity not available: sensor.*` | Entity doesn't exist or offline | Check entity ID, verify device |
| `Error while loading page lovelace` | Dashboard config syntax error | Check config structure |
| `Invalid configuration for card` | Card validation failed | Review card schema |
**Why Log Analysis Matters:**
- Detects runtime errors that pre-publish checks miss
- Catches integration-specific issues
- Provides detailed error messages for debugging
- Confirms changes didn't break existing functionality
### Tier 3: Visual Validation (Browser Automation)
Use Chrome extension MCP tools to verify rendering and check browser console.
**Browser Validation Workflow:**
```bash
# 1. Navigate to dashboard
mcp-cli call claude-in-chrome/navigate '{
"url": "http://192.168.68.123:8123/climate-dashboard"
}'
# 2. Wait for page load
sleep 2
# 3. Check console for JavaScript errors
mcp-cli call claude-in-chrome/read_console_messages '{}'
# 4. Take screenshot for visual verification
mcp-cli call claude-in-chrome/computer '{
"action": "screenshot"
}'
# 5. Read page content to verify cards rendered
mcp-cli call claude-in-chrome/read_page '{}'
```
**Console Error Interpretation:**
| Console Error | Root Cause | Fix |
|---------------|------------|-----|
| `Custom element doesn't exist: custom:*` | HACS card not loaded | Hard refresh (Ctrl+Shift+R) |
| `Uncaught TypeError: Cannot read property 'state'` | Entity ID mismatch | Check entity via API |
| `Failed to fetch` | Network/API connectivity | Check HA availability |
| `SyntaxError: Unexpected token` | JSON config syntax error | Validate JSON structure |
**When to Use Visual Testing:**
Always use for:
- Major dashboard restructuring
- New custom cards from HACS
- card_mod CSS customizations
- After updating HACS cards
Skip for:
- Simple entity ID changes
- Backend configuration
- Non-frontend changes
**Why Visual Validation Matters:**
- Catches rendering issues that API checks miss
- Verifies card styling and layout
- Confirms HACS cards loaded correctly
- Provides visual proof of correctness
## ValidationRelated in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.