Api Testing

🌐Community
by secondsky · vlatest · Repository

Helps with API, testing as part of testing, debugging, and quality assurance workflows.

Install on your platform

We auto-selected Claude Code based on this skill’s supported platforms.

1

Run in terminal (recommended)

terminal
claude mcp add secondsky-api-testing npx -- -y @trustedskills/secondsky-api-testing
2

Or manually add to ~/.claude/settings.json

~/.claude/settings.json
{
  "mcpServers": {
    "secondsky-api-testing": {
      "command": "npx",
      "args": [
        "-y",
        "@trustedskills/secondsky-api-testing"
      ]
    }
  }
}

Requires Claude Code (claude CLI). Run claude --version to verify your install.

About This Skill

What it does

This skill provides expert knowledge for testing HTTP APIs using Supertest (for TypeScript/JavaScript environments) and httpx/pytest (for Python). It enables AI agents to write, execute, and analyze API tests, aiding in debugging and quality assurance workflows. The provided examples demonstrate how to perform common operations like GET, POST, PUT, DELETE requests, as well as testing authentication and validating request bodies.

When to use it

  • Automating API test suites for web applications.
  • Debugging failing API endpoints during development.
  • Ensuring the reliability of backend services through automated testing.
  • Validating that APIs adhere to expected input requirements and return correct responses.
  • Creating integration tests involving multiple API calls.

Key capabilities

  • Supertest Integration (TypeScript/JavaScript): Provides code snippets for setting up and running tests using Supertest.
  • httpx/pytest Support (Python): Offers expertise applicable to Python-based API testing frameworks.
  • Request Method Testing: Demonstrates how to test GET, POST, PUT, and DELETE requests.
  • Header & Query Parameter Handling: Includes examples for setting headers (e.g., Authorization) and using query parameters in requests.
  • Authentication Testing: Shows how to incorporate authentication testing into API tests.

Example prompts

  • "Write a Supertest test to verify the /api/health endpoint returns a 200 status code with status: 'ok'."
  • "Generate a Python httpx test for creating a user via POST request to /api/users and validate the response body contains an ID."
  • "Show me how to use Supertest to send a GET request to /api/users with page and limit query parameters."

Tips & gotchas

  • Environment Setup: Requires Bun or npm for TypeScript/JavaScript testing, and httpx/pytest for Python.
  • Application Context: The examples assume an existing application (app) is available. You'll need to adapt the code to your specific API setup.
  • Authentication Details: Replace placeholder authentication tokens (e.g., Bearer token123) with valid credentials when testing authenticated endpoints.

Tags

🛡️

TrustedSkills Verification

Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.

Security Audits

Gen Agent Trust HubPass
SocketPass
SnykPass

Details

Version
vlatest
License
Author
secondsky
Installs
57

🌐 Community

Passed automated security scans.