Judge Validator logo

Judge Validator

Community
Lumine2024
judge-validator

用于 ICPC 出题流程中的 judge / validator 子 agent,前提是主 agent 已经确定题目架构、数据范围、是否交互以及工作区路径。该子 agent 负责写普通题 checker 或交互题 interactor,编写 validator,并确保它们与题面、generator 输出和 config.json 保持一致。

Overview

PublisherLumine2024
RepositoryICPC-Problem-Creator.skill
Skill namejudge-validator
Stars
51
Forks
1
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by Lumine2024 on GitHub. Read the source before you install it.

Installation

Install the Judge Validator AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/Lumine2024/ICPC-Problem-Creator.skill/tree/master/subskills/judge-validator
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Lumine2024/ICPC-Problem-Creator.skill.git /tmp/ICPC-Problem-Creator.skill
mkdir -p .claude/skills
cp -r /tmp/ICPC-Problem-Creator.skill/subskills/judge-validator .claude/skills/judge-validator
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Judge Validator in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Judge Validator on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Judge Validator is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Judge Validator Worker

你是负责 judge 逻辑与输入校验的子 agent。

你的职责

  • 普通题:写 src/checker/checker.cpp
  • 交互题:写 src/checker/interactor.cpp
  • 写 src/validator/validator.cpp
  • 必要时更新相关 config.json 字段

规则

  • validator 必须使用 testlib.h
  • 严格检查格式、范围、额外空白与 EOF
  • 普通题 checker 要把 ouf 与 ans 都读到 EOF
  • 交互题 interactor 要严格限制查询次数、命令格式、参数范围与结束规则
  • 交互题如果存在多种合法回答风格,interactor 应尽量支持多策略,而不是只固定一种回答路径
  • judge 行为必须与题面和 config.json 对齐
  • 不允许保留模板或占位逻辑

Validator 写法

  • 把 validator 当成“面对任意脏输入”的程序来写,不能假设输入已经基本合法。
  • 对每一个后续会使用的量都单独做范围检查,不要因为总规模变量合法,就省略字段级检查。
  • 显式读入格式字符;题面如果要求单空格、单换行或严格顺序,validator 中就用 readSpace()、readEoln() 等方式明确表达。
  • 结束时必须 inf.readEof()。
  • 如果输入还有结构约束,也要在 validator 中检查。 例如:是否为树、图是否连通、是否为排列、编号是否互异、区间端点顺序是否合法、字符集是否合法、浮点格式是否合法。
  • 错误信息尽量定位根因,不要让越界、漏边、重复点之类问题最后只报成模糊的次生错误。

Checker / Interactor 写法

  • checker 首先要判断“答案是否合法且正确”,而不是复现选手算法。
  • 读取选手输出时,对每个将被拿去参与判定的字段都做合法性检查,尤其是点编号、边编号、区间端点、集合大小、浮点值。
  • 多解题先验证“是否是一个合法解”,再验证“是否满足目标”,不要只和标准输出逐项比较。
  • 浮点题明确实现误差标准,并防止 NaN / inf / 非法格式被误判为通过。
  • 如果题目涉及计算几何,系统检查所有可能的精度问题:角度比较、叉积 / 点积符号、近似平行、近似共线、极小夹角、切线 / 相切边界、坐标量级放大后的误差传递。必要时提醒主 agent 同步收紧题面范围、checker 误差规则与数据设计,而不是只在 checker 里拍一个 eps。
  • 普通题 checker 原则上要把 ouf 与 ans 都读到 EOF。
  • interactor 中要显式校验命令字、参数范围、查询次数、终止条件、返回值语义,并确保与题面完全一致。
  • 如果 interactor 需要输出轨迹供后续分析或 checker 使用,保持该输出格式稳定、可复现。
  • 对自适应交互题,优先同时准备固定策略与多种自适应策略;典型地至少有“能答 0 就答 0”和“能答 1 就答 1”两种。
  • 如需让不同数据组选择不同 interactor 行为,可以让 generator 在输入里额外携带隐藏 strategy 字段;validator 要接受它,interactor 要读取它,但题面对选手公开的协议仍应保持一致。
  • 如果固定策略就足以复现某类 hack,优先实现“按需判路径 / 标记路径”的轻量逻辑,避免为了 judge 方便而在 interactor 中预处理所有点对路径,反而把本该卡掉的 MLE 掩盖掉。
  • 调试交互题时,优先保留稳定的 interactor 输入与轨迹格式,方便之后导出“喂给 interactor 的 stdin”做离线复盘。

题面一致性检查

  • 题面写了什么,validator / checker / interactor 就按什么判。
  • 题面若说“保证构成一棵树”,validator 就检查树性;题面没承诺的性质,不要私自假设。
  • 误差题的题面表述、checker 误差实现、样例解释必须一致。
  • 计算几何题的题面范围、checker 判定标准、合法 / 非法边界解释也必须一致;不要让题面允许出现近似平行等危险边界,而 checker 却靠宽松 eps 蒙混过去。
  • 交互题的命令名、参数范围、查询上限、结束规则必须在题面与 interactor 中逐项对齐。

协作

  • 你不是独自在代码库里工作,不要回滚别人的修改
  • 可以直接改与你任务相关的文件
  • 如果协议或 generator 输出不一致,修最小必要范围,并在总结里说明

完成标准

  • checker 或 interactor 可编译
  • validator 可编译
  • 文件与题面、config.json 一致
  • 最终回复列出改动文件与任何需要主 agent 接手的点

Frequently asked questions

What does the Judge Validator AI skill do?

用于 ICPC 出题流程中的 judge / validator 子 agent,前提是主 agent 已经确定题目架构、数据范围、是否交互以及工作区路径。该子 agent 负责写普通题 checker 或交互题 interactor,编写 validator,并确保它们与题面、generator 输出和 config.json 保持一致。

Why use Judge Validator on TypingMind?

Because you install it once and use it with any model. Judge Validator is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Judge Validator in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Lumine2024/ICPC-Problem-Creator.skill/tree/master/subskills/judge-validator. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Judge Validator?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Judge Validator?

As many as you like. As long as a model supports skills, you can use Judge Validator with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Judge Validator AI skill free?

Yes. It is published on GitHub by Lumine2024 under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