agentleFS
tuanductrantuanductran/tester-skills/skills/api-testing/SKILL.md

api-testing

Skill0 starsChanged 4 months agoMITView on GitHub

API testing guidelines for REST/JSON HTTP services in Node.js/TypeScript, covering Supertest-style request testing, schema validation, auth coverage, and negative test cases. Use this skill whenever writing or reviewing tests for API endpoints, testing an Express/Fastify/Next.js route handler, validating response contracts, or checking auth/error paths. Triggers on requests like "test this endpoint", "write an API test", "validate this response schema", or "check auth on this route".

17 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use visual-testing, mobile-testing and 5 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • petrkindlmannSkill

    visual-testing

    Implement visual regression testing with Playwright screenshots, Chromatic, Percy, and Argos CI. Covers baseline management, diff threshold tuning, dynamic content masking, responsive viewport testing, and review/approval workflows. Use when: "visual test," "screenshot," "visual regression," "pixel diff," "snapshot diff," "update baselines," "Chromatic," "percy snapshot," "argos screenshot." Not for: bulk baseline regeneration after a redesign broke many tests — use selector-drift-recovery; cross-browser rendering matrices — use cross-browser-testing; general Playwright test structure — use playwright-automation. Related: playwright-automation, ci-cd-integration, cross-browser-testing.

    Also in 3 projects that use this

  • petrkindlmannSkill

    mobile-testing

    Test native, React Native, hybrid, and Flutter mobile apps with Appium 3.x, Detox, Maestro, and Patrol. Covers device farm setup (BrowserStack, Sauce Labs), gesture simulation, deep link and cold-start testing, push notifications, biometric (Face ID) auth, offline/poor-network simulation, and iOS/Android permission dialog handling. Use when: "mobile test," "Appium," "Detox," "Maestro," "Patrol," "Flutter test," "iOS test," "Android test," "device farm," "deep link," "biometric," "Face ID," "permission dialog," "React Native test." Not for: device/browser matrix strategy in the abstract — use cross-browser-testing; app startup/memory/battery profiling depth — use performance-testing; mobile screenshot diffing — use visual-testing. Related: ci-cd-integration, cross-browser-testing, performance-testing, test-data-management, test-reliability.

    Also in 3 projects that use this

  • Svenja-devSkill

    e2e-testing

    Also in 3 projects that use this

  • BlockSkill

    debugging

    Debugging guidelines and best practices

    Also in 4 projects that use this

  • MicrosoftSkill

    api-design

    Guide for designing and documenting RESTful APIs. Use when asked to design an API, create endpoints, or document an API.

    Also in 5 projects that use this

  • SentrySkill

    security-review

    Finds exploitable application security vulnerabilities in code changes. Use for Warden security scans, appsec review, OWASP-style checks, authentication or authorization bugs, injection, XSS, SSRF, path traversal, secrets, unsafe crypto, webhook verification, open redirects, or sensitive data exposure.

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 15 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read rules/_sections.md for full category descriptions.

    line 61
  2. Very specific:

    Prefer schema-based validation (contract-schema-validation) over field-by-field checks for anything with more than 3-4 fields.

    line 63

“Common” is measured: kept by at least 6 in 10 of the 15 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

API Testing

Guidelines for testing HTTP APIs so they catch contract breaks, access-control bugs, and unhandled edge cases before production. Contains 8 rules across 5 categories.

When to Apply

Reference these guidelines when:

  • Writing tests for a new or existing API endpoint
  • Validating response shape/schema, not just status codes
  • Testing authentication and authorization boundaries
  • Adding negative/edge-case tests for input validation
  • Setting up test data that must be safe under parallel test runs

Rule Categories by Priority

PriorityCategoryImpactPrefix
1Contract & Schema ValidationHIGHcontract-
2Request ConstructionHIGHrequests-
3Authentication & AuthorizationMEDIUMauth-
4Error & Edge CasesMEDIUMerrors-
5Test Data ManagementMEDIUMdata-

Quick Reference

1. Contract & Schema Validation (HIGH)

  • contract-status-and-shape - Assert status code AND response shape
  • contract-schema-validation - Validate against a schema, not ad-hoc fields

2. Request Construction (HIGH)

  • requests-isolated-app-instance - Test the app instance, not a live port
  • requests-idempotency - Verify idempotency on PUT/DELETE

3. Authentication & Authorization (MEDIUM)

  • auth-cover-unauthorized-paths - Test 401/403 explicitly, not just 200

4. Error & Edge Cases (MEDIUM)

  • errors-negative-cases - Write negative tests for every endpoint
  • errors-consistent-error-shape - Assert on a consistent error format

5. Test Data Management (MEDIUM)

  • data-independent-fixtures - Generate data per-test, never hardcode IDs

How to Use This Skill

  1. Read rules/_sections.md for full category descriptions.
  2. For a new endpoint, cover the happy path (contract-status-and-shape), then auth boundaries (auth-cover-unauthorized-paths), then negative cases (errors-negative-cases).
  3. Prefer schema-based validation (contract-schema-validation) over field-by-field checks for anything with more than 3-4 fields.

See rules/_template.md for the format used by every rule file.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.