case-simplifier
- Repo stars 25
- Author updated Live
- Author repo AscendOpGenAgent
- Domain
- Other
- Compatible agents
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- Trust score
- 88 / 100 · community maintained
- Author / version / license
- @Just-it · no license declared
- Token usage
- Lean
- Setup complexity
- Plug-and-play
- External API key
- Not required
- Operating systems
- Unspecified (assume cross-platform)
- Runtime requirements
- No special requirements
- Permissions
-
- Read-only
- Write / modify
- Network behavior
- Local-only
- Install commands
- 26 variants
Profile is derived at build time from SKILL.md and install vectors. Subject to drift from author intent.
Heads up: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: case-simplifier
description: > 你是一名测试用例精简专家。你的目标是读取 {output_dir} 中与算子对应的 .json 文件,对其中的输入 cases 进行精简,使 case 数量尽量不超过 10 个,同时保证覆…
category: other
runtime: no special runtime
---
# case-simplifier output preview
## PART A: Task fit
- Use case: > 你是一名测试用例精简专家。你的目标是读取 {output_dir} 中与算子对应的 .json 文件,对其中的输入 cases 进行精简,使 case 数量尽量不超过 10 个,同时保证覆盖度。 当前 benchmark 结构下,测试用例存储在 .json 文件中(与 model.py 配套),并应在 Phase 1 被复制到 {output_dir}/ 目录中。按以下优先级确定要处理的 .json 文件: runs entirely locally. Works with Claude Code, Cursor, Cline and 23 more..
- Inputs: target material, constraints, expected output, and acceptance criteria.
- Evidence boundary: follow “确定 .json 文件路径 / 关键限制 / 前置操作” and do not present inference as author intent.
## PART B: Execution result
- **01** The card summarizes the use case; runtime output centers on “> 你是一名测试用例精简专家。你的目标是读取 {output_dir} 中与算子对应的 .json 文件,对其中的输入 cases 进行精简,使 case 数量尽量不超过 10 个,同时保证覆盖度。 当前 benchmark 结构下,测试用例存储在 .json 文件中(与 model.py 配套),并应在 Phase 1 被复制到 {output_dir}/ 目录中。按以下优先级确定要处理的 .json 文件: runs entirely locally. Works with Claude Code, Cursor, Cline and 23 more.”.
- **02** When the source has headings, the agent prioritizes “确定 .json 文件路径 / 关键限制 / 前置操作” so the result follows the author’s structure.
- **03** Typical output includes task judgment, concrete steps, required commands or file edits, validation, and follow-up options.
- **04** Risk context follows the fingerprint: read files, write/modify files; mostly runs locally; usually needs no extra API key.
## Running Rules
- read files, write/modify files; mostly runs locally; usually needs no extra API key.
- Validate with a small sample before expanding scope.
- Return the result, validation criteria, and next iteration options. The source does not require a stable slash command. After installation, invoke the skill by name and describe the task.
Name target files or source material, expected output, forbidden changes, and whether network or shell access is allowed. Permission fingerprint: read files, write/modify files.
Start with a small task and check whether the result follows “确定 .json 文件路径 / 关键限制 / 前置操作”. Inspect diffs, logs, previews, or tests before expanding scope.
Confirm the final output includes a concrete result, evidence, and next action. If it stays generic, tighten inputs, boundaries, and acceptance criteria.
---
name: case-simplifier
description: > 你是一名测试用例精简专家。你的目标是读取 {output_dir} 中与算子对应的 .json 文件,对其中的输入 cases 进行精简,使 case 数量尽量不超过 10 个,同时保证覆…
category: other
source: Just-it/AscendOpGenAgent
---
# case-simplifier
## When to use
- > 你是一名测试用例精简专家。你的目标是读取 {output_dir} 中与算子对应的 .json 文件,对其中的输入 cases 进行精简,使 case 数量尽量不超过 10 个,同时保证覆盖度。 当前 benchmark 结构下,测…
- Use it when the task has clear inputs, repeatable steps, and validation criteria.
## What to provide
- Target material, scope, expected result, and forbidden changes.
- Whether network, commands, file writes, or external services are allowed.
## Execution rules
- Organize steps around “确定 .json 文件路径 / 关键限制 / 前置操作” and keep inference separate from source facts.
- read files, write/modify files; mostly runs locally; usually needs no extra API key.
- Validate with a small sample before expanding the task.
## Output requirements
- Return the deliverable, key evidence, validation method, and next action.
- Mark missing information as unknown; do not invent commands, platforms, or dependencies. The author source anchors workflow facts; repository files anchor sources and commands; Fluxly only adds fit, limitations, and quality judgment.
skill "case-simplifier" {
input -> user goal + target files + boundaries + acceptance criteria
context -> 确定 .json 文件路径 / 关键限制 / 前置操作
rules -> SKILL.md triggers / order / output contract
runtime -> no special runtime | read files, write/modify files | mostly runs locally
guardrails -> usually needs no extra API key + small-sample validation + diff/log review
output -> copyable result + checklist + next iteration
} 测试用例精简 Skill
你是一名测试用例精简专家。你的目标是读取 {output_dir} 中与算子对应的 .json 文件,对其中的输入 cases 进行精简,使 case 数量尽量不超过 10 个,同时保证覆盖度。
确定 .json 文件路径
当前 benchmark 结构下,测试用例存储在 .json 文件中(与 model.py 配套),并应在 Phase 1 被复制到 {output_dir}/ 目录中。按以下优先级确定要处理的 .json 文件:
- 读取
{output_dir}/model.py,分析get_input_groups()函数中引用的.json文件名(例如os.path.join(os.path.dirname(__file__), "xxx.json")),据此在{output_dir}内确定目标.json文件。由于model.py的__file__解析为model.py,get_input_groups()通常查找的是model.json,因此目标文件为{output_dir}/model.json。 - 如果
model.py中没有显式引用,则直接查找{output_dir}目录下因 Phase 1 复制而存在的.json文件(排除.json.bak)作为目标。
优先使用 {output_dir}/model.json(model.py 按 __file__ 查找同名 .json),同时保留 <op_name>.json 作为原始备份。如果找不到有效的 .json 文件,报错并停止。
关键限制
- 只允许修改确定的目标
.json文件,不要修改{output_dir}/model.py中的任何内容。 - 只允许修改或新增
{output_dir}/目录中的文件,不要改动其他目录中的文件。 - 只允许读取当前工作区目录结构内的文件与子目录;禁止读取当前工作区之外的任何路径。
前置操作
在精简前,务必将目标 .json 文件备份为同名的 .json.bak(例如 model.json.bak),以便后续全量验证时恢复。如果 <op_name>.json 是独立文件(非 model.json),也需一并备份。
精简原则
精简后的 cases 必须满足以下覆盖要求,按优先级从高到低:
- dtype 覆盖:原 cases 中出现的每种 tensor dtype(如 float16、float32、bfloat16 等)至少保留一个 case。
- attribute 可选值覆盖:对于
type: "attr"的输入,覆盖其在原 cases 中出现的不同取值类别(例如 bool 型的 True/False、正数/负数/零等边界值)。如果原始 attr 值变化很多,不要求每个值都保留,但要保留具有代表性的边界值。 - shape 维度覆盖:覆盖原 cases 中出现的不同 tensor 维度数(1维、2维、3维、4维等),每种维度至少保留一个 case。
- shape 极端值覆盖:保留极端小(如最小 shape)和极端大(如最大 shape)的 case。
- 广播模式覆盖(如适用):如果原 cases 中存在 broadcasting 场景(shape 不完全一致的 tensor 对),保留至少一个 broadcasting case。
流程
- 读取
.json文件:该文件为 JSON Lines 格式,每行是一个独立的 JSON 对象,结构通常为{"inputs": [...]}。逐行解析,提取所有 case。 - 统计分析:统计原始 cases 的 dtype 集合、attr 值集合、shape 维度集合、shape 大小范围、是否存在 broadcasting。
- 选取 case:按上述精简原则选取不超过 10 个代表性 case,尽量让每个 case 同时覆盖多个维度的差异。
- 写回
.json文件:将筛选后的 case 以 JSON Lines 格式写回原.json文件(每行一个json.dumps(...)对象,保持与原始格式一致),保持model.py不变。
Decide Fit First
Design Intent
How To Use It
Boundaries And Review