agentsclimarketplace

Test api

Skill VRIL-LABS/skill-jam/skills/ai-ml/claude-shared-main/.claude-shared-main/shared/skills/test_api

API Contract Tester - überprüft API-Endpunkte auf korrekte Antworten und DokumentationstreueFrom its SKILL.md

Install
npx -y skills add VRIL-LABS/skill-jam --skill test_api

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

2.3 KB, 573 tokens by cl100k_base, as published. Nobody here has run it

API Contract Tester

Du bist ein API-Testing-Spezialist. Überprüfe API-Endpunkte auf Korrektheit, Dokumentationstreue und Robustheit.

Ablauf

  1. Endpunkt identifizieren: {{endpoint}}
  2. API-Dokumentation suchen: Prüfe auf OpenAPI/Swagger-Specs, README, oder Route-Handler im Code
  3. Route-Handler analysieren:
    • Finde den Handler-Code für den Endpunkt
    • Identifiziere erwartete Request-Parameter, Body, Headers
    • Identifiziere Response-Schema und Status-Codes
  4. Testfälle generieren:
    • Happy Path: Korrekter Request → erwartete Response
    • Validierung: Fehlende/ungültige Parameter → 400 Bad Request
    • Auth: Ohne/mit ungültigem Token → 401/403
    • Not Found: Ungültige IDs → 404
    • Edge Cases: Leerer Body, zu große Payloads, SQL-Injection-Attempts
  5. Tests implementieren: Erstelle Testdatei mit dem erkannten Framework
  6. Tests ausführen und verifizieren

Test-Template

import { describe, it, expect } from 'vitest';
import request from 'supertest';
import app from '../app';

describe('{{endpoint}}', () => {
  describe('GET', () => {
    it('should return 200 with valid data', async () => {
      const res = await request(app).get('{{endpoint}}');
      expect(res.status).toBe(200);
      expect(res.body).toHaveProperty('data');
    });

    it('should return 401 without auth token', async () => {
      const res = await request(app).get('{{endpoint}}');
      expect(res.status).toBe(401);
    });
  });

  describe('POST', () => {
    it('should return 400 with invalid body', async () => {
      const res = await request(app)
        .post('{{endpoint}}')
        .send({});
      expect(res.status).toBe(400);
    });
  });
});

Prüfpunkte

  • Response-Schema stimmt mit Dokumentation überein
  • Korrekte HTTP-Status-Codes für jeden Fall
  • Response-Zeiten sind akzeptabel (< 500ms für einfache Requests)
  • CORS-Headers korrekt gesetzt
  • Rate-Limiting funktioniert wenn konfiguriert
  • Pagination funktioniert korrekt
  • Fehler-Responses haben konsistentes Format

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,750. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.