diff --git a/skill-creator/scripts/generate_report.py b/skill-creator/scripts/generate_report.py
new file mode 100644
index 0000000..c8c7630
--- /dev/null
+++ b/skill-creator/scripts/generate_report.py
@@ -0,0 +1,326 @@
+#!/usr/bin/env python3
+"""Generate an HTML report from run_loop.py output.
+
+Takes the JSON output from run_loop.py and generates a visual HTML report
+showing each description attempt with check/x for each test case.
+Distinguishes between train and test queries.
+"""
+
+import argparse
+import html
+import json
+import sys
+from pathlib import Path
+
+
+def generate_html(data: dict, auto_refresh: bool = False, skill_name: str = "") -> str:
+ """Generate HTML report from loop output data. If auto_refresh is True, adds a meta refresh tag."""
+ history = data.get("history", [])
+ holdout = data.get("holdout", 0)
+ title_prefix = html.escape(skill_name + " – ") if skill_name else ""
+
+ # Get all unique queries from train and test sets, with should_trigger info
+ train_queries: list[dict] = []
+ test_queries: list[dict] = []
+ if history:
+ for r in history[0].get("train_results", history[0].get("results", [])):
+ train_queries.append({"query": r["query"], "should_trigger": r.get("should_trigger", True)})
+ if history[0].get("test_results"):
+ for r in history[0].get("test_results", []):
+ test_queries.append({"query": r["query"], "should_trigger": r.get("should_trigger", True)})
+
+ refresh_tag = ' \n' if auto_refresh else ""
+
+ html_parts = ["""
+
+
+ Optimizing your skill's description. This page updates automatically as Claude tests different versions of your skill's description. Each row is an iteration — a new description attempt. The columns show test queries: green checkmarks mean the skill triggered correctly (or correctly didn't trigger), red crosses mean it got it wrong. The "Train" score shows performance on queries used to improve the description; the "Test" score shows performance on held-out queries the optimizer hasn't seen. When it's done, Claude will apply the best-performing description to your skill.
+