Skip to content
Skills Library
Programming · Testing

api-test

/api-test

Test REST APIs — define test suites as JSON and run them with a bundled Python runner that validates status codes, response bodies, timing, and leaked stack traces. Use when the user wants to test an API, check endpoints, or verify API responses.

Licence
MIT
Last repository change
31.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
1
HTML comments
0
URLs in SKILL.md
1
Deprecation

No signals detected. Repository changed on 31.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What to check before installing
  • 1 scripts in this package. Review them before installing, as Claude may execute them.

Scripts: scripts/run_api_tests.py

What it does and when to use it

Test REST APIs — define test suites as JSON and run them with a bundled Python runner that validates status codes, response bodies, timing, and leaked stack traces. Use when the user wants to test an API, check endpoints, or verify API responses.

Original author description

Test REST APIs — define test suites as JSON and run them with a bundled Python runner that validates status codes, response bodies, timing, and leaked stack traces. Use when the user wants to test an API, check endpoints, or verify API responses.

How it works

  1. Workflow (mandatory)
  2. Safety rules
Original SKILL.md headings · 55 lines, 294 words
SKILL.md preview
---
name: api-test
description: Test REST APIs — define test suites as JSON and run them with a bundled Python runner that validates status codes, response bodies, timing, and leaked stack traces. Use when the user wants to test an API, check endpoints, or verify API responses.
---

# API Tester

A bundled Python runner executes API tests deterministically. Your job is to WRITE the suite file well; the script does the running and checking. Follow this workflow.

## Workflow (mandatory)

1. **Gather**: base URL, auth (token/credentials), and either specific endpoints or a Swagger/OpenAPI spec (read it if given).
2. **Write the suite** to `api-tests/<name>.json`:

```json
{
  "base_url": "https://qa.example.com",
  "default_headers": {"Authorization": "Bearer <token>"},
  "tests": [
    {
      "name": "get user 1 - ok",
      "method": "GET",
      "path": "/api/users/1",
      "expect": {"status": 200, "max_time_s": 3, "json_fields": ["id", "email"], "json_equals": {"id": 1}}
    },
    {
      "name": "get user - no token - unauthorized",
      "method": "GET",
      "path": "/api/users/1",
      "headers": {"Authorization": ""},
      "expect": {"status": 401}
    }
  ]
}
```

   For EVERY endpoint, generate this standard set (skip only what doesn't apply):
   - valid request → 200/201 + expected fields (`json_fields`)
   - missing/invalid required fields → 400
   - no auth token → 401; wrong role → 403
   - non-existent ID → 404
   - boundary values in body (0, -1, max length, unicode)

3. **Run it:**

```
python .claude/skills/api-test/scripts/run_api_tests.py --suite api-tests/<name>.json --report api-tests/results.md
```

   - The script REFUSES to run if base_url doesn't look like a test environment (no dev/qa/test/staging/localhost in it). If blocked, ASK THE USER to confirm the environment before adding `--allow-any-env`. Never add that flag on your own.
   - The script also flags leaked stack traces in responses automatically — report those as security-relevant bugs.

4. **Report**: show the pass/fail table. For each failure, state expected vs actual in one line. Offer to write bug reports (bug-report skill) for real defects.

## Safety rules

- Never print full tokens — mask like `eyJhb...****` (the script masks automatically; you do the same in chat).
- No destructive requests (DELETE, bulk updates) without the user confirming the environment and approving explicitly.
Files in this package (2)
  • SKILL.md 2 KB
  • scripts/run_api_tests.py 6 KB

Versions

The database has no other skills named api-test.

Database snapshot: 13.11.2026 · package version 12dd3719705d (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100api-design
    REST API design patterns including resource naming, status codes, pagination, filtering, error responses, versioning, and rate limiting for production APIs. Use when designing or reviewing REST endpoints, resource names, status codes, pagination, or versioning.
  • 95api-design
    REST API design patterns including resource naming, status codes, pagination, filtering, error responses, versioning, and rate limiting for production APIs. Use when designing or reviewing REST endpoints, resource names, status codes, pagination, or versioning.
  • 95api-design
    REST API design patterns including resource naming, status codes, pagination, filtering, error responses, versioning, and rate limiting for production APIs. Use when designing or reviewing REST endpoints, resource names, status codes, pagination, or versioning.
  • 95api-design
    REST API design patterns including resource naming, status codes, pagination, filtering, error responses, versioning, and rate limiting for production APIs. Use when designing or reviewing REST endpoints, resource names, status codes, pagination, or versioning.
  • 90api-testing
    Test an HTTP API at its boundary so status codes, response schemas, error bodies, and auth paths all hold under real requests. Use when adding or reviewing tests for a service that other clients call over HTTP.
  • 100api-designer
    Generates complete, production-ready REST API endpoint specifications for any system or domain the user describes. Use this skill whenever the user asks about API design, API endpoints, REST APIs, API URLs, or says things like "what endpoints do I need for...", "design an API…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.