Introduction¶
When creating problems for Online Judges (OJ) or algorithmic challenges, preparing test data is often more time-consuming than writing the problem statement itself: one must cover boundary conditions, control data scales, and run the standard solution to generate corresponding .out files. Manually writing generation scripts and batch-running standard solutions involves repetitive steps and is prone to oversight. This article introduces the community Skill “OJ Test Data Generator” on SkillHub. It integrates “reading problem statements → analyzing problem types → generating data → running standard solutions” into an Agent workflow. By default, it produces 10 sets of .in/.out files and utilizes cyaron for generation logic.
What is This¶
“OJ Test Data Generator” is an Agent Skill identified as @user_b89a4d0a/oj-data-generator. The current version is 1.3.1. It originates from the community, is published by user_b89a4d0a, and is categorized under dev-programming in SkillHub. The page indicates requires_api_key=false, meaning no additional API Key is needed after installation.
In one sentence: It automatically analyzes the problem type based on the description, generates test inputs, obtains outputs using the standard solution, and delivers test points in a folder format; it only packages into a ZIP if the user explicitly requests it.
Official Access:
- SkillHub Display Page: https://www.skillhub.cn/skills/user_b89a4d0a/oj-data-generator
- API Coordinate Page: https://api.skillhub.cn/user_b89a4d0a/oj-data-generator
Core Functions¶
The following capabilities are derived from the Skill’s official description and the SkillHub page; unverified details are not expanded upon.
- Problem Type Analysis: Infers suitable test data forms and scale strategies based on the user-provided problem description.
- Fixed Scale Output: Generates 10 sets of test data by default, with each set containing
.inand.outfiles. - cyaron Generation Scripts: Data generation logic is written based on the cyaron library, facilitating control over common OJ data patterns such as random graphs, sequences, and ranges.
- Standard Solution Driven Answers: After generating
.infiles, it runs the user-provided standard solution (standard program) to produce corresponding.outfiles, avoiding manual calculation or copy-pasting of answers. - Output Form: Writes test points to a folder by default; ZIP output is only provided when the user explicitly requests packaging.
The Skill is selected when the user mentions creating data, producing test points, generating OJ test data, writing cyaron scripts, or performing pairwise testing (duipaimai), or uses expressions such as “test data / test point / test data / data generation / cyaron / creating data / problem setting.”
Installation and Activation¶
Installation follows the official SkillHub documentation SkillHub Installation and Priority Source Configuration. The page also states: Please install @user_b89a4d0a/oj-data-generator according to that document.
1. Check or Install skillhub CLI¶
First, confirm if the CLI exists on the local machine:
command -v skillhub && skillhub --version
If not installed, execute the full installation (CLI and default Skills) as recommended by the official site:
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash
If only the CLI is needed:
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash -s -- --cli-only
2. Install this Skill to the current Agent’s skills directory¶
Official Requirement: During installation, you must use --dir to point to the skills directory currently in use by the Agent. Otherwise, it defaults to installing to ./skills/, and the Agent may fail to load it.
skillhub install @user_b89a4d0a/oj-data-generator --dir <skills directory>
Common Client Skills Paths (excerpt from SkillHub installation docs):
| Client | Skills Directory |
|---|---|
| Cursor | ~/.cursor/skills/ |
| Claude Code | ~/.claude/skills/ |
| Codex | ~/.codex/skills/ or .agents/skills/ in the project |
| Windsurf | ~/.codeium/windsurf/skills/ or .windsurf/skills/ |
After installation, restart or refresh the Agent according to the convention of your client to enable the new Skill. The difference between Codex CLI, Claude Code, and Cursor lies only in the --dir target path; the installation command itself is consistent.
Typical Usage¶
Public materials do not include an independent command-line sub-tool; usage is completed within a conversation with an Agent that has enabled this Skill. You can organize your input in the following order to facilitate the Agent’s execution according to Skill conventions.
- Provide Complete Problem Statement: Input/output formats, data ranges, and special constraints (e.g., guaranteed solution existence, graph connectivity).
- Provide Standard Solution: Source code for the standard solution that can be compiled and run, along with compilation/execution commands (e.g.,
g++ -O2 -std=c++17). - Specify Data Requirements (Optional): If fewer or more than the default 10 sets are needed, or a specific strength distribution is required, state it clearly in the conversation; if not specified, the Skill defaults to 10 sets.
- Confirm Delivery Form: By default, you will receive a directory containing multiple sets of
.in/.outfiles; explicitly say “package into a zip” if a ZIP is required.
Following these steps, the Agent should generate a cyaron-based data script, write the test inputs, and call the standard solution to generate .out files. The local environment must be able to install and run cyaron (Python) and the compiler or runtime required for the standard solution; otherwise, generation or running the standard solution will fail. Specific dependency versions are subject to the script generated by the Agent; this article does not include fixed version numbers not disclosed within the Skill package.
Use Cases and Precautions¶
Target Audience
- Problem setters and teaching assistants for algorithmic competitions, campus OJs, and pairwise verification stages.
- Developers who are familiar with the problem statement and standard solution and wish to delegate “writing generators + batch generating points” to an Agent.
Precautions
- The standard solution must be correct and consistent with the problem statement; the Skill writes
.outfiles based on the standard solution’s output. An incorrect standard solution will result in wrong answers for all test points. - Defaults to 10 sets of data; larger scales or special data forms require additional explanation in the conversation.
- Do not expect a ZIP by default; ZIP should only be requested when explicit packaging is needed to avoid an unnecessary archiving step.
- SkillHub Statistics (as of page display): Rating 100000, Downloads 708; it is a community Skill, and maintenance rhythm depends on the publisher.
Conclusion¶
“OJ Test Data Generator” connects cyaron data generation, standard solution execution, and .in/.out directory delivery into a repeatable Agent workflow, suitable for quickly moving from a problem statement to usable OJ test points. For installation and coordinates, refer to SkillHub:
https://www.skillhub.cn/skills/user_b89a4d0a/oj-data-generator