test-case-design

test-case-design is a skill for Codex from BackToCimaCoppi/Praxis. It costs 101 tokens per session (6,506 once invoked), scanned A, original, Apache-2.0.

A method for turning product and technical requirements into detailed tests with clear checks and links back to the original requirements. TDD means writing tests before implementation, but this add-on describes test design rather than test execution.

In plain words
What is it for?
Use it to define white-box tests of program logic, black-box tests from a user's viewpoint, data rules, error cases, and traceability between requirements and tests.
Why use it?
It prevents vague tests such as only checking whether a page opens, and keeps tests from being weakened to match the implementation.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/backtocimacoppi/praxis/test-case-design
Any agent
npx skills add BackToCimaCoppi/Praxis --skill test-case-design
Clone the repo
git clone --depth 1 https://github.com/BackToCimaCoppi/Praxis

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for test-case-design

README.md
[![agentmods](https://agentmods.dev/badge/skills/backtocimacoppi/praxis/test-case-design.svg)](https://agentmods.dev/skills/backtocimacoppi/praxis/test-case-design)
Your own site
<a href="https://agentmods.dev/skills/backtocimacoppi/praxis/test-case-design"><img src="https://agentmods.dev/badge/skills/backtocimacoppi/praxis/test-case-design.svg" alt="Measured on agentmods" height="20"></a>
Per session 101 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,506 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00101 $0.06506
Opus 5 $0.00051 $0.03253
Sonnet 5 $0.00020 $0.01301
Haiku 4.5 $0.00010 $0.00651

Measured 6d ago against content hash 20571603de0d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

test-case-design scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/test-case-design/SKILL.md · 297 lines

How it starts

The opening of the file, as written. The whole thing — 297 lines — stays where its author put it; the contents beside it link to each section on GitHub.

测试用例层

本 skill 只回答:AI 如何写高质量测试用例。不要写具体执行命令、端口、账号或工具步骤;这些交给 test-execution-router 与项目执行 skill。

0. 第一原则

在纯 AI 开发 loop 中,用例质量决定交付质量。测试用例必须先于施工冻结,作为施工后的验收真值;施工阶段不得因为代码跑不过而就地改断言。

[!CAUTION] 用例不再只是验收资产,它是施工规格——是承重墙。 结果管控模式下,冻结用例的 spec_hash 是 goal 不得改写的施工锚;goal 只能产出候选件,最终完成由候选终审对真实断言与执行证据独立判定。用例写虚了,后面的网再多也只会验收一个虚目标(写虚/可对账的判据见 §2.1)。

这一层松一寸,后面全线失守。 所以本 skill 有两条硬要求(§2):每条断言有稳定编号每条断言可对账

防作弊的不变量:脚本断言集合 ⊇ 规格断言集合。

脚本是规格的翻译——翻译可以修(写错了本来就该改),但不能删原文。因此:

用例规格(本 skill 产出) 测试脚本(goal 产出)
谁写的 产品施工之外,经评审 goal 的 M0 或正式验证阶段实现并修复
是什么 断言的定义 断言的翻译
能不能改 语义不可变(改了必须留痕) 随便改,改错了本来就该改
哈希锚 spec_hash ← 锚在这 没有,也不该有

不要去冻结测试脚本的哈希:脚本有 bug → 改了才能跑通 → 哈希变了 → 判定失败 → 死锁。锚必须锚在规格上,不是锚在翻译上。

每个重要功能至少同时考虑两条视角:

  • 白盒链路用例:从程序链路、状态分支、数据不变量、异常边界推导。
  • 黑盒业务用例:从用户视角、业务流程、权限/空态/错误态推导。

只写“测试新增接口是否正常”“验证页面能打开”属于空壳用例,必须重写。

1. 输入真值

按这个顺序收集来源:

来源 提供什么
L1 需求 用户目标、业务链路、业务规则、不变量、异常边界
L2 交互 页面状态、交互路径、视觉规格、空态/错误态
L3 契约 请求/响应字段、错误码、鉴权、状态流
L4 数据库 表结构、约束、索引语义、跨域 ID、终态不变量
L5 客户端方案 状态管理、页面链路、缓存/重试/降级决策
L6 服务端方案 状态机、事务边界、幂等、异步/补偿、外部依赖
轻量设计方案 决策表 DP-x + 完整规范条目索引 SD-x + 最终任务真值切片;用例必须覆盖所有可观察 SD,不能只覆盖 DP
授权裁决记录 _shared/用户裁决记录.md#DEC-x;证明死亡线/业务结果/契约与数据语义来自业务决策负责人,而非评审或测试层发明;兼容文件名不代表当前交互方自动有权
diff 本次真实改动面、风险面、回归范围

遇到上游不一致时,不要自行裁决;继续完成当前切片的有界只读检查,把真实决策缺口合并成一份裁决表。

例外——「设计没说」不是冲突,是缺陷:写断言时发现设计根本没定义这种情况下的结果,这不是测试层可以代答的问题。 处置:若正式真值能唯一推出答案,回填设计;若必须在多个业务结果之间选择,把本切片缺口合并给业务决策负责人裁决并生成 DEC-x 后再回填。测试层与评审者都不得自行补出业务语义。 判据——「设计选错了」→ 那是翻案,设计已冻结,不许(走上游评审);「设计没说」→ 必须放行并回填

2. 用例规格字段

每条用例必须包含:

字段 要求
case_id 稳定、可引用;同一批内唯一。冻结后不得重排、不得复用——它是 change_logexecution_ref 的锚,改了就断链
case_type white_box / black_box / golden / contract / visual / manualgolden 的判定见 §2.2)
design_refs 对应 SD-x / DP-x;只用于证明设计传导,不是施工真值
provenance_refs 涉及业务结果、死亡线、契约/数据语义或不可逆归属时必填 DEC-x 或上游正式真值锚点;普通机械用例可为空
formal_spec_refs 正式 L1~L6 文件 + 小节锚点;用例设计阶段可先填已规划目标,规格冻结前必须全部可解析
business_goal 用户或业务要被保护的结果
risk_guarded 防什么回归、误解或质量风险
preconditions 前置账号、权限、数据、环境状态
data_strategy DB 预置 / 接口造数 / 复用数据 / 人工前置
steps 业务步骤,不写工具命令
expected 可验证的业务结果
assertions 逐条编号的断言清单——格式与硬要求见 §2.1
automation 自动化类型或 manual_required
env_fidelity 保真度:real(真实链路)/ simulated(mock、构造回调、仿真数据等替身)/ manual(人工验证)。默认 real;凡用替身替代真实外部依赖的必须标 simulated,并注明真实链路在哪里收口(真机硬门 / 手工 runbook / 后续任务)——模拟绿冒充真连绿是交付阻断项
execution_ref 目标测试文件/用例锚点;用例设计 / 规格冻结阶段可填预定锚点,goal 的 M0 负责实现为可运行落点,后续可按冻结语义修复
manual_reason 仅手工用例填写:AI 无法操作的真实设备/原生对象/原生授权等物理边界证明;“视觉判断”“GUI”“交互式工具”不成立
manual_runbook 仅手工用例填写:责任角色步骤、客观观测点、回传材料与计划内人工里程碑

Read the full file on GitHub · 297 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 297 lines · 101 tokens per session scan A 20571603de0d

Subscribe to this mod's changes

test-case-design is a skill published in the GitHub repository BackToCimaCoppi/Praxis (6 stars, last pushed 11d ago), licensed Apache-2.0. It adds 101 tokens to every session and 6,506 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

prompt-master

Generates optimized prompts for AI tools. Activates only when the user explicitly asks to write, fix, improve, or adapt a prompt for a specific AI tool (LLM, Cursor, Midjourney, image AI, video AI, coding agents, etc.). Does not activate for general conversation, coding tasks, document writing, or other…

nidhinjs/prompt-master · 78 tokens

prd-taskmaster

Zero-config goal-to-tasks engine (the Atlas engine). Takes any goal (software, pentest, business, learning), runs adaptive discovery via brainstorming, generates a validated spec, parses into TaskMaster tasks, and hands off to execution. Use when user says "PRD", "product requirements", "I want to build", invokes…

anombyte93/prd-taskmaster · 80 tokens

browser-tools

Security wrapper over the upstream agent-browser skill, adding URL blocklisting, rate limiting, robots.txt enforcement, and scraping guardrails. Use when automating browser workflows that need safety limits.

yonatangross/orchestkit · 40 tokens

auto

Intent-classified router, the front door to OrchestKit and the DEFAULT entry point for any goal-shaped request. Classifies a plain-English goal and routes it to the right specialist skill. Routing is never overhead, so use it even when the target skill seems obvious; skip only when already executing inside another…

yonatangross/orchestkit · 99 tokens

rag-retrieval

Retrieval-Augmented Generation patterns for grounded LLM responses. Use when building RAG pipelines, embedding documents, implementing hybrid search, contextual retrieval, HyDE, agentic RAG, multimodal RAG, query decomposition, reranking, or pgvector search.

yonatangross/orchestkit · 58 tokens

ci-debug

Diagnose a failing CI run against an 11-pattern playbook. Classifies the failure, cites the relevant memory entry, proposes the exact fix command — but NEVER applies without explicit user approval. Use when a specific PR check or GitHub Actions run failed and you want a diagnosis instead of speculation. Don't use for…

yonatangross/orchestkit · 92 tokens