Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion skills/skill-creator/scripts/generate_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ def main():
html_output = generate_html(data, skill_name=args.skill_name)

if args.output:
Path(args.output).write_text(html_output)
Path(args.output).write_text(html_output, encoding="utf-8")
print(f"Report written to {args.output}", file=sys.stderr)
else:
print(html_output)
Expand Down
5 changes: 3 additions & 2 deletions skills/skill-creator/scripts/run_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import json
import os
import select
import shutil
import subprocess
import sys
import time
Expand Down Expand Up @@ -65,10 +66,10 @@ def run_single_query(
f"# {skill_name}\n\n"
f"This skill handles: {skill_description}\n"
)
command_file.write_text(command_content)
command_file.write_text(command_content, encoding="utf-8")

cmd = [
"claude",
shutil.which("claude") or "claude.cmd",
"-p", query,
"--output-format", "stream-json",
"--verbose",
Expand Down
10 changes: 5 additions & 5 deletions skills/skill-creator/scripts/run_loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def run_loop(
"test_size": len(test_set),
"history": history,
}
live_report_path.write_text(generate_html(partial_output, auto_refresh=True, skill_name=name))
live_report_path.write_text(generate_html(partial_output, auto_refresh=True, skill_name=name), encoding="utf-8")

if verbose:
def print_eval_stats(label, results, elapsed):
Expand Down Expand Up @@ -275,7 +275,7 @@ def main():
else:
live_report_path = Path(args.report)
# Open the report immediately so the user can watch
live_report_path.write_text("<html><body><h1>Starting optimization loop...</h1><meta http-equiv='refresh' content='5'></body></html>")
live_report_path.write_text("<html><body><h1>Starting optimization loop...</h1><meta http-equiv='refresh' content='5'></body></html>", encoding="utf-8")
webbrowser.open(str(live_report_path))
else:
live_report_path = None
Expand Down Expand Up @@ -310,15 +310,15 @@ def main():
json_output = json.dumps(output, indent=2)
print(json_output)
if results_dir:
(results_dir / "results.json").write_text(json_output)
(results_dir / "results.json").write_text(json_output, encoding="utf-8")

# Write final HTML report (without auto-refresh)
if live_report_path:
live_report_path.write_text(generate_html(output, auto_refresh=False, skill_name=name))
live_report_path.write_text(generate_html(output, auto_refresh=False, skill_name=name), encoding="utf-8")
print(f"\nReport: {live_report_path}", file=sys.stderr)

if results_dir and live_report_path:
(results_dir / "report.html").write_text(generate_html(output, auto_refresh=False, skill_name=name))
(results_dir / "report.html").write_text(generate_html(output, auto_refresh=False, skill_name=name), encoding="utf-8")

if results_dir:
print(f"Results saved to: {results_dir}", file=sys.stderr)
Expand Down