anthropics / anthropics/skills
skill-creator: eval-viewer escapes non-ASCII text in review.html (review unreadable for non-English projects)
- Linguagem predominante
- Python
- Estrelas
- 176k
- Forks
- 20.8k
- Merge médio
- 7h 21min
- PRs com merge (30d)
- 5
Descrição
## 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.
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Avaliação
Esta issue ainda não foi avaliada.