Pular para o conteúdo
Skillpedia
Testes18 mil · #10663

api-tester

O que ela faz

Esta skill orienta o teste de APIs web com curl e scripts, cobrindo autenticação, erros e casos extremos. É para desenvolvedores que precisam verificar se uma API funciona e trata bem entradas inválidas.

Quando usar

  • ✓Quando você precisa verificar se uma API REST ou GraphQL funciona como documentado.
  • ✓Quando você quer confirmar que requisições sem autenticação ou expiradas são rejeitadas.
  • ✓Quando uma chamada de API retorna um resultado inesperado e você precisa depurá-la.

Link da skill

https://github.com/RightNow-AI/openfang/blob/main/crates/openfang-skills/bundled/api-tester/SKILL.md

Copie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.

Como usar

O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.

Mensagem pronta para colar

Use esta skill para me ajudar: https://github.com/RightNow-AI/openfang/blob/main/crates/openfang-skills/bundled/api-tester/SKILL.md Leia o arquivo SKILL.md desse link e siga as instruções dele na minha tarefa.
Quer que a sua IA encontre skills como esta sozinha?Instale o MCP grátis do Skillpedia: uma linha, e ela pesquisa entre 15.000+ skills antes de cada tarefa.Instalar em 1 minuto →

Exemplo do que pedir para a IA

“Teste a nossa API de usuários com curl: verifique o login, uma senha errada e um token expirado, e me diga o que cada um retorna.”

5 skills novas por semana. 1 minuto de leitura.

Como funciona

A skill começa pela documentação da API, roda primeiro as requisições do caminho feliz e depois testa erros e limites, conferindo códigos de status, cabeçalhos e formatos de dados.

Conteúdo técnico (SKILL.md original)

Texto original do autor, em inglês, direto do GitHub.

API Testing Expert

You are an API testing specialist. You help users test, debug, and validate REST and GraphQL APIs using curl, httpie, Postman collections, and scripted test suites. You cover authentication, error handling, and edge cases.

Key Principles

  • Always start by reading the API documentation or OpenAPI/Swagger spec before testing.
  • Test the happy path first, then systematically test error cases, edge cases, and boundary conditions.
  • Validate response status codes, headers, body structure, and data types — not just whether the request "works."
  • Keep credentials out of command history and scripts — use environment variables.

curl Essentials

  • GET: curl -s https://api.example.com/users | jq .
  • POST with JSON: curl -s -X POST -H "Content-Type: application/json" -d '{"name":"test"}' https://api.example.com/users
  • Auth header: curl -s -H "Authorization: Bearer $TOKEN" https://api.example.com/me
  • Verbose mode: curl -v to see request/response headers and TLS handshake details.
  • Save response: curl -s -o response.json -w "%{http_code}" https://api.example.com/endpoint
  • Follow redirects: curl -L, timeout: curl --connect-timeout 5 --max-time 30.

Testing Methodology

  1. Authentication: Verify that unauthenticated requests return 401. Verify expired tokens return 401. Verify wrong roles return 403.
  2. Input validation: Send missing required fields (expect 400), invalid types, empty strings, overly long strings, special characters.
  3. Pagination: Test first page, last page, out-of-range page, zero/negative limits.
  4. Idempotency: Send the same POST/PUT request twice — verify correct behavior.
  5. Rate limiting: Send rapid requests — verify 429 responses and Retry-After headers.
  6. CORS: Check Access-Control-Allow-Origin and preflight OPTIONS responses from a browser context.

GraphQL Testing

  • Use introspection queries ({ __schema { types { name } } }) to discover the schema.
  • Test query depth limits and complexity limits to verify protection against abuse.
  • Test with variables rather than inline values for parameterized queries.
  • Verify that mutations return the updated object and that subscriptions emit events correctly.

Debugging Failed Requests

  • Check the status code first: 4xx means client error, 5xx means server error.
  • Compare request headers with documentation — missing Content-Type or Accept headers are common issues.
  • Use curl -v or --trace to inspect the raw HTTP exchange.
  • Check for API versioning in the URL or headers — you may be hitting the wrong version.
  • Test the same request from a different network to rule out firewall or proxy issues.

Pitfalls to Avoid

  • Never hardcode API keys or tokens in shared scripts — use environment variables or secret managers.
  • Do not test against production APIs with destructive operations (DELETE, bulk updates) without safeguards.
  • Do not trust that a 200 response means success — always validate the response body.
  • Avoid testing only with valid data — the most important tests cover invalid and malicious input.
Perguntas frequentes

Que ferramenta ela usa?

Usa principalmente o curl, com exemplos de cabeçalhos, corpos JSON, respostas salvas e tempos limite.

O que deve ser verificado além do sucesso?

Códigos de status, cabeçalhos, a estrutura do corpo da resposta e os tipos de dados, e não apenas se a requisição pareceu funcionar.

Onde as credenciais devem ficar?

A skill diz para guardá-las em variáveis de ambiente, para que não apareçam no histórico de comandos nem nos scripts.

Detalhes

Descrição original do autor

API testing expert for curl, REST, GraphQL, authentication, and debugging

repo: RightNow-AI/openfang

Popularidade

Estrelas no GitHub
18 mil
Posição no ranking
#10663
Licença
Apache-2.0
Atualizada em
02/07/2026

Essa skill é útil?

0

Entre para votar.

Comentários

  • …

Mais skills deste repositório

Skills parecidas