answer-grader
Grade a written answer (release notes, summaries, commit messages, JSON payloads) against checks using the shared evaluators of the agent infra, store every run in the evals UI and track the score trend per suite. Use when the user says "grade this answer", "check this output", "does this meet the criteria", "score the release notes" or "show grading history".
- License 许可
- Unlicense
- 最近更新
- 2026-11-15
- Stars
- ★ 21
- Forks
- 9
01 前言 Front Matter
- name
- answer-grader
- description
- Grade a written answer (release notes, summaries, commit messages, JSON payloads) against checks using the shared evaluators of the agent infra, store every run in the evals UI and track the score trend per suite. Use when the user says "grade this answer", "check this output", "does this meet the criteria", "score the release notes" or "show grading history".
02 资源文件 6
- 参考文档evals/fixtures/bad.md29 B
- 参考文档evals/fixtures/checks.json205 B
- 参考文档evals/fixtures/good.md98 B
- 参考文档evals/suite.json1.5 KB
- 脚本scripts/agentinfra.py767 B
- 脚本scripts/grade.py3.2 KB
03 SKILL.md 正文
Answer Grader
Turns acceptance criteria into checks, grades an answer with the common evaluators of the
agent infra evals service, and remembers the score history per suite in this skill's own state
tenant (answer-grader). Every run shows up in the evals UI and in the centralized logs.
All commands run scripts/grade.py from this skill's base directory with Python 3.15 and print JSON.
Commands
| Goal | Command |
|---|---|
| See the evaluators | python3.15 scripts/grade.py evaluators |
| Grade an answer | python3.15 scripts/grade.py grade --suite <suite> --answer <file> --checks '<json list>' |
| See the trend | python3.15 scripts/grade.py history --suite <suite> |
A check is {"type": "<evaluator>", "value": <expected>}, such as:
[{"type": "contains", "value": "Breaking changes"}, {"type": "max_length", "value": 1200}, {"type": "not_contains", "value": "TODO"}]
Rules
- Write the answer to a file first, then grade the file.
- Derive checks only from criteria the user gave. Do not invent criteria.
- Use the same suite name for the same kind of answer so the trend is meaningful.
- When
failed_checksis not empty, fix the answer and grade again, at most 3 times. - Report the score, the trend and each failed check's
detail.
04 同仓库更多 Skills
word-count
Counts the words, lines and characters of a text or a file.
slugify
Turns a title or a sentence into a URL slug, lowercase words joined by hyphens with accents removed.
json-format
Validates a JSON file and pretty prints it with two space indentation, or reports where the JSON is invalid.
commit-message
Writes a conventional commit message for the staged git changes.
skills-gateway
Gateway and router to a catalog of skills that are not registered directly. Use it before any task a specialized skill could handle, such as text, JSON or git chores. It finds the right skill and loads its instructions.
decision-log
Record, list, show and supersede architecture decisions that persist across sessions in the shared agent infra state store. Use when the user says "record this decision", "log an ADR", "what did we decide about", "list decisions", or "supersede decision".