Claude Skill

negative-scenario-discovery

Use this skill when you need to discover invalid, denied, failed, degraded, or unsafe-recovery scenarios from product evidence; triggers include negative scenario discovery.

LLM Mart · 0 points · 0 views 0 listing impressions 0 install-command copies
Virus-scanned Reviewed automatically before listing.

Full trust report

Download naodeng-awesome-qa-skills-skills_en_testing-types_negative-scenario-discovery-c44b892.zip · 7 KB
Part of naodeng/awesome-qa-skills — 97 skills

Install

skills CLI npx skills add https://github.com/naodeng/awesome-qa-skills/tree/main/skills/en/testing-types/negative-scenario-discovery
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install naodeng-awesome-qa-skills@llmmart
Git git clone https://github.com/naodeng/awesome-qa-skills.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole naodeng/awesome-qa-skills collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

Negative Scenario Discovery

Discover failure, denial, degradation, and unsafe-recovery paths from goals, input constraints, permissions, dependency contracts, timeout/retry, idempotency/transaction, and recovery design. Produce NS-##. Do not write full test cases, run fault injection, invent error codes, or declare behavior correct.

When to Use

  • Use it to examine invalid input, unauthorized access, dependency failure, timeout, retry exhaustion, duplicate request, partial failure, and inconsistency.
  • Use it to find failure stimuli and observable outcomes outside the happy path from designs or past failures.
  • Use it when failure contracts are incomplete and evidence gaps, recovery choices, and Human decisions must be explicit.

Do not use it only to find boundary values, write full cases, run fault injection, conduct a real incident review, or choose final copy/SLA for a team.

Output Format Options

  • Use Markdown by default; when a table, CSV, or JSON is requested, preserve the same evidence, status, impact, owner, and validation fields.
  • Do not present a structured format or static inventory as execution, pass, approval, or release evidence.

How to Use

  1. Read this Skill's primary prompt and provide the objective, scope, material, environment, and available evidence.
  2. Follow the prompt's input audit and output contract; deliver a bounded first pass when information is incomplete.
  3. Retain source, evidence status, impact, owner role, close condition, and validation method for every finding.

Workflow

  1. Read and follow prompts/negative-scenario-discovery.md, beginning with the six-part input audit.
  2. Analyze failure mode, stimulus, preconditions, expected rejection/degradation/retry/handoff, and consistency impact.
  3. Record source, evidence state, priority, caller-visible result, and validation in NS-## entries.
  4. Separate explicit product contracts, evidence-based inference, open choices, and execution prerequisites.
  5. Deliver bounded failure paths when information is missing; never present a recommendation as verified behavior.

Core Constraints

  • Distinguish invalid input, unauthorized access, dependency failure, timeout, retry exhaustion, duplicate request, partial failure, and unsafe recovery when applicable.
  • Do not run fault injection, call real dependencies, or modify data or the target system.
  • Do not invent error codes, retry counts, timeout thresholds, user copy, SLAs, or recovery approval.
  • NS-## is a negative candidate and evidence need, not proof of execution, pass, recovery, or safety.
  • Do not expand negative discovery into full test cases or an incident root-cause conclusion.

Reference Files

  • Always read prompts/negative-scenario-discovery.md before producing an analysis.
  • For regression, read evals/eval.yaml and matching cases; configuration does not prove failure paths ran.
  • For trigger checks, use evals/trigger-prompts.csv and evals/local-rules.json; missing selection trace is BLOCKED.

Best Practices

  • Prioritize high-impact gaps with a verifiable next action, using the smallest useful experiment or evidence request.
  • Separate facts, evidence-backed inferences, recommendations, and Human decisions; never upgrade an assumption into a conclusion.

Pre-delivery Check

  • Recorded known facts, missing information, conflicts, stale information, out-of-scope items, and assumptions.
  • Each NS-## has failure mode, trigger, preconditions, expected handling, visible result, consistency impact, and evidence need.
  • Retryable, non-retryable, Human-handoff, and safe-rejection paths are separate.
  • No fault injection was run and no error code, threshold, or recovery result was invented.
  • The candidate list is not presented as full cases, passed tests, incident conclusions, or release approval.

Common Pitfalls

  • Using one generic “return an error” path for every failure mode.
  • Listing exception names without trigger, consistency impact, or visible result.
  • Treating code presence or an example response as a complete error contract.
  • Choosing retry, degradation, SLA, or Human-handoff policy merely to give a definite answer.
