case-design-strategy-skill
Skill1 starsChanged 17 days agoMITView on GitHub
Test design strategy and coverage-review guidance for requirement-based cases. Use when the user asks for 用例设计策略, 覆盖度补充, 用例评审, 边界/异常/权限/状态/埋点覆盖, telemetry/cross-end risk analysis, or when no end-to-end case generator is responsible. Also use during `case-lite` self-review when the active workflow explicitly enters coverage review / boundary-exception review. Do not trigger for `case-lite` document ingestion, chapter selection, full generation, or writeback steps.
In this repository10 other files it gives its agents.
- case-lite-larkSkill
- case-liteSkill
- case-reorganizeSkill
- context-resilient-taskSkill
- cross-agent-reviewSkill
- deep-task-preflightSkill
- dify-dsl-generatorSkill
- internal-api-cookie-authSkill
- repository-code-styleSkill
- whitebox-op-comboSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
23 rules. About 0 are common, 18 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈18
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Use it to strengthen coverage, review generated cases, design telemetry/cross-end risk checks, or guide an agent that has no more specific …
- Very specific: line 16
When a workflow skill is already active (for example case-lite), treat that skill as the source of truth for input collection, HITL …
- Distinctive: line 18
If the user asks for "小需求用例", "简单需求生成用例", Feishu chapter selection, or Banshan writeback, prefer the dedicated generator skill and do not …
- Distinctive: line 22
Use this skill when the user needs any of the following:
- Distinctive: line 28
Do not use this skill for pure code-unit-test implementation, Feishu document ingestion, Banshan writeback, or the main case-lite …
- Distinctive: line 38
Before generating cases, classify inputs:
- Very specific: line 43
If the source is incomplete, continue with explicit assumptions unless one missing item blocks case design entirely.
- Very specific: line 46
Read references/general-test-design-strategy.md when the request is broad or the scenario type is unclear.
- Very specific: line 47
Read references/pattern-library.md for complex flows involving state matrices, strategy/fallback logic, cross-end metrics, time windows, …
- Very specific: line 48
Read references/telemetry-event-testing.md whenever event tables, eventid, exposure/click/conversion tracking, or parameter validation …
- Distinctive: line 56
Attach Assertions: every point must contain at least one observable signal: UI, API response, database/data view, log, metric, or event …
- Distinctive: line 62
Add at least one recovery scene for each critical flow: retry, rollback, degraded display, resume, or manual correction.
- Distinctive: line 63
Avoid flat document-chapter mapping.
- Distinctive: line 67
When this skill is used standalone, each test point should use this structure:
- Distinctive: line 79
Do not write vague expected results such as “works normally” or “meets requirements”.
- Distinctive: line 81
If another active skill defines a stricter output format, follow that skill's format and use this template only as an internal checklist.
- Distinctive: line 84
Use priorities only when the downstream output format allows them.
- Distinctive: line 100
When tracking requirements exist, generate dedicated telemetry scenes.
- Distinctive: line 121
If the user asks for a lightweight result, keep the same order but reduce each scene to the highest-value P0/P1 points.
- Distinctive: line 124
Before final output, verify:
- Distinctive: line 125
Every P0/P1 scene has normal, boundary, exception, and recovery coverage unless explicitly not applicable.
- Distinctive: line 126
Every test point has an observable assertion through UI, API, data, log, metric, or event evidence.
- Distinctive: line 133
Only writing happy-path points or copying requirement headings as scenes.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Case Generation Strategy
Goal
Provide a reusable test-design strategy layer for agents that generate or review requirement-based cases. Optimize for coverage depth, stable granularity, observable assertions, and clear risk disclosure rather than owning the end-to-end case-generation workflow.
Role Boundary
This skill is a strategy/reference layer, not the default case-generation runner.
- Use it to strengthen coverage, review generated cases, design telemetry/cross-end risk checks, or guide an agent that has no more specific case-generation workflow.
- When a workflow skill is already active (for example
case-lite), treat that skill as the source of truth for input collection, HITL checkpoints, output format, priority visibility, artifacts, and writeback rules. - In combined use, borrow only the coverage thinking from this skill. Do not override downstream format constraints such as
full.mdstructure, "no priority in final case", Banshan writeback format, or tool flow. - If the user asks for "小需求用例", "简单需求生成用例", Feishu chapter selection, or Banshan writeback, prefer the dedicated generator skill and do not use this skill for those steps.
- Exception: when
case-litehas already reached its self-review / coverage-review stage and explicitly asks for boundary/exception/permission/state coverage strengthening, this skill should be used as the strategy layer.
Trigger Fit
Use this skill when the user needs any of the following:
- Review or improve existing test cases for missing scenarios, weak assertions, vague expected results, or unstable granularity.
- Design a coverage strategy before another agent writes the actual cases.
- Strengthen APP (C-end), WEB (B-end), backend-admin, cross-end, reporting, or API cases with boundary/exception/state/permission/consistency angles.
- Validate telemetry/event tracking requirements such as
eventid, trigger timing, event type, parameters, exposure/click/conversion chains.
Do not use this skill for pure code-unit-test implementation, Feishu document ingestion, Banshan writeback, or the main case-lite generation/writeback flow. Do use it for the case-lite self-review stage when the workflow explicitly asks for coverage review, missing-scenario review, or boundary/exception strengthening.
Input Triage
Require at least one concrete source:
- PRD / requirement document / user story
- technical design / API spec / data schema
- interaction design / prototype / page screenshots
- acceptance criteria / business rules / risk notes
- telemetry table containing event definitions, trigger timing, or parameters
Before generating cases, classify inputs:
- Functional Mode: feature behavior, page flow, API behavior, permissions, or data consistency.
- Telemetry/Event Mode:
eventid, trigger timing, event type, parameter contract, reporting evidence. - Hybrid Mode: both functional acceptance and telemetry acceptance are required.
If the source is incomplete, continue with explicit assumptions unless one missing item blocks case design entirely. Put unresolved blockers in Assumptions & Risks.
Reference Loading
- Read
references/general-test-design-strategy.mdwhen the request is broad or the scenario type is unclear. - Read
references/pattern-library.mdfor complex flows involving state matrices, strategy/fallback logic, cross-end metrics, time windows, frequency limits, or deduplication. - Read
references/telemetry-event-testing.mdwhenever event tables,eventid, exposure/click/conversion tracking, or parameter validation appears.
Generation Workflow
- Extract Scope: summarize objective, roles, endpoints/pages, core entities, actions, dependencies, and explicit out-of-scope items.
- Select Mode: choose Functional, Telemetry/Event, or Hybrid; keep functional and telemetry cases separated in Hybrid Mode.
- Build State Matrix: cover user state, data state, object state, permission state, environment/lifecycle state, and feature-toggle state when applicable.
- Split Scenes: split by user journey first, then by risk boundary; keep
scene = business subflowandtest point = verifiable behavior. - Generate Points: for every P0/P1 scene, include normal, boundary, exception, consistency, and recovery points.
- Attach Assertions: every point must contain at least one observable signal: UI, API response, database/data view, log, metric, or event query evidence.
- Review Coverage: mark covered/not covered, call out conflicts, assumptions, and residual risks before final output.
Scene Design Rules
- Split by journey stages such as enter, browse, operate, submit, jump, return, refresh, and recover.
- Force state-switch checks: before/after login, before/after operation, before/after refresh, before/after return, before/after permission or feature-toggle change.
- Add at least one recovery scene for each critical flow: retry, rollback, degraded display, resume, or manual correction.
- Avoid flat document-chapter mapping; merge duplicated scenes and separate mixed-risk scenes.
- For list/detail/reporting flows, always include list-detail-export or detail-aggregate reconciliation where applicable.
Test Point Template
When this skill is used standalone, each test point should use this structure:
| Field | Requirement |
| ID | Stable scene-point ID, e.g. S01-T03 |
| Priority | P0 critical acceptance, P1 common/risky path, P2 extended compatibility |
| Type | normal / boundary / exception / permission / state / consistency / telemetry / recovery |
| Preconditions | user role, data setup, object state, environment, feature toggle |
| Steps & Data | concrete operation and key test data |
| Expected Result | user-visible or system-visible result |
| Assertions/Evidence | UI/API/data/log/event evidence path |
Do not write vague expected results such as “works normally” or “meets requirements”.
If another active skill defines a stricter output format, follow that skill's format and use this template only as an internal checklist.
Priority Rules
Use priorities only when the downstream output format allows them.
P0: core business flow, money/data correctness, permission isolation, blocking failure, required telemetry acceptance.P1: common alternatives, key boundaries, recoverable exceptions, cross-state consistency, duplicate-submit/idempotency.P2: low-frequency compatibility, long-tail UI display, optional analytics, non-blocking edge cases.
Required Coverage Angles
| Domain | Required Angles |
| APP / C-end | login/session matrix, cold/hot start, background/foreground, first load, refresh, pagination, empty/failure state, jump/back/position restore, weak network, retry, exposure-click-conversion chain |
| WEB / B-end | role-page-button-data permission matrix, filter/search/sort/pagination/reset, form validation, batch operation, idempotency, duplicate-submit prevention, list-detail consistency, export consistency, 4xx/5xx/partial success, audit logs |
| Cross-End | user action → capture/storage → aggregation → report display, detail vs aggregate reconciliation, immediate check plus delayed-final-consistency check |
| Backend/API | parameter validation, auth/authz, idempotency, concurrency, timeout/retry, partial failure, backward compatibility, data persistence and rollback evidence |
Telemetry/Event Mode
When tracking requirements exist, generate dedicated telemetry scenes. Keep telemetry assertions separate from functional assertions unless Hybrid Mode explicitly requires a linked chain.
For each event, cover:
- Trigger: exact action, page state, exposure threshold, click area, conversion timing.
- No-trigger: UI changes without trigger, invalid state, repeated action inside dedup window, documented non-reporting paths.
- Parameter Contract: required fields, fixed values, enum coverage, dynamic value source, non-empty constraints.
- Uniqueness/Dedup: rapid click, repeated exposure, refresh, re-entry, tab switch, back/forward, background/foreground.
- Cross-State: login/logout, role/grade variants, feature-toggle on/off, empty/non-empty data.
- Evidence: device/user filter, event query tool, eventid, time window, expected count, key parameter assertions.
Output Format
Return in this order:
Scope SummaryMode & AssumptionsState MatrixScene ListTest Pointsgrouped by scene, using the test point templateTelemetry Contract Matrixonly when telemetry requirements exist: eventid, trigger, no-trigger, required params, dynamic params, dedup rule, evidence pathCoverage Checklist: covered vs not coveredAssumptions & Risks
If the user asks for a lightweight result, keep the same order but reduce each scene to the highest-value P0/P1 points.
Quality Gates
Before final output, verify:
- Every P0/P1 scene has normal, boundary, exception, and recovery coverage unless explicitly not applicable.
- Every test point has an observable assertion through UI, API, data, log, metric, or event evidence.
- Cross-role, cross-state, cross-page, and cross-end checks are present when the requirement implies them.
- Telemetry/Event Mode includes trigger, no-trigger, parameter contract, dedup/uniqueness, and evidence path.
- Missing information is listed in
Assumptions & Risks; do not silently invent product rules. - Functional and telemetry granularity remains separated enough for execution ownership.
Common Mistakes to Avoid
- Only writing happy-path points or copying requirement headings as scenes.
- Mixing scene and test-point granularity.
- Hiding assumptions inside expected results.
- Missing state-transition assertions after refresh, return, retry, permission change, or feature-toggle change.
- Ignoring permission differences, data consistency, export/report reconciliation, or telemetry no-trigger conditions.
- Writing cases that lack setup data, steps, or evidence path.
References
- Pattern bank:
references/pattern-library.md - Universal checklist baseline:
references/general-test-design-strategy.md - Telemetry testing reference:
references/telemetry-event-testing.md
Skill maintenance is separate from case design. Maintainers can use
docs/maintainers/case-design-strategy-skill.md in the source repository; it is
not required to install or run this skill.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

