- Home
- Skills
- Testing & Debugging
- QA Bug Hunter Pro: Edge Cases & Traceable Bug Hypotheses
More screenshots
Works with the AI Agents you already use
QA Bug Hunter Pro: Edge Cases & Traceable Bug Hypotheses
Bug Hunter makes your agent think like a senior destructive tester and maps where your flow breaks in the most painful way, before you write a single test case.
$5
QA Bug Hunter Pro: Edge Cases & Traceable Bug Hypotheses
Example session with this skill installed
Hunt for hidden bugs in this gift card feature before we start testing:
DemoShop – Redeem a gift card at checkout (ticket DS-482)
Context
DemoShop is an online store. Shoppers can pay part or all of an order with a gift card. Admins issue gift cards in the back office.
Rules
- GC-01: A gift card code is 16 characters: letters A–Z and digits, shown as XXXX-XXXX-XXXX-XXXX. Input is case-insensitive; dashes are optional.
- GC-02: Only logged-in shoppers can apply a gift card, on the checkout page, before clicking "Place order".
- GC-03: A card has a balance (USD, 2 decimals) and an expiry date. Expired cards are rejected with the message "This gift card has expired."
- GC-04: If the balance is lower than the order total, the balance is fully used and the rest is paid by credit card. If the balance is equal or higher, the order total becomes $0.00 and the remaining balance stays on the card.
- GC-05: At most 2 gift cards per order.
- GC-06: Wrong code → "Gift card not found." After 5 wrong codes in 10 minutes the field is locked for 15 minutes ("Too many attempts. Try again later.").
- GC-07: The balance is deducted only when the order is placed successfully. If payment of the remaining amount fails, nothing is deducted.
- GC-08: A shopper can remove an applied gift card before placing the order.
- GC-09: Cancelling an order within 24 hours returns the used amount to the same gift card (even if expired in the meantime, the expiry is extended by 30 days).
- GC-10: Admin back office: admins create cards (amount $5–$500, expiry 1–24 months) and can disable a card; a disabled card is rejected with "Gift card not found.".
UI copy
- Field label: "Gift card code"; button: "Apply"; applied line: "Gift card ••••-••••-••••-1234 −$25.00" with a "Remove" link.
- Read your context and instructions
- Compiled the qa bug hunter
Saved: bug-hunter-analysis/2026-11-28_21-19-57-redeem-gift-card-at-checkout.md
Bug Hunter: Redeem a gift card at checkout (DS-482)
1. Core Flow Summary
A logged-in shopper on the checkout page enters a 16-character gift card code, case-insensitive with optional dashes (S1, GC-01, GC-02). The system looks the code up and rejects it if it is unknown or disabled ("Gift card not found."), expired ("This gift card has expired.") or if the field is locked after 5 wrong codes in 10 minutes (S2, GC-03, GC-06, GC-10). A valid card is applied against the order total: a lower balance is used in full and the rest goes to the credit card, an equal or higher balance brings the total to $0.00; up to 2 cards per order, and any applied card can be removed before placing the order (S3, GC-04, GC-05, GC-08). On "Place order" the remaining amount is charged to the credit card and the balance is deducted only if the order is placed successfully (S4, GC-07). Cancelling within 24 hours returns the used amount to the same card, extending an expired card by 30 days (S5, GC-09); in the back office admins create cards ($5–$500, expiry 1–24 months) and can disable them (A1, GC-10).
Key rules: code format 16 chars A–Z/0–9 (GC-01), 2 decimals USD balance + expiry date (GC-03), max 2 cards per order (GC-05), 5 wrong codes / 10 min → 15-min lock (GC-06), deduct only on successful placement (GC-07), 24-hour cancellation window + 30-day expiry extension (GC-09), amount $5–$500 and expiry 1–24 months (GC-10).
Assumptions: a gift card code is a bearer code not bound to one shopper account (any logged-in shopper holding the code can apply it), the shopper can go back from checkout to change the cart while gift cards stay applied, an order can still be cancelled after 24 hours by some route (e.g. support) even though GC-09 only defines the within-24-hours case
2. High-Risk Points
- S3→S4 (GC-04, GC-07): balance read at apply, deducted at placement. The balance shown at S3 is a read; the deduction happens later at S4. Anything that happens in between (another order on the same card, an admin disabling it, the expiry passing, the order total changing) can make the S4 deduction act on stale data.
S4 (GC-07): two money movements with no stated atomicity. The credit card charge and the gift card deduction are separate operations; GC-07 only defines the "card declined" branch, not "card charged but deduction failed" or a timeout in either.
S4 with a $0.00 total (GC-04): when gift cards cover the whole order, no credit card payment runs, so any duplicate-submission protection that lives on the payment step does not apply.
GC-01 normalization vs GC-05 limit: the same card can be typed in several spellings (case, dashes); if de-duplication compares raw input, one card counts as two.
S5 (GC-09): refund routing and expiry extension. The rule defines where the money goes only within 24 hours and does not define what the 30-day extension is counted from, nor what happens with 2 cards or a card disabled meanwhile.
S2 (GC-06): attempt counter scope. The spec does not say whether the 5-attempt limit is per account, session, device or IP, nor whether a valid code resets it.
3. Bug Hypotheses (prioritized)
| Bug ID | Lens | Bug hypothesis | Step / rule | Why it happens | Impact | Why it is often missed |
|---|---|---|---|---|---|---|
| BUG-001 | Break the State | The same gift card is applied in two checkouts at once (two tabs, or two accounts sharing the code) and both orders are placed using the full balance, so the card is spent twice or ends with a negative balance. | S3→S4, GC-04, GC-07 | The balance is checked when the card is applied and deducted later without a lock or a conditional "balance ≥ amount" update at placement. | Critical: the store gives away goods worth up to the full card balance a second time. | Testers apply a card in one checkout at a time; the overlap needs two sessions placing orders within seconds. |
| BUG-002 | Break the Data | The same card is applied twice in one order by typing it in two spellings (e.g. abcd-efgh-… and ABCDEFGH…), so its balance is counted twice against the order total. | S3, GC-01, GC-05 | Duplicate detection compares the raw input string while the lookup normalizes case and dashes, so both entries resolve to one card but pass as two. | Critical: up to double the card balance is credited to the order; at S4 the second deduction either drives the balance negative or fails after the order is placed for $0.00. | Testers check "same code twice" with identical text, never with a different case or dash pattern. |
| BUG-003 | Break the Flow | When gift cards cover the whole order (total $0.00), double-clicking "Place order" or refreshing the confirmation creates two orders while the balance is deducted once (or the second order goes through with no deduction). | S4, GC-04 | With a $0.00 total no credit card payment runs, so the payment-gateway idempotency that normally stops a duplicate order is absent and nothing else guards the placement. | Critical: a second order is shipped for free. | Double-submit is usually tested on orders paid by credit card, where the gateway blocks it; the $0.00 path is rarely tried. |
| BUG-004 | Break the State | The credit card is charged for the remaining amount and the order is confirmed, but the gift card deduction fails or times out, so the order is placed with the card balance untouched. | S4, GC-07 | The charge and the deduction are separate writes with no shared transaction; GC-07 only defines the reverse failure (card declined → nothing deducted). | Critical: the gift card portion of the order is never collected and the balance can be reused. | The failure needs the gift card service or DB to fail after the payment succeeded; testers only simulate a declined card. |
| BUG-005 | Break the Rules | Cancelling a split-paid order within 24 hours returns the whole order total (gift card part + credit card part) to the gift card, or returns the gift card part to the card and also refunds it to the credit card. | S5, GC-04, GC-09 | The refund is computed from the order total instead of the amount actually drawn from each payment source. | Critical: the shopper gains the credit card part as new gift card balance, or is refunded twice. | Cancellation is usually tested on an order paid by one source only; split payments with a cancel are a combination case. |
| BUG-006 | Think Like a Bad User | A fraudster spends a stolen or cheaply obtained gift card, then cancels after the 24-hour window; the gift card part is refunded to their credit card, turning gift card balance into cash. | S5 (undefined rule: refund route for cancellations after 24 hours, GC-09) | GC-09 defines the return to the same card only within 24 hours; a cancellation or refund after that may fall back to the default "refund to original payment method", which is the credit card. | Critical: gift card value is cashed out to a credit card, making stolen codes directly profitable. | Testers verify the within-24-hours rule the spec states and never ask what the other branch does. |
| BUG-007 | Break Assumptions | The gift card balance is deducted (or reserved) before the credit card is charged, the card is declined, and the deduction is not rolled back, so the shopper loses the balance and has no order. | S4, GC-07 | The implementation assumes the credit card charge succeeds and deducts first; the rollback path on decline or gateway timeout is missing or fails. | High: the shopper's balance disappears and support must restore it by hand. | Testers check that a declined card shows an error, not that the balance afterwards is unchanged; a gateway timeout is rarely simulated. |
| BUG-008 | Break the State | An admin disables a card (e.g. reported stolen) while it is applied in an open checkout, and the shopper can still place the order with it. | S3→S4, GC-10 | The disabled status is checked only at apply (S2/S3) and not re-checked at placement (S4). | High: the fraud control fails exactly when it is needed; the stolen balance is spent. | Disabling is tested by applying an already-disabled card, not by disabling one that is already applied. |
| BUG-009 | Break the Rules | A shopper keeps an expiring card alive forever: place a small order with it, cancel within 24 hours, get the 30-day extension, and repeat before each new expiry; or each cancel adds 30 days on top of the current expiry even when the card has not expired. | S5, GC-03 (undefined rule: what the 30-day extension is counted from, GC-09) | The extension is applied on every cancellation without checking whether the card actually expired between payment and cancellation. | High: the expiry rule is bypassed and liabilities that should lapse stay open indefinitely. | Testers check one cancellation on an expired card; the repeat cycle and the "not expired yet" case are not tried. |
| BUG-010 | Think Like a Bad User | The 5-wrong-codes lock is bypassed by logging out and in, starting a new checkout, sending attempts in parallel, or entering a valid own card between wrong guesses, allowing unlimited guessing of codes. | S2 (undefined rule: scope of the attempt counter, GC-06) | The counter may be kept per checkout session or field, may be read before it is incremented (parallel requests all pass), or may reset on a successful apply. | High: if admin-issued codes are not fully random, live cards of other shoppers can be found and spent. | Testers type 5 wrong codes in one session and see the lock; they never reset the context or send requests in parallel. |
| BUG-011 | Break the Data | After a card is applied at a $100 total (balance $80, $80 used), the shopper goes back and reduces the cart to $50; the applied amount stays $80, so the total goes negative or $30 more than needed is deducted from the card. | S3→S4, GC-04 | The applied amount is calculated once at apply and not recalculated when the order total changes. | High: the shopper loses balance for nothing, or a negative total breaks the order and the payment amount. | Testers apply the card as the last step; changing the cart afterwards is not in the happy path. |
| BUG-012 | Break the Rules | Cancelling an order paid with 2 gift cards returns both amounts to the first card, or swaps the amounts between the cards. | S5, GC-05, GC-09 | The refund stores the used amount per order instead of per card, so "the same gift card" is resolved to one card only. | High: balance moves from one card to another (possibly another person's); support must fix balances manually. | Cancellation is tested with one card; the 2-card order is a separate case rarely combined with cancel. |
| BUG-013 | Break Assumptions | A card applied shortly before its expiry date is still accepted when the order is placed after midnight, or a card is rejected as expired several hours early for shoppers in a different time zone. | S2→S4, GC-03 (undefined rule: expiry time of day and time zone) | The expiry date is compared once at apply and in server time; the spec gives only a date, not the moment it ends. | Medium: expired balance spent in a short window, or a valid card wrongly rejected. | Testers use cards that expired long ago or expire far in the future, not ones on the boundary. |
| BUG-014 | Break the Rules | A third gift card is added to one order by clicking "Apply" with two different codes in two tabs at the same moment while one card is already applied. | S3, GC-05 | The "max 2 cards" check counts the applied cards and inserts the new one in separate steps. | Medium: the 2-card limit is bypassed (no extra value, but rule and downstream refund logic break). | The limit is tested sequentially, which always shows the error on the third card. |
| BUG-015 | Break the State | An order is cancelled within 24 hours after an admin disabled the card used, and the amount is returned to the disabled card (stranded) or the return re-enables it. | S5, GC-09, GC-10 (undefined rule: refund target when the card has been disabled) | GC-09 says "the same gift card" with no exception for a disabled card; the extension logic may also reset the card status. | Medium: the shopper cannot use the refunded value, or a card disabled for fraud becomes usable again. | Disable and cancel are owned by different screens (admin vs shopper) and are not tested together. |
| BUG-016 | Break the Data | With 2 cards applied, removing the first card leaves the second card's used amount at its old partial value instead of re-applying up to its balance, so more than needed is charged to the credit card. | S3, GC-04, GC-08 | The used amount per card is calculated when each card is added, not recalculated after a removal. | Medium: the shopper pays more by credit card while balance stays unused; recoverable. | Removal is tested with a single card, where nothing needs recalculating. |
Lens check: Break the Flow: BUG-003 · Break the Data: BUG-002, BUG-011, BUG-016 · Break the State: BUG-001, BUG-004, BUG-008, BUG-015 · Break the Rules: BUG-005, BUG-009, BUG-012, BUG-014 · Break Assumptions: BUG-007, BUG-013 · Think Like a Bad User: BUG-006, BUG-010
4. Reproduction Ideas (conceptual)
BUG-001 (same card spent in two orders): Preconditions: one gift card with a balance large enough for one order, two logged-in sessions (same or different accounts) each with an order at checkout. User actions: apply the card in both sessions, then click "Place order" in both. Timing/conditions: the two placements must overlap (scripted or near-simultaneous clicks); check the final balance and both orders.
BUG-002 (one card applied twice via spelling): Preconditions: one gift card with a balance below the order total. User actions: apply the code in upper case with dashes, then apply it again in lower case without dashes. Timing/conditions: none; check how many applied lines appear, the order total and the balance after placing.
BUG-003 (double submit on a $0.00 order): Preconditions: gift card balance ≥ order total, so the total shows $0.00. User actions: double-click "Place order", or refresh / go back and resubmit after placing. Timing/conditions: the second request before the first returns; count orders created and deductions made.
BUG-004 (charged but not deducted): Preconditions: a gift card with balance below the order total and a valid credit card. User actions: place the order. Timing/conditions: make the gift card deduction fail or time out after the credit card charge succeeds (fault injection in a test environment); check the order status and the card balance.
BUG-005 (cancel returns more than used): Preconditions: an order paid partly by gift card and partly by credit card. User actions: cancel the order within 24 hours. Timing/conditions: none; compare the gift card balance and the credit card refund with the amounts originally drawn from each.
BUG-006 (cash-out after 24 hours): Preconditions: an order paid wholly or partly by gift card, older than 24 hours and still cancellable or refundable by some route. User actions: request the cancellation/refund through every available route (shopper, support, admin). Timing/conditions: after the 24-hour window; check where the gift card portion is refunded to.
BUG-007 (balance lost on decline): Preconditions: a gift card with balance below the order total and a credit card that will be declined (or a gateway that times out). User actions: place the order. Timing/conditions: decline or timeout on the remaining-amount charge; check that the balance is unchanged and no order exists.
BUG-008 (disabled card still spendable): Preconditions: a card applied in an open checkout. User actions: an admin disables the card in the back office; the shopper then clicks "Place order". Timing/conditions: the disable must happen between apply and placement; check whether the order is placed and the balance deducted.
BUG-009 (endless expiry extension): Preconditions: a card close to its expiry date, and separately a card far from expiry. User actions: place a small order, cancel it within 24 hours; repeat across several expiry dates. Timing/conditions: cancel once just after expiry and once before expiry; compare the new expiry dates with the expected rule.
BUG-010 (attempt lock bypass): Preconditions: a logged-in shopper and one valid own gift card. User actions: enter wrong codes, then log out/in, open a new checkout, send several wrong attempts in parallel, or apply the valid card between wrong attempts. Timing/conditions: within the 10-minute window; check whether more than 5 wrong attempts are accepted before the lock.
BUG-011 (applied amount not recalculated): Preconditions: a card with a balance below the current total, applied at checkout. User actions: go back to the cart, remove items so the total drops below the applied amount, return to checkout. Timing/conditions: the card must stay applied across the cart change; check the applied amount, total and the deduction after placing.
BUG-012 (2-card refund misallocated): Preconditions: an order paid with 2 gift cards with different used amounts. User actions: cancel the order within 24 hours. Timing/conditions: none; check that each card gets back exactly the amount taken from it.
5. Focus Summary
Most dangerous bugs (up to 5, in table order):
1. BUG-001: same gift card spent in two concurrent orders
2. BUG-002: one card applied twice via a different spelling of the code
3. BUG-003: double submit creates two orders when the total is $0.00
4. BUG-004: credit card charged, gift card deduction lost
5. BUG-005: cancellation returns more than was taken from the gift card
Priority test areas:
- Balance integrity between apply and placement: concurrent use, stale status, total changes, partial failures (S3→S4, GC-04, GC-07, GC-10)
- Code normalization and the per-order card limit (S3, GC-01, GC-05, GC-08)
- Cancellation refunds: split payments, 2 cards, after 24 hours, expiry extension, disabled cards (S5, GC-09)
- Wrong-code lock robustness (S2, GC-06)
Context that would sharpen the analysis: whether the balance deduction and the credit card charge run in one transaction, and in which order; how the deduction is written (locked / conditional update); idempotency on "Place order" for $0.00 orders; how codes are generated (random vs sequential); questions for the PO on each undefined rule: (1) GC-09: where does the gift card part go when an order is cancelled or refunded after 24 hours? (2) GC-09: is the 30-day extension counted from the cancellation date or the old expiry, and does it apply if the card has not expired? (3) GC-06: is the attempt counter per account, session, device or IP, and does a valid code reset it? (4) GC-03: at what time and in which time zone does a card expire on its expiry date? (5) GC-09/GC-10: where does the amount go when the card was disabled before the cancellation?
6. Handoff
{"risks": [
{"id": "BUG-001", "priority": "P1", "category": "bug_hypothesis"},
{"id": "BUG-002", "priority": "P1", "category": "bug_hypothesis"},
{"id": "BUG-003", "priority": "P1", "category": "bug_hypothesis"},
{"id": "BUG-004", "priority": "P1", "category": "bug_hypothesis"},
{"id": "BUG-005", "priority": "P1", "category": "bug_hypothesis"},
{"id": "BUG-006", "priority": "P1", "category": "bug_hypothesis"},
{"id": "BUG-007", "priority": "P2", "category": "bug_hypothesis"},
{"id": "BUG-008", "priority": "P2", "category": "bug_hypothesis"},
{"id": "BUG-009", "priority": "P2", "category": "bug_hypothesis"},
{"id": "BUG-010", "priority": "P2", "category": "bug_hypothesis"},
{"id": "BUG-011", "priority": "P2", "category": "bug_hypothesis"},
{"id": "BUG-012", "priority": "P2", "category": "bug_hypothesis"}
]}
Next steps
- 5 hypotheses depend on rules the spec leaves undefined (refund route after 24 hours, base of the 30-day extension, attempt-counter scope, expiry time zone, refund to a disabled card): ask the PO, then re-run the analysis with the answers.
- Paste the Handoff block into your test case design so every Critical/High hypothesis gets at least one case.
Connects securely to your tools. The creator never sees your data.
About this skill
The bugs that cost money are rarely in the happy path. They hide in two tabs placing the same order, a payment that times out halfway, a rule that can be bent without hacking anything. Bug Hunter makes your agent think like a senior destructive tester and maps where your flow breaks in the most painful way, before you write a single test case.
What it does
- Restates the flow, labels every step (S1, S2…) and names the key rules, so each finding points at something concrete in your spec.
- Applies all 6 lenses to every step: Break the Flow, Break the Data, Break the State, Break the Rules, Break Assumptions and Think Like a Bad User, then cross-checks 6 common high-impact patterns. A Lens check line shows what each lens found.
- Lists every grounded hypothesis, not a fixed top 5:
BUG-001,BUG-002… ranked Critical / High / Medium by damage, each with the step or rule it attacks, the root cause, the impact and why testers usually miss it. - Refuses generic findings: a "swap test" rewrites or drops any hypothesis that would read the same for a different flow, and every finding must cite a step or rule of your input, not the skill's built-in samples.
- Gives a reproduction idea for every Critical and High hypothesis: preconditions, user actions, timing.
- Flags what the spec leaves undefined: a hypothesis that depends on a rule with no value is marked and turned into a question for the PO, instead of being reported as a certain bug.
- Ends with a JSON Handoff (
{"risks": [...]}: BUG ID, priority P1/P2) of the Critical/High items, to paste into your test case design or any test case generator that accepts a risks list, as a coverage checklist.
Why use this skill
Asking an agent for "edge cases" usually returns a flat list of empty fields and long strings. Bug Hunter filters that out on purpose and goes after money, data and rule abuse: the race conditions, double submissions and partial failures a normal test run does not reach. Every hypothesis is tied to a step of your flow and carries an ID you can trace into test cases.
Works with a risk analysis (optional)
It runs on a flow or spec alone. Give it risk areas (R-xxx with priority and category) from an earlier risk analysis and it digs into the P1 areas first and links each hypothesis to the risk it deepens (a "Related risk" column and in the Handoff).
Free vs this skill
The free QA Bug Hunter Lite returns the 5 most dangerous hypotheses for a quick check. Bug Hunter is the full pass: every grounded hypothesis with traceable IDs, step citations, reproduction ideas, high-risk points, undefined-rule questions for the PO and a JSON handoff for test coverage.
Use cases
- Reviewing a spec or user story for hidden failure modes before development starts
- Deciding where to spend testing effort on a risky release: payments, vouchers and promotions, authentication, multi-step transactions, bulk imports, third-party integrations
- Feeding Critical/High bug hypotheses into test case design so each one gets covered
- Preparing an exploratory testing session with a concrete list of attacks
- Finding the questions to ask the PO about rules the spec leaves undefined
Output
One Markdown report in bug-hunter-analysis/yyyy-mm-dd_hh-mm-ss-<feature>.md (or any location you name):
- Core flow summary (steps S1…, key rules, assumptions)
- High-risk points
- Bug hypotheses table + Lens check
- Reproduction ideas (Critical/High)
- Focus summary: most dangerous bugs, priority test areas, questions for the PO
- Handoff (JSON)
The chat reply stays short: the path, the top hypotheses and the areas to test first.
Language
Written in English; answers in the language you use (English or Vietnamese), with technical terms, IDs, impact levels and lens names kept in English.
License
For your personal use under the Agensi license; please do not redistribute or resell.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Testing & Debugging.
- It produces hypotheses, not confirmed bugs: each one still has to be tested.
- It analyzes only what you give it (flow, spec, optional risk list). It does not read your code, logs or database, and it does not run the app.
- The deeper your input (steps, rules, retries, queues, third parties), the sharper the hypotheses. With a one-line description it asks up to 3 questions first, or continues on clearly marked assumptions if you ask it to.
- It skips the happy path, cosmetic UI issues and generic validation on purpose; use a test case skill for those.
- For a small flow it may return only 4–6 hypotheses: it does not pad the list to reach a number.
- The report is detailed (a mid-size flow gives a multi-page file); the chat reply only summarizes it.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 1 day ago
Requires
Nothing to install.
Permissions
File Scopes
Read Files: the flow or spec you point to, and the skill's own reference files. Write Files: one Markdown report in bug-hunter-analysis/ (or a location you name). No scripts, no network.