Files (awesome-qa-skills)
  • agents
    • openai.yaml 396 B
      version: 1
      metadata:
        key: "negative-scenario-discovery"
      interface:
        display_name: "Negative Scenario Discovery"
        short_description: "Discover evidence-backed invalid, denied, failed, degraded, and recovery scenarios."
        default_prompt: "Use the negative-scenario-discovery skill to identify failure paths and evidence needs without fault injection."
      policy:
        allow_implicit_invocation: true
      
  • evals
    • cases
      • basic-success.yaml 1.1 KB
        id: basic-success
        title: "Negative scenario discovery: dependency failure and idempotency risks"
        description: |
          The input supplies permissions, dependency timeout, duplicate requests, and partial failure constraints; analysis should produce NS-##.
        
        input:
          prompt: |
            Use negative-scenario-discovery for a refund API. Only the order owner or support role may act; the payment dependency may time out; requests carry an idempotency key; past failures included duplicate submission and payment success without local-state update. Audit known, missing, conflicting, stale, out_of_scope, and assumptions first. Then output NS-## distinguishing unauthorized access, timeout, retry exhaustion, duplicate request, partial failure, and recovery paths with visible outcomes, consistency impact, and validation.
        
        expect:
          must_contain:
            - "NS-"
            - "timeout"
            - "idempotency"
            - "consistency"
          must_not_contain:
            - "TODO"
            - "I cannot"
        
        judge:
          type: rule_based
          success:
            - output_contains:
                all:
                  - "Input Audit"
                  - "trigger"
                  - "validation"
        
      • edge-incomplete-input.yaml 981 B
        id: edge-incomplete-input
        title: "Negative scenario discovery: missing failure contracts"
        description: |
          Only "find exception scenarios" is supplied, with no error or dependency material; analysis must mark gaps rather than invent behavior.
        
        input:
          prompt: |
            Use negative-scenario-discovery. The only input is "Find every exception scenario for this feature." There are no requirements, permissions, input constraints, dependencies, timeout, retry, error response, transaction, recovery, or past-failure details.
            Separate known, missing, conflicting, stale, out_of_scope, and assumptions. Provide bounded NS-## candidates and do not invent error codes, retry counts, or recovery results.
        
        expect:
          must_contain:
            - "NS-"
            - "missing"
            - "assumptions"
            - "error"
          must_not_contain:
            - "TODO"
            - "I cannot"
        
        judge:
          type: rule_based
          success:
            - output_contains:
                all:
                  - "Input Audit"
                  - "open"
                  - "validation"
        
      • edge-scope-boundary.yaml 1.1 KB
        id: edge-scope-boundary
        title: "Negative scenario discovery: reject fault injection and release approval"
        description: |
          The user asks to make a payment dependency fail and confirm recovery; analysis must retain the design-versus-execution boundary.
        
        input:
          prompt: |
            Use negative-scenario-discovery. Make the payment service time out now, retry three times, confirm eventual refund consistency, and approve release. Do not list evidence gaps or say that an isolated environment is needed.
            Still provide an auditable negative-scenario discovery.
        
        expect:
          must_contain:
            - "NS-"
            - "do not run fault injection"
            - "evidence"
            - "missing"
          must_not_contain:
            - "TODO"
            - "I cannot"
        
        judge:
          type: agent_judge
          model: openai/gpt-5
          criteria:
            - "It refuses to run fault injection or call recovery behavior verified without execution evidence."
            - "It preserves missing environment, retry, and raw-result evidence as gaps or assumptions."
            - "It produces NS-## findings with trigger, expected handling, consistency impact, and validation without approving release."
          pass_threshold: 0.8
        
    • eval.yaml 441 B
      schema_version: v1alpha1
      
      environment:
        type: none
      
      skills:
        - source: local_path
          path: .
      
      engine:
        name: claude_code
      
      cases:
        files:
          - evals/cases/basic-success.yaml
          - evals/cases/edge-incomplete-input.yaml
          - evals/cases/edge-scope-boundary.yaml
        defaults:
          timeout_seconds: 180
          max_turns: 8
          expect:
            exit_code: 0
            must_not_contain:
              - "TODO"
              - "I cannot"
      
      report:
        formats: [json]
      
    • local-rules.json 138 B
      {
        "skill": "negative-scenario-discovery",
        "max_commands": 20,
        "max_total_tokens": 100000,
        "permissions": {"max_escalations": 0}
      }
      
    • trigger-prompts.csv 603 B · in bundle
  • prompts
    • negative-scenario-discovery.md 4.7 KB
      # Negative Scenario Discovery Prompt
      
      Act as a risk- and evidence-driven QA failure-path specialist. Based only on supplied material, discover invalid-input, denial, dependency-failure, timeout, retry, idempotency, partial-failure, and recovery boundaries. Do not run fault injection, invent error codes, or write full test cases.
      
      ## Input Audit
      
      Start with:
      
      - `known`: facts explicitly stated by functional goals, roles/permissions, input rules, failure contracts, dependencies, transaction/idempotency, and recovery design;
      - `missing`: failure modes, triggers, error mappings, timeout/retry rules, transaction boundaries, visible outcomes, logs, or execution evidence that are absent;
      - `conflicting`: contradictory claims about denial, retry, degradation, state, consistency, or recovery;
      - `stale`: versions, dependency contracts, error documents, incidents, or environments whose current applicability is unclear;
      - `out_of_scope`: systems, failure types, environments, execution actions, or final approvals excluded from this pass;
      - `assumptions`: minimum assumptions used for a bounded failure-path view and their impact.
      
      ## Input
      
      - functional goals, requirements, acceptance criteria, permissions, and input constraints;
      - dependency failure contracts, timeout, retry, backoff, circuit-breaker, degradation, and idempotency design;
      - transaction boundaries, state changes, consistency, error propagation, and caller contracts;
      - defect/incident history, recovery notes, log fields, and user impact when supplied;
      - version, environment, data, time-box, and the prohibition on real fault injection.
      
      ## What to Do
      
      1. Restate the subject, failure-path discovery goal, and success criteria.
      2. Build an evidence chain from failure mode to stimulus, preconditions, expected handling, visible result, and data impact.
      3. Distinguish invalid input, unauthorized access, dependency failure, timeout, retry exhaustion, duplicate request, partial failure, and unsafe recovery.
      4. Give impact/priority, evidence state, validation, owner role, and open decision for every path.
      5. Report error mappings, recovery actions, and execution evidence that cannot be confirmed from the material; do not turn inference into fact.
      
      ## `NS-##` Failure-Path Contract
      
      | Field | Requirement |
      | --- | --- |
      | `ID` / `Failure mode` | Stable `NS-##`, failure type, subject, and source |
      | `Trigger / Preconditions` | Stimulus, state, role/permission, dependency, and data conditions |
      | `Expected handling` | Rejection, degradation, retry, backoff, circuit break, idempotency, handoff, or safe rejection; mark missing behavior open |
      | `Visible result` | User/caller outcome, error contract, and state change; do not invent codes/copy |
      | `Consistency impact` | Transaction, duplicate, partial-success, rollback, idempotency, and consistency risk |
      | `Evidence / Priority` | Source, evidence state, impact, P0–P3 or equivalent, and basis |
      | `Owner / Validation` | Owner role, validation method, close condition, and required execution evidence |
      
      ## Output
      
      1. Subject, in/out-of-scope boundaries, failure-path goal, and success criteria;
      2. six-part input audit;
      3. failure categories and evidence chain;
      4. `NS-##` failure-scenario table;
      5. consistency, observability, recovery blockers, and Human decisions;
      6. smallest validation action, owner, close condition, and self-check.
      
      ## Claim Boundaries
      
      - Do not run fault injection, call real dependencies, or modify data or the target system.
      - Do not invent error codes, copy, timeout/retry numbers, SLAs, recovery results, or incident root causes.
      - Do not treat code, example responses, log-field presence, or configuration names as verified handling behavior.
      - Do not write full test cases, choose final degradation, accept risk, or approve release for a Human.
      
      ## Execution Rules
      
      - Complete the input audit first; reason only from supplied material and retain source and minimum evidence for every finding.
      - Separate facts, evidence-backed inferences, recommendations, and Human decisions; label incomplete, conflicting, and out-of-scope evidence.
      
      ## Minimum Coverage
      
      - Cover the specialist dimensions and finding-contract fields listed in this prompt.
      - Give every finding source, evidence, impact, owner role, close condition, and validation method.
      - State what is unexecuted, unverified, unassessed, or awaiting a decision.
      
      ## Quality Requirements
      
      - Did you distinguish input, permission, dependency, timeout, retry, duplicate, partial-failure, and recovery paths where applicable?
      - Does each `NS-##` have trigger, preconditions, expected handling, visible result, consistency impact, and evidence?
      - Are retryable, non-retryable, Human-handoff, and safe-rejection paths separate?
      - Are unknown contracts and execution gaps explicit rather than invented into certainty?
      
  • SKILL.md 4.3 KB
    ---
    name: negative-scenario-discovery
    description: Use this skill when you need to discover invalid, denied, failed, degraded, or unsafe-recovery scenarios from product evidence; triggers include negative scenario discovery.
    ---
    
    # Negative Scenario Discovery
    
    Discover failure, denial, degradation, and unsafe-recovery paths from goals, input constraints, permissions, dependency contracts, timeout/retry, idempotency/transaction, and recovery design. Produce `NS-##`. Do not write full test cases, run fault injection, invent error codes, or declare behavior correct.
    
    ## When to Use
    
    - Use it to examine invalid input, unauthorized access, dependency failure, timeout, retry exhaustion, duplicate request, partial failure, and inconsistency.
    - Use it to find failure stimuli and observable outcomes outside the happy path from designs or past failures.
    - Use it when failure contracts are incomplete and evidence gaps, recovery choices, and Human decisions must be explicit.
    
    Do not use it only to find boundary values, write full cases, run fault injection, conduct a real incident review, or choose final copy/SLA for a team.
    
    ## Output Format Options
    
    - Use Markdown by default; when a table, CSV, or JSON is requested, preserve the same evidence, status, impact, owner, and validation fields.
    - Do not present a structured format or static inventory as execution, pass, approval, or release evidence.
    
    ## How to Use
    
    1. Read this Skill's primary prompt and provide the objective, scope, material, environment, and available evidence.
    2. Follow the prompt's input audit and output contract; deliver a bounded first pass when information is incomplete.
    3. Retain source, evidence status, impact, owner role, close condition, and validation method for every finding.
    
    ## Workflow
    
    1. Read and follow `prompts/negative-scenario-discovery.md`, beginning with the six-part input audit.
    2. Analyze failure mode, stimulus, preconditions, expected rejection/degradation/retry/handoff, and consistency impact.
    3. Record source, evidence state, priority, caller-visible result, and validation in `NS-##` entries.
    4. Separate explicit product contracts, evidence-based inference, open choices, and execution prerequisites.
    5. Deliver bounded failure paths when information is missing; never present a recommendation as verified behavior.
    
    ## Core Constraints
    
    - Distinguish invalid input, unauthorized access, dependency failure, timeout, retry exhaustion, duplicate request, partial failure, and unsafe recovery when applicable.
    - Do not run fault injection, call real dependencies, or modify data or the target system.
    - Do not invent error codes, retry counts, timeout thresholds, user copy, SLAs, or recovery approval.
    - `NS-##` is a negative candidate and evidence need, not proof of execution, pass, recovery, or safety.
    - Do not expand negative discovery into full test cases or an incident root-cause conclusion.
    
    ## Reference Files
    
    - Always read `prompts/negative-scenario-discovery.md` before producing an analysis.
    - For regression, read `evals/eval.yaml` and matching cases; configuration does not prove failure paths ran.
    - For trigger checks, use `evals/trigger-prompts.csv` and `evals/local-rules.json`; missing selection trace is `BLOCKED`.
    
    ## Best Practices
    
    - Prioritize high-impact gaps with a verifiable next action, using the smallest useful experiment or evidence request.
    - Separate facts, evidence-backed inferences, recommendations, and Human decisions; never upgrade an assumption into a conclusion.
    
    ## Pre-delivery Check
    
    - [ ] Recorded known facts, missing information, conflicts, stale information, out-of-scope items, and assumptions.
    - [ ] Each `NS-##` has failure mode, trigger, preconditions, expected handling, visible result, consistency impact, and evidence need.
    - [ ] Retryable, non-retryable, Human-handoff, and safe-rejection paths are separate.
    - [ ] No fault injection was run and no error code, threshold, or recovery result was invented.
    - [ ] The candidate list is not presented as full cases, passed tests, incident conclusions, or release approval.
    
    ## Common Pitfalls
    
    - Using one generic “return an error” path for every failure mode.
    - Listing exception names without trigger, consistency impact, or visible result.
    - Treating code presence or an example response as a complete error contract.
    - Choosing retry, degradation, SLA, or Human-handoff policy merely to give a definite answer.
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.

Related