Works with the AI Agents you already use

    Checkable Test Cases: One Fact per Expected Result

    by doo_sani

    1

    Test cases written by agents often bundle several checks into one line, check the screen for facts that live in the database, or invent a limit nobody agreed on.

    Free

    Security scanned
    Checkable Test Cases: One Fact per Expected Result

    Checkable Test Cases: One Fact per Expected Result

    Example session with this skill installed

    Write the test cases for the orders listing and refund feature. The requirement is docs/REQUIREMENTS.md (ticket #482); the code is in src/.

    • Read your context and instructions
    • Compiled the checkable test cases

    Requirement (docs/REQUIREMENTS.md)

    1. A signed-in customer sees their own orders, 20 per page, newest first.
    2. The list can be filtered by status (paid, refunded, partially_refunded).
    3. Support staff can refund part or all of a paid order.
    4. A refund can never exceed what is left to refund on that order.
    5. When the whole amount has been refunded, the order's status becomes "refunded".
    

    Result

    docs/tc/orders-refunds.tc.json: 20 test cases, 36 expected results (25 checked in the API response, 11 in the database).

    $ node tc-lint.js docs/tc/orders-refunds.tc.json
    tc-lint: 20 TC (13 ready, 7 needs-decision), 0 warning(s)
    

    Orders listing and refunds (ticket #482) — test cases

    20 test cases · 36 expected results · 7 need a decision

    ✓TCStepsExpected resultCheck inBasis
    ☐TC.orders-refunds.list-first-page-size1. Request the orders list without a page parameterThe response array holds 20 ordersapi: handleList response body lengthrequirement (REQ.orders-01)
    ☐TC.orders-refunds.list-first-page-newest1. Request the orders list with page 1 [page_1]The first element is the customer's order with the latest created_atapi: handleList response body[0].idrequirement (REQ.orders-01)
    ☐TC.orders-refunds.list-first-page-newestcreated_at never increases from one element to the nextapi: handleList response body[*].created_at
    ☐TC.orders-refunds.list-second-page1. Request the orders list with page 2 [page_2]The response array holds 5 ordersapi: handleList response body lengthrequirement (REQ.orders-01)
    ☐TC.orders-refunds.list-second-pageThe first element is the customer's 21st newest orderapi: handleList response body[0].id
    ☐TC.orders-refunds.list-own-orders-only1. Request the orders listEvery element has user_id equal to the signed-in customer's idapi: handleList response body[*].user_idrequirement (REQ.orders-01)

    (… 36 rows in total)

    Open questions (instead of invented values)

    • What a page past the end, page 0 or a non-number page returns. Proposed: past the end → 200 with an empty list; the others → 400.
    • Which order statuses may be refunded; the code only blocks "refunded". Proposed: only paid or partially_refunded.
    • Whether amounts are integer cents. With decimals, refunded === paid can miss a full refund. Proposed: integer cents.
    • What a signed-out list request returns; the handler reads req.user.id with no check. Proposed: 401.

    Spotted while reading the code

    • src/orders.js:7: offset = page * PAGE_SIZE skips the first 20 orders on page 1, so the page-1 cases will fail.
    • src/api.js:4 still passes a number to the new { page, status } signature, so the status filter is ignored.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    "The order is saved correctly" cannot be failed. Test cases written by agents often bundle several checks into one line, check the screen for facts that live in the database, or invent a limit nobody agreed on.

    Checkable Test Cases writes cases a person or a script can decide.

    What you get

    • User actions first, then separate cases for the success path and each rejection, error, boundary, cancel or retry the behaviour actually has.
    • One fact per expected result, each with where to check it: api: response body[0].id, db: orders.status, log: mail.reset.sent, or a screen element.
    • Traceability: every case rests on a requirement line, a code line (flagged as a spec gap), or a proposal waiting for a decision.
    • Open questions instead of guesses: a value nobody stated (a limit, a status rule, a unit) becomes a question with a proposed default, and its cases stay "needs decision".
    • A linter that flags bundled facts, subjective words, off-screen facts checked on the screen, steps that cannot show they are done, mixed success and error cases, missing preconditions, URLs or results in the file, and requirements no case covers. Works on English and Korean sentences.
    • A checklist renderer: Markdown with checkboxes, or CSV for a spreadsheet.

    Output

    A JSON file in your repo (docs/tc/<feature>.tc.json) that agents and scripts can read, plus a checklist people can tick.

    Safe to install

    Node.js 18+, no dependencies, no network calls. The scripts only read the file you give them.

    Where it stops

    It writes and checks test cases; it does not run them. The linter's checks are heuristics and warn only.

    It writes and checks test cases; it does not run them. The linter's checks are wording heuristics and warn only: a clean lint means no known pattern of vague or bundled lines, not that every case is right. Requires Node.js 18+ for the two scripts.

    How to use

    1. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 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

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 5 days ago

    • Free with an Agensi account

    Software
    Node.js

    Permissions

    Terminal / Shell
    Read Files
    Write Files

    File Scopes

    docs/tc/**

    No network access. The scripts only read the test-case file you give them and print to stdout. The agent writes docs/tc/<feature>.tc.json in your project.

    Listed5 days ago

    What's inside

    Frequently Asked Questions

    Each expected result is one fact with where to check it (a screen element, an API field, a database column, a log key), each case cites the requirement or code it rests on, unknown values become open questions instead of guesses, and a bundled linter flags lines that cannot be decided.

    Two facts in one line, subjective words, facts that live in the database or a log but are checked on the screen, steps that cannot show they are done, mixed success and error cases, missing sign-in or data preconditions, URLs or results in the file, and requirements no case covers. English and Korean sentences.

    A JSON file in your repo (docs/tc/<feature>.tc.json) that agents and scripts can read, plus a Markdown checklist or CSV for people, and a list of open questions for the values nobody stated.

    No network calls. The two bundled scripts need Node.js 18+ and only read the file you give them.

    Behaviour only the code shows becomes a case marked as a spec gap; values nobody stated (a limit, a status rule, a unit) become open questions with a proposed default, and their cases stay needs-decision until someone answers.

    Yes. The renderer writes CSV for spreadsheets and test-management imports, and the JSON is plain enough to convert.

    New in Testing & Debugging

    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.

    Free