[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7F7EG7ECXQKDBHXFZ7JY891":3,"skill-same:01M7F7EG7ECXQKDBHXFZ7JY891":56},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M7F7EG7ECXQKDBHXFZ7JY891","testlib-cpp-judging",null,"Guide C++ competitive-programming judging with the bundled testlib.h. Use when the user asks to author special or scored checkers, strict validators, deterministic generators, basic interactors, or a minimal local solution-checker workflow.","lza6\u002FArmor-piercing-system-prompts","lza6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F128880206?v=4","01M7EB3K7WPX5T28EJ2NVHE6EG","Chinese-tingfeng","01M7EB3K97E1KQ16QWKJMFNGX8",11,"MIT","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F06-前端与设计\u002Falgorithmic-problem-solving\u002Fsub-skills\u002Ftestlib-cpp-judging\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: testlib-cpp-judging\ndescription: \"Guide C++ competitive-programming judging with the bundled testlib.h. Use when the user asks to author special or scored checkers, strict validators, deterministic generators, basic interactors, or a minimal local solution-checker workflow.\"\n---\n\n# Testlib C++ Judging\n\n## Scope\n\nUse this skill when a task involves `testlib.h`, a special judge, a custom\nchecker or scorer, an input validator, a deterministic test generator, or a\ntestlib interactor. It is intentionally C++-only and header-only. Do not create\na Python harness for the ordinary local judging workflow.\n\nThis skill owns concrete Testlib APIs, streams, verdicts, command lines, and\ntemplates. When evaluator-facing evidence has triggered independent contract or\noracle work, use [checker and local evaluation](..\u002Fchecker-and-local-evaluation\u002FSKILL.md)\nto choose checker\u002Fscorer\u002Finteractor architecture, reconstruct legality and\nobjectives, and validate the evaluator itself. Do not enter that route merely\nbecause a previously specified generator or validator is being implemented.\n\n## Start Here\n\n1. Read [the testlib usage guide](references\u002Ftestlib-usage.md) before writing\n   checker, validator, generator, or interactor code.\n2. Copy the bundled [testlib.h](scripts\u002Ftestlib.h) into the working directory\n   beside the C++ sources, or add its directory to the compiler include path.\n3. Put `#include \"testlib.h\"` before other includes.\n4. Select exactly one registration function for each executable.\n5. For ordinary offline judging, use the minimal commands below rather than\n   building a separate evaluation framework.\n\n## Choose the Executable Role\n\n| Role | Registration | Main testlib interfaces | Purpose |\n| --- | --- | --- | --- |\n| Checker | `registerTestlibCmd(argc, argv)` | `inf`, `ouf`, `ans`, `quitf` | Judge contestant output against the input and reference answer |\n| Validator | `registerValidation(argc, argv)` | strict `inf`, `ensuref` | Reject malformed or out-of-constraint input |\n| Generator | `registerGen(argc, argv, 1)` | `rnd`, `opt`, `println` | Produce deterministic tests from command-line parameters |\n| Interactor | `registerInteraction(argc, argv)` | `inf`, `ouf`, `tout`, stdout | Exchange a protocol with an interactive solution |\n\n## Generate Data as Reproducible Code\n\nTestlib includes input-generation support; it is not limited to checkers and validators. When a local problem-finding campaign needs randomized, batch, or maximum-scale data, implement a problem-specific `generator.cpp` instead of hand-authoring large inputs or copying many variants. Parameterize the relevant case family, size, density\u002Fbias, structure, and seed tag with `opt`; use `rnd` for all randomness. The full command line determines Testlib's deterministic seed, so preserve that command exactly.\n\nDefine the coverage families and their expected oracle, invariant, or failure target before generating volume. Use one deterministic generator invocation per case, or a small coded batch driver that records every invocation in a manifest. Validate every intended-valid generated case with an independent validator before running the solution, and retain the generator command, input hash, validator result, and any failing seed and artifacts. Follow [Checker and Local Evaluation](..\u002Fchecker-and-local-evaluation\u002FSKILL.md#build-problem-finding-data-end-to-end) for the complete coverage-to-retention workflow.\n\n## Critical Checker Contract\n\nAlways invoke a checker in this exact order:\n\n```\nchecker \u003Cinput-file> \u003Ccontestant-output> \u003Cstandard-answer>\n```\n\nAfter registration, the mapping is:\n\n- `inf`: input file\n- `ouf`: contestant or participant output\n- `ans`: standard or jury answer\n\nNever swap `ouf` and `ans`. Even a checker that does not use the standard\nanswer still needs the third file argument; pass an empty placeholder file if\nnecessary.\n\n## Minimal Local Judging Flow\n\nRun these commands from a directory containing `testlib.h`, `solution.cpp`,\n`checker.cpp`, `case.in`, and `case.ans`:\n\n```bash\ng++ -std=c++17 -O2 solution.cpp -o solution\ng++ -std=c++17 -O2 -I. checker.cpp -o checker\n\ntimeout 2s .\u002Fsolution \u003C case.in > case.out\nsolver_status=$?\nif [ \"$solver_status\" -ne 0 ]; then\n  echo \"solution failed with status $solver_status\" >&2\n  exit \"$solver_status\"\nfi\n.\u002Fchecker case.in case.out case.ans\nchecker_status=$?\necho \"$checker_status\"\nexit \"$checker_status\"\n```\n\nIf the problem has `validator.cpp`, compile it and validate the input before\nrunning the solution:\n\n```bash\ng++ -std=c++17 -O2 -I. validator.cpp -o validator\n.\u002Fvalidator \u003C case.in || exit 1\n```\n\nCapture `solver_status` before running the checker; a timeout, signal, or other\nnonzero solution exit is a solver failure and must not be relabeled as an output\nverdict. Capture `checker_status` immediately after the checker. For a\nverdict-only checker under the default local Testlib configuration, status `0`\nmeans accepted and nonzero means rejection or judge failure. A points checker\nusing `quitp` instead returns a partial-points status (default `7`) that a\npoints-aware runner must parse separately. Preserve checker diagnostics and any\nreported points with the status.\n\n## Authoring Rules\n\n- Use testlib readers instead of raw parsing for judged files.\n- Return `_wa` for a semantically wrong contestant answer, `_pe` for malformed\n  contestant output when you detect it explicitly, `_fail` for a broken jury\n  answer or checker invariant, and `_ok` only after all required checks pass.\n- In validators, describe the exact grammar with `readSpace`, `readEoln`, and\n  `readEof`; use bounded reads and `ensuref` for semantic constraints.\n- In generators, use `rnd` rather than `rand`, `srand`, or\n  `random_shuffle`; identical command lines should reproduce identical data.\n- Implement batch and large-case generation in generator code; do not maintain\n  hand-edited large input files as the source of truth.\n- Run every intended-valid generated case through the independent validator and\n  preserve its full generator command and seed tag.\n- Flush every interactor query with `std::endl` or an explicit flush.\n- Keep `solution.cpp`, checker logic, validator logic, and answer generation as\n  separate concerns.\n\n## Boundaries\n\n- This skill explains the public `testlib.h` workflow, not development of the\n  testlib repository itself.\n- For evaluator roles, this skill implements a previously derived contract. Use\n  [checker and local evaluation](..\u002Fchecker-and-local-evaluation\u002FSKILL.md) only\n  when contract, reconstruction, score-transform, or fidelity uncertainty is\n  evidence-triggered and blocks the current decision, or when official and local\n  behavior disagree.\n- This skill owns concrete testlib implementation. Use\n  [interactive problem solving](..\u002Finteractive-problem-solving\u002FSKILL.md) for\n  protocol modeling, hidden hypotheses, query design, and adversarial strategy.\n- It does not bundle a Python evaluator, a build system, repository tests, or\n  CI configuration.\n- The simple three-file flow is for non-interactive judging. Interactive\n  solutions require a bidirectional process runner supplied by the judge.\n- Partial scoring needs a runner that understands testlib points verdicts; do\n  not interpret every nonzero checker status as ordinary wrong answer in that\n  mode.\n\n## Troubleshooting\n\n- Read [troubleshooting](references\u002Ftroubleshooting.md) when compilation,\n  checker arguments, strict whitespace, exit status, generator reproducibility,\n  or interactor flushing causes a failure.\n","# Testlib C++ Judging\n\n## Scope\n\nUse this skill when a task involves `testlib.h`, a special judge, a custom\nchecker or scorer, an input validator, a deterministic test generator, or a\ntestlib interactor. It is intentionally C++-only and header-only. Do not create\na Python harness for the ordinary local judging workflow.\n\nThis skill owns concrete Testlib APIs, streams, verdicts, command lines, and\ntemplates. When evaluator-facing evidence has triggered independent contract or\noracle work, use [checker and local evaluation](..\u002Fchecker-and-local-evaluation\u002FSKILL.md)\nto choose checker\u002Fscorer\u002Finteractor architecture, reconstruct legality and\nobjectives, and validate the evaluator itself. Do not enter that route merely\nbecause a previously specified generator or validator is being implemented.\n\n## Start Here\n\n1. Read [the testlib usage guide](references\u002Ftestlib-usage.md) before writing\n   checker, validator, generator, or interactor code.\n2. Copy the bundled [testlib.h](scripts\u002Ftestlib.h) into the working directory\n   beside the C++ sources, or add its directory to the compiler include path.\n3. Put `#include \"testlib.h\"` before other includes.\n4. Select exactly one registration function for each executable.\n5. For ordinary offline judging, use the minimal commands below rather than\n   building a separate evaluation framework.\n\n## Choose the Executable Role\n\n| Role | Registration | Main testlib interfaces | Purpose |\n| --- | --- | --- | --- |\n| Checker | `registerTestlibCmd(argc, argv)` | `inf`, `ouf`, `ans`, `quitf` | Judge contestant output against the input and reference answer |\n| Validator | `registerValidation(argc, argv)` | strict `inf`, `ensuref` | Reject malformed or out-of-constraint input |\n| Generator | `registerGen(argc, argv, 1)` | `rnd`, `opt`, `println` | Produce deterministic tests from command-line parameters |\n| Interactor | `registerInteraction(argc, argv)` | `inf`, `ouf`, `tout`, stdout | Exchange a protocol with an interactive solution |\n\n## Generate Data as Reproducible Code\n\nTestlib includes input-generation support; it is not limited to checkers and validators. When a local problem-finding campaign needs randomized, batch, or maximum-scale data, implement a problem-specific `generator.cpp` instead of hand-authoring large inputs or copying many variants. Parameterize the relevant case family, size, density\u002Fbias, structure, and seed tag with `opt`; use `rnd` for all randomness. The full command line determines Testlib's deterministic seed, so preserve that command exactly.\n\nDefine the coverage families and their expected oracle, invariant, or failure target before generating volume. Use one deterministic generator invocation per case, or a small coded batch driver that records every invocation in a manifest. Validate every intended-valid generated case with an independent validator before running the solution, and retain the generator command, input hash, validator result, and any failing seed and artifacts. Follow [Checker and Local Evaluation](..\u002Fchecker-and-local-evaluation\u002FSKILL.md#build-problem-finding-data-end-to-end) for the complete coverage-to-retention workflow.\n\n## Critical Checker Contract\n\nAlways invoke a checker in this exact order:\n\n```\nchecker \u003Cinput-file> \u003Ccontestant-output> \u003Cstandard-answer>\n```\n\nAfter registration, the mapping is:\n\n- `inf`: input file\n- `ouf`: contestant or participant output\n- `ans`: standard or jury answer\n\nNever swap `ouf` and `ans`. Even a checker that does not use the standard\nanswer still needs the third file argument; pass an empty placeholder file if\nnecessary.\n\n## Minimal Local Judging Flow\n\nRun these commands from a directory containing `testlib.h`, `solution.cpp`,\n`checker.cpp`, `case.in`, and `case.ans`:\n\n```bash\ng++ -std=c++17 -O2 solution.cpp -o solution\ng++ -std=c++17 -O2 -I. checker.cpp -o checker\n\ntimeout 2s .\u002Fsolution \u003C case.in > case.out\nsolver_status=$?\nif [ \"$solver_status\" -ne 0 ]; then\n  echo \"solution failed with status $solver_status\" >&2\n  exit \"$solver_status\"\nfi\n.\u002Fchecker case.in case.out case.ans\nchecker_status=$?\necho \"$checker_status\"\nexit \"$checker_status\"\n```\n\nIf the problem has `validator.cpp`, compile it and validate the input before\nrunning the solution:\n\n```bash\ng++ -std=c++17 -O2 -I. validator.cpp -o validator\n.\u002Fvalidator \u003C case.in || exit 1\n```\n\nCapture `solver_status` before running the checker; a timeout, signal, or other\nnonzero solution exit is a solver failure and must not be relabeled as an output\nverdict. Capture `checker_status` immediately after the checker. For a\nverdict-only checker under the default local Testlib configuration, status `0`\nmeans accepted and nonzero means rejection or judge failure. A points checker\nusing `quitp` instead returns a partial-points status (default `7`) that a\npoints-aware runner must parse separately. Preserve checker diagnostics and any\nreported points with the status.\n\n## Authoring Rules\n\n- Use testlib readers instead of raw parsing for judged files.\n- Return `_wa` for a semantically wrong contestant answer, `_pe` for malformed\n  contestant output when you detect it explicitly, `_fail` for a broken jury\n  answer or checker invariant, and `_ok` only after all required checks pass.\n- In validators, describe the exact grammar with `readSpace`, `readEoln`, and\n  `readEof`; use bounded reads and `ensuref` for semantic constraints.\n- In generators, use `rnd` rather than `rand`, `srand`, or\n  `random_shuffle`; identical command lines should reproduce identical data.\n- Implement batch and large-case generation in generator code; do not maintain\n  hand-edited large input files as the source of truth.\n- Run every intended-valid generated case through the independent validator and\n  preserve its full generator command and seed tag.\n- Flush every interactor query with `std::endl` or an explicit flush.\n- Keep `solution.cpp`, checker logic, validator logic, and answer generation as\n  separate concerns.\n\n## Boundaries\n\n- This skill explains the public `testlib.h` workflow, not development of the\n  testlib repository itself.\n- For evaluator roles, this skill implements a previously derived contract. Use\n  [checker and local evaluation](..\u002Fchecker-and-local-evaluation\u002FSKILL.md) only\n  when contract, reconstruction, score-transform, or fidelity uncertainty is\n  evidence-triggered and blocks the current decision, or when official and local\n  behavior disagree.\n- This skill owns concrete testlib implementation. Use\n  [interactive problem solving](..\u002Finteractive-problem-solving\u002FSKILL.md) for\n  protocol modeling, hidden hypotheses, query design, and adversarial strategy.\n- It does not bundle a Python evaluator, a build system, repository tests, or\n  CI configuration.\n- The simple three-file flow is for non-interactive judging. Interactive\n  solutions require a bidirectional process runner supplied by the judge.\n- Partial scoring needs a runner that understands testlib points verdicts; do\n  not interpret every nonzero checker status as ordinary wrong answer in that\n  mode.\n\n## Troubleshooting\n\n- Read [troubleshooting](references\u002Ftroubleshooting.md) when compilation,\n  checker arguments, strict whitespace, exit status, generator reproducibility,\n  or interactor flushing causes a failure.\n",{"name":5,"description":7},"main","d69096e239f2a89aabc2cd078c47664a9d3b1e11","06-前端与设计\u002Falgorithmic-problem-solving\u002Fsub-skills\u002Ftestlib-cpp-judging",3,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts","https:\u002F\u002Fgithub.com\u002Flza6","个人vx：Tf00798\r\n个人✈：@TFGY999","2026-10-08 14:29:22",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add lza6\u002FArmor-piercing-system-prompts --skill testlib-cpp-judging",{"tool":38,"command":39},"bunx","bunx skills add lza6\u002FArmor-piercing-system-prompts --skill testlib-cpp-judging",{"tool":41,"command":42},"pnpm","pnpm dlx skills add lza6\u002FArmor-piercing-system-prompts --skill testlib-cpp-judging","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F06-前端与设计\u002Falgorithmic-problem-solving\u002Fsub-skills\u002Ftestlib-cpp-judging\u002FSKILL.md",true,[46,52],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"references\u002Ftestlib-usage.md","REFERENCE","参考文档",10615,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F06-前端与设计\u002Falgorithmic-problem-solving\u002Fsub-skills\u002Ftestlib-cpp-judging\u002Freferences\u002Ftestlib-usage.md",{"path":53,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":54,"sourceHtmlUrl":55},"references\u002Ftroubleshooting.md",2943,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F06-前端与设计\u002Falgorithmic-problem-solving\u002Fsub-skills\u002Ftestlib-cpp-judging\u002Freferences\u002Ftroubleshooting.md",[57,64,69,76,83,90],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M7FFG485KY83TD6HSC4YPCMC","obsidian-clipper-template-creator","Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator\u002FSKILL.md",[],[],{"skillNo":65,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M7FFG0T6AZ0STEJPSB3CX84K","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator-antigravity-awesome-skills-main\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M7FFFY0QEM14SKWPDYGMXM2P","python-api","Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP\u002FmAP semantics, and source-style import diagnostics.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Fpython-api\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M7FFFVZQZ2GJ0C0TGP7JHD20","file-evaluation","Folder-based PASCAL VOC AP\u002FmAP evaluation from ground-truth and detection text files.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Ffile-evaluation\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M7FFFSFNYSE77SJ6PE1CK2DA","object-detection-metrics","Guides legacy Object-Detection-Metrics PASCAL VOC AP\u002FmAP evaluation from detection text folders and direct Python API classes.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":19},"01M7FFFP0GCK1RVXBCPQ8APBMT","nx-workspace-patterns","Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fnx-workspace-patterns\u002FSKILL.md",[],[]]