anthropics / anthropics/skills

skill-creator: eval-viewer escapes non-ASCII text in review.html (review unreadable for non-English projects)

オープン
#1,034 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
176k
フォーク
20.9k
平均マージ
7時間 21分
マージ済み PR(30日)
5

説明

## Summary

`skills/skill-creator/eval-viewer/generate_review.py` serializes the embedded review data with `json.dumps(embedded)` (line 279), which uses the default `ensure_ascii=True`. As a result, every non-ASCII character in eval prompts, outputs, agent transcripts, and grading evidence is stored as a `\uXXXX` escape sequence inside the standalone HTML.

When the viewer renders this data, the escapes are not unescaped back into glyphs — the user sees garbled text like `\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u0432` instead of the actual word (`контрактов` in this case). This makes the review essentially unusable for any project where prompts, code comments, or agent responses contain non-ASCII characters (Russian, Chinese, Japanese, German, French, etc.).

## Reproduction

1. Create an eval where the prompt or agent output contains non-ASCII characters (e.g. Russian: `Напиши план для задачи`).
2. Run the test cases and grading per the skill-creator workflow.
3. Generate the review:
```bash
python eval-viewer/generate_review.py /iteration-1 --static review.html
```
4. Open `review.html` in a browser. Non-ASCII text in the prompt/output/evidence panels appears as `\uXXXX` escapes.

## Fix

One-character change at line 279:

```python
# before
data_json = json.dumps(embedded)

# after
data_json = json.dumps(embedded, ensure_ascii=False)
```

Since the file is already written/read as UTF-8 and the `` in `viewer.html` is UTF-8, `ensure_ascii=False` is safe and produces correctly readable text.

The other two `json.dumps` calls in the same file (lines 369, 373) operate on data going through the HTTP feedback pipe — those are likely fine as-is, but worth a glance.

## Environment

- skill-creator from `anthropics/skills` (latest as of 2026-04-25)
- Python 3.14 on Windows
- Use case: building a project skill for a Russian-language codebase; reviews of agent outputs were unreadable.

Happy to send a PR if helpful — it's a one-liner.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。